Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Error when opening layout editor
#layouteditor
I have a large layout editor file that had been working well , but we wanted to make improvements. After a number of editing sessions I now get an error when opening the layout editor file. The panel loads but all of the signals are red. The SML is there but no path is active for any signal. If I delete paths quit and save the file, then the next time it opens the error is gone and the panel seems to work fine. If I then save the file and reopen it even with no changes the error returns. If I quit without saving the error does not return.
I have done this many time to be sure that the behavior is consistent. I have disabled all of the logixNGs but this has no effect.
?
Here is what the error looks like from the system console
20:11:40,738 ptionhandler.UncaughtExceptionHandler ERROR - Uncaught Exception caught by jmri.util.exceptionhandler.UncaughtExceptionHandler [AWT-EventQueue-0]
java.lang.IndexOutOfBoundsException: Index 805 out of bounds for length 578 ? ? at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?] ? ? at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]? .
.
.
The error message is always the same.
?
I don't really know where I should be looking to fix this.
?
Any help will be welcome and appreciated.
?
Regards,
?
John Figie |
¿ªÔÆÌåÓýJohn, ? You¡¯ll have to provide the full length of that traceback. That¡¯s only showing where it failed in a Java utility. We need to see where it was leaving the JMRI code. ? -Ken Cameron, Member JMRI Dev Team
? ? |
John, To expand on Ken's reply, I recommend that you upload the messages.log file to the group's ProblemsBeingWorkedOn file folder. This will provide the details of the problem along with a history of the sessions. Dave Sand ----- Original message ----- From: "John Figie via groups.io" <zephyr9900=[email protected]> Subject: [jmriusers] Error when opening layout editor #layouteditor Date: Wednesday, January 29, 2025 8:27 PM I have a large layout editor file that had been working well , but we wanted to make improvements. After a number of editing sessions I now get an error when opening the layout editor file. The panel loads but all of the signals are red. The SML is there but no path is active for any signal. If I delete paths quit and save the file, then the next time it opens the error is gone and the panel seems to work fine. If I then save the file and reopen it even with no changes the error returns. If I quit without saving the error does not return. I have done this many time to be sure that the behavior is consistent. I have disabled all of the logixNGs but this has no effect. ? Here is what the error looks like from the system console 20:11:40,738 ptionhandler.UncaughtExceptionHandler ERROR - Uncaught Exception caught by jmri.util.exceptionhandler.UncaughtExceptionHandler [AWT-EventQueue-0] java.lang.IndexOutOfBoundsException: Index 805 out of bounds for length 578 ? ? at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?] ? ? at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]? . . . The error message is always the same. ? I don't really know where I should be looking to fix this. ? Any help will be welcome and appreciated. ? Regards, ? John Figie |
John, The messages.log file is normally 1MB which rolls over. ?Since you are running 5.6, that is about the time the logging technology was upgraded. ?When you move beyond 5.6, the 55MB file will create errors during JMRI startup. ?The easy bypass is to rename the file. The problem you are seeing is occurring during creation of the signal mast logic. ?Unfortunately there is not enough information to identify the actual problem. ?To determine the actual error you will need to upload the C:\Users\zephy\JMRI\NX300\NAPM_Auto_NX342.xml file. ? Dave Sand ----- Original message ----- From: "John Figie via groups.io" <zephyr9900=[email protected]> Subject: Re: [jmriusers] Error when opening layout editor #layouteditor Date: Wednesday, January 29, 2025 10:05 PM Thanks much for your prompt reply and help on this.? ? The messages file is 55MB so I just uploaded a small snippet from the end including many sessions. Please see comments in the folder ? John Figie |
David,
?
I should point out that the main purpose of this revision was to remove many of the virtual blocks and sequencing logic at crossovers. I found in a smaller test file that by using turnouts instead of crossovers it provided more benefits.?
1) more compact schematic
2) simpler sequencing logix for the train trackers.
3) It is easier to put a high cost on using crossovers and prevents the NX logic from crossing back and forth. other wise balancing paths seemed impossible.
?
so I have a zero length block in each pair of turnouts for a crossover.
?
regards,
?
John Figie |
John, The profile/profile.xml would be helpful. ?It has the CMRI configuration. Dave Sand ----- Original message ----- From: "John Figie via groups.io" <zephyr9900=[email protected]> Subject: Re: [jmriusers] Error when opening layout editor #layouteditor Date: Wednesday, January 29, 2025 10:47 PM I have uploaded the file along with some of the other resources. Let me know if I missed something. ? John Figie |
Folder moved to 'Problems being worked on'
-- Peter Ulvestad Linux Mint 22.1, JMRI 5.11.2plus, Java 21.0.5 JMRI Users Group Moderator ( /g/jmriusers ) JMRI Developers Group Moderator ( ) Tam Valley Group Moderator ( ) Sprog-DCC Group Moderator ( ) Edmonton Model Railroad Association ( ) |
John, The error appears to be caused by a change in signal mast placement. The destination mast is before the source mast so the logic searches around the entire layout and eventually has the error. If you delete the SML and add the next two destination masts in the direction of travel. ?For some reason, Discover does not work but you can enable Layout Editor/Blocks/Turnouts and that works. I suspect this is a side effect of replacing crossovers with turnout pairs. ?I will have to some more research tomorrow. On an unrelated note, I notice you have some crossovers acting as a double crossover with two blocks. ?The causes SML problems since there can only be one direct connection between two blocks. ?These require three blocks. ?For example, LB Tower and Kimball Ave. Dave Sand ----- Original message ----- From: "John Figie via groups.io" <zephyr9900=[email protected]> Subject: Re: [jmriusers] Error when opening layout editor #layouteditor Date: Wednesday, January 29, 2025 10:58 PM done |
John, I did one more test. ?I deleted all of the SML and the block paths. ?After a re-start, all of the SML was discovered without errors. ?However not always correctly. Here is the generated logic for the problem mast. The third pair is caused by turnout NT837. ?This was caused by no block boundary at the straight leg. ?This is obviously wrong so it can be deleted. Dave Sand ----- Original message ----- From: Dave Sand <ds@...> Subject: Re: [jmriusers] Error when opening layout editor #layouteditor Date: Thursday, January 30, 2025 12:11 AM John, The error appears to be caused by a change in signal mast placement. The destination mast is before the source mast so the logic searches around the entire layout and eventually has the error. If you delete the SML and add the next two destination masts in the direction of travel. ?For some reason, Discover does not work but you can enable Layout Editor/Blocks/Turnouts and that works. I suspect this is a side effect of replacing crossovers with turnout pairs. ?I will have to some more research tomorrow. On an unrelated note, I notice you have some crossovers acting as a double crossover with two blocks. ?The causes SML problems since there can only be one direct connection between two blocks. ?These require three blocks. ?For example, LB Tower and Kimball Ave. Dave Sand ----- Original message ----- From: "John Figie via groups.io" <zephyr9900=[email protected]> Subject: Re: [jmriusers] Error when opening layout editor #layouteditor Date: Wednesday, January 29, 2025 10:58 PM done |
John, I suspect your dummy blocks between the crossover turnouts may cause problems. ?The main issue is that they can break block tracking. They do fix the double crossover problem. Dave Sand ----- Original message ----- From: "John Figie via groups.io" <zephyr9900=[email protected]> Subject: Re: [jmriusers] Error when opening layout editor #layouteditor Date: Wednesday, January 29, 2025 10:55 PM David, ? I should point out that the main purpose of this revision was to remove many of the virtual blocks and sequencing logic at crossovers. I found in a smaller test file that by using turnouts instead of crossovers it provided more benefits.? 1) more compact schematic 2) simpler sequencing logix for the train trackers. 3) It is easier to put a high cost on using crossovers and prevents the NX logic from crossing back and forth. other wise balancing paths seemed impossible. ? so I have a zero length block in each pair of turnouts for a crossover. ? regards, ? John Figie |
Hmm
?
I built a small test panel with the crossover blocks. I then use LogixNG to sequence the crossover block to make the tracking work. This is much simpler than putting the virtual blocks on the straight sections to avoid the double crossover problem. One of the main issues with many virtual blocks on the mainline is that it is really hard to keep the NX from crossing over from track to track. That is the way I originally had the panel. This new implementation seems much better I can put a high cost on using the crossover and it seems that it was much easier to get all of the SML to discover with no issues.? This new panel is not yet complete, and all of the LogixNG is not yet in place. But also so far the NX pairs that are in place seem to be working perfectly so I thought this was the way to go.?
?
John Figie |
Dave,
?
Thanks for finding these issues. I changed the block between NT837 and IT:NT831 to a new block called NS765X to prevent the issue with no block boundary at the straight leg and a signal facing away from NT837 per your reply:? /g/jmriusers/message/239254 .? I also removed the signal A:L01:SIG:WB:765. Then everything seems to be working well again. But if I put A:L01:SIG:WB:765 back at the boundary of NS720 - NS765 the Discover SML cant find any destinations and just hangs with "Discovering Signal Masts" and finds nothing - just as you stated in the previous reply /g/jmriusers/message/239253
I keep thinking that somewhere with all of my editing of this layout editor file there is a typo or some bit of leftover stuff in the file that is causing the issue.?
?
?
Your support on these issues is above and beyond!
I really appreciate your work.
?
John Figie
|
John, When the discover hangs, you will most likely have a Java error in the system console. When things are not working as expected, I use the GrandReset.py script to reset the environment. ?For your layout, that removes the SML and block paths. When using turnouts for a crossover, I use one of the turnout blocks for the connecting track segment. The crossover item is handled differently than a simulated crossover using turnouts. Dave Sand ----- Original message ----- From: "John Figie via groups.io" <zephyr9900=[email protected]> Subject: Re: [jmriusers] Error when opening layout editor #layouteditor Date: Thursday, January 30, 2025 10:34 AM Dave, ? Thanks for finding these issues. I changed the block between NT837 and IT:NT831 to a new block called NS765X to prevent the issue with no block boundary at the straight leg and a signal facing away from NT837 per your reply:? /g/jmriusers/message/239254 .? I also removed the signal A:L01:SIG:WB:765. Then everything seems to be working well again. But if I put A:L01:SIG:WB:765 back at the boundary of NS720 - NS765 the Discover SML cant find any destinations and just hangs with "Discovering Signal Masts" and finds nothing - just as you stated in the previous reply /g/jmriusers/message/239253 I keep thinking that somewhere with all of my editing of this layout editor file there is a typo or some bit of leftover stuff in the file that is causing the issue.? ? ? Your support on these issues is above and beyond! I really appreciate your work. ? John Figie |
John, I think this is the fix for the SML issue. There is a dummy block between NT837 and IT:NT831. ?This provides the block boundaries at the normal leg of each turnout for signal masts and NX sensors. Dave Sand ----- Original message ----- From: Dave Sand <ds@...> Subject: Re: [jmriusers] Error when opening layout editor #layouteditor Date: Thursday, January 30, 2025 11:26 AM John, When the discover hangs, you will most likely have a Java error in the system console. When things are not working as expected, I use the GrandReset.py script to reset the environment. ?For your layout, that removes the SML and block paths. When using turnouts for a crossover, I use one of the turnout blocks for the connecting track segment. The crossover item is handled differently than a simulated crossover using turnouts. Dave Sand ----- Original message ----- From: "John Figie via groups.io" <zephyr9900=[email protected]> Subject: Re: [jmriusers] Error when opening layout editor #layouteditor Date: Thursday, January 30, 2025 10:34 AM Dave, ? Thanks for finding these issues. I changed the block between NT837 and IT:NT831 to a new block called NS765X to prevent the issue with no block boundary at the straight leg and a signal facing away from NT837 per your reply:? /g/jmriusers/message/239254 .? I also removed the signal A:L01:SIG:WB:765. Then everything seems to be working well again. But if I put A:L01:SIG:WB:765 back at the boundary of NS720 - NS765 the Discover SML cant find any destinations and just hangs with "Discovering Signal Masts" and finds nothing - just as you stated in the previous reply /g/jmriusers/message/239253 I keep thinking that somewhere with all of my editing of this layout editor file there is a typo or some bit of leftover stuff in the file that is causing the issue.? ? ? Your support on these issues is above and beyond! I really appreciate your work. ? John Figie |
Dave,
?
Thanks for your suggestion on how to fix my issue with the SML. I had also came to the same conclusion and got the panel working again. There were still however a few other signals that did not behave correctly in the area where there are 4 tracks with many crossovers. I was able to fix these by adding a few more "dummy blocks" and in one case replacing the 2 switch + dummy block crossover back to a normal crossover. The issues that I had were:
?
1) SML logic was finding a path to the destination mast taking crossovers back and forth instead of the straight path.?
?
2) SML logic would not find a path to the destination mast. The block routing table would only find a much longer path that was > 40 hops.
?
These issues would go away if I cleared the paths and then exit the program. but then on subsequent saves (without clearing the paths) the problems would return.
?
So for now I think all of the SML logic is working as expected and I do not see any problems when saving and reloading.
?
I also have the NX pairs working. With this version the NX seems to be much better than with the original panel that did not use the 2 switch + dummy block crossover but instead had dummy blocks to avoid the "double crossover" issue.? Now I am able to put a high cost on using crossovers and the NX will find a straight path when making a long selection consisting of many pairs.
?
There is however one issue remaining with NX that I am hoping you can help me with and I will put that in a separate thread since I don't think it is related.
?
regards,
?
John Figie |
to navigate to use esc to dismiss