java error



  • Haven't seen this one before.

    Error: java.lang.StackOverflowError
    java.lang.StackOverflowError
    at java.util.Arrays.hashCode(Arrays.java:4146)
    at java.util.Objects.hash(Objects.java:128)
    at games.strategy.engine.data.DefaultAttachment.hashCode(DefaultAttachment.java:132)
    at java.util.HashMap.hash(HashMap.java:339)
    at java.util.HashMap.containsKey(HashMap.java:596)
    at games.strategy.triplea.attachments.AbstractConditionsAttachment.testAllConditionsRecursive(AbstractConditionsAttachment.java:179)
    at games.strategy.triplea.attachments.AbstractConditionsAttachment.testAllConditionsRecursive(AbstractConditionsAttachment.java:180)
    at games.strategy.triplea.attachments.AbstractConditionsAttachment.testAllConditionsRecursive(AbstractConditionsAttachment.java:180)
    at games.strategy.triplea.attachments.AbstractConditionsAttachment.testAllConditionsRecursive(AbstractConditionsAttachment.java:180)
    at games.strategy.triplea.attachments.AbstractConditionsAttachment.testAllConditionsRecursive(AbstractConditionsAttachment.java:180)
    at games.strategy.triplea.attachments.AbstractConditionsAttachment.testAllConditionsRecursive(AbstractConditionsAttachment.java:180)
    at gam

    Google didn't know what it was. Must be triplea specific. Noticed it says "java 179" the first line and then goes to "180" and just repeats itself a few hundred times.

    Checked what I did and couldn't find anything wrong. I'm gonna start over and try again. Just curious if anyone knows what it is : )

    Thanks

    Did some more searching. Looks like I'm trying to make two things the same. Which is kinda what I'm doing. Anyway, no biggie : )


  • Admin

    @beelee Usually that means you have an endless loop. Like 1 condition pointing to another condition pointing back to the first condition. I'd need to see that map in order to debug it further.



  • @redrum right on. i went ahead and redid it and got it to work. Just hadn't seen the error before and was curious in case i see it again. Thanks : )


  • Admin

    @redrum That might be something we could check in the code in general because erroring with a Stackoverflow is really not a good way to tell someone something has been misconfigured.


  • Admin

    @roiex Agree. Checking and having a better error message would be nice though its the first time I've ever seen it so probably not super common.