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
Comments
I suggest removing line 186 |
Could you attach the file please? Might have to append .txt to the name. Thanks. |
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.
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.
I think this is now fixed, but can you please attach the panel that triggered this so we can include in the unit tests? |
It's not that the contract was violated, it's that a circular reference for the hashcode could be created since an oblock contains a map of paths, and a path can have a reference to an oblock, so we went in a circle trying to generate the hashcode for an oblock->map->path->oblock->...
Randall Wood
Alexandria Software
randall.h.wood@alexandriasoftware.com
http://alexandriasoftware.com
… On Jan 31, 2017, at 21:26, Bob Jacobsen ***@***.***> wrote:
@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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Several of my files had the same load error. This one is a test file that does not require any connection type
On Tuesday, January 31, 2017 6:18 PM, Bob Jacobsen <notifications@github.com> wrote:
Could you attach the file please? Might have to append .txt to the name. Thanks.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@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. |
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.....
The text was updated successfully, but these errors were encountered: