Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR #2939 causes stack overflow upon loading panel file #2976

Closed
petecressman opened this issue Feb 1, 2017 · 8 comments
Closed

PR #2939 causes stack overflow upon loading panel file #2976

petecressman opened this issue Feb 1, 2017 · 8 comments

Comments

@petecressman
Copy link
Contributor

load loops at:
at jmri.jmrit.logix.OBlock.hashCode(OBlock.java:186)
at java.util.Objects.hashCode(Unknown Source)
at java.util.HashMap$Node.hashCode(Unknown Source)
at java.util.AbstractMap.hashCode(Unknown Source)
at java.util.AbstractList.hashCode(Unknown Source)
at java.util.Objects.hashCode(Unknown Source)
at java.util.HashMap$Node.hashCode(Unknown Source)
at java.util.AbstractMap.hashCode(Unknown Source)
at java.util.Objects.hashCode(Unknown Source)
at jmri.jmrit.logix.OBlock.hashCode(OBlock.java:186)
at java.util.Objects.hashCode(Unknown Source)
at java.util.HashMap$Node.hashCode(Unknown Source)
at java.util.AbstractMap.hashCode(Unknown Source)
at java.util.AbstractList.hashCode(Unknown Source)
at java.util.Objects.hashCode(Unknown Source)
at java.util.HashMap$Node.hashCode(Unknown Source)
at java.util.AbstractMap.hashCode(Unknown Source)
at java.util.Objects.hashCode(Unknown Source)
at jmri.jmrit.logix.OBlock.hashCode(OBlock.java:186)
etc.....

@petecressman
Copy link
Contributor Author

I suggest removing line 186

@bobjacobsen
Copy link
Member

Could you attach the file please? Might have to append .txt to the name. Thanks.

@bobjacobsen
Copy link
Member

@rhwood: working from phone, can't test, but it looks like #2939 now has OBlock violating the hashcode() contract that equals() objects always have identical hash values.

rhwood added a commit that referenced this issue Feb 1, 2017
The addresses #2976. The removed problematic line can cause a circular reference and eventual stack overflow if an item in the referred to collection refers back to the OBlock.
rhwood added a commit that referenced this issue Feb 1, 2017
The addresses #2976. The removed problematic line can cause a circular reference and eventual stack overflow if an item in the referred to collection refers back to the OBlock.
@rhwood
Copy link
Contributor

rhwood commented Feb 1, 2017

I think this is now fixed, but can you please attach the panel that triggered this so we can include in the unit tests?

@rhwood
Copy link
Contributor

rhwood commented Feb 1, 2017 via email

@petecressman
Copy link
Contributor Author

petecressman commented Feb 2, 2017 via email

@rhwood
Copy link
Contributor

rhwood commented Feb 2, 2017

@petecressman you'll have to visit GitHub to attach the file (follow the link at the bottom of the email) and upload it through the website (or email it directly to me and I'll add it). Sorry about that.

@rhwood
Copy link
Contributor

rhwood commented Feb 7, 2017

Fixed by #2979 and #2997.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants