-
Notifications
You must be signed in to change notification settings - Fork 98
Add null check to avoid crash on corrupt signal files #1090
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
Conversation
- Pull request #570 at 362e4e7: glTF 2.0 support with PBR lighting - Pull request #1062 at 9a76b26: Train Forces popup Window. - Pull request #1064 at 1be1fc4: Add Train Info tab to Help window (F1) - Pull request #1084 at 13454ed: Timetable: Calculate Delay While Stopped at a Station - Pull request #1074 at e9a66c1: Gradient - commit 2024-16-12 - Pull request #1085 at 37e2817: updates key commands for Train Operations window and also Daylight Offset - Pull request #1086 at e10390b: Add Settings Exporter tool (copy settings to INI, etc) - Pull request #1087 at 1f64f02: Improve warning message for signal location mismatch. - Pull request #1088 at 4b3fa4c: Preserve previous log file. - Pull request #1089 at d750bd1: Fix Superelevation on Rigid Frame Rolling Stock Again - Pull request #1090 at 33d2582: Add null check to avoid crash on corrupt signal files - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1081 at 689494b: Brake cuts power unification
- Pull request #570 at 362e4e7: glTF 2.0 support with PBR lighting - Pull request #1062 at 9a76b26: Train Forces popup Window. - Pull request #1064 at 1be1fc4: Add Train Info tab to Help window (F1) - Pull request #1074 at e9a66c1: Gradient - commit 2024-16-12 - Pull request #1085 at 37e2817: updates key commands for Train Operations window and also Daylight Offset - Pull request #1086 at e10390b: Add Settings Exporter tool (copy settings to INI, etc) - Pull request #1087 at 1f64f02: Improve warning message for signal location mismatch. - Pull request #1088 at 4b3fa4c: Preserve previous log file. - Pull request #1089 at d750bd1: Fix Superelevation on Rigid Frame Rolling Stock Again - Pull request #1090 at 33d2582: Add null check to avoid crash on corrupt signal files - Pull request #1092 at 18238f4: Adds $req, depart-early and passing -time to Manual - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1081 at 689494b: Brake cuts power unification
|
I created a bug for this yesterday. https://bugs.launchpad.net/or/+bug/2111454 |
|
Should there be a warning log to provide a hint that there is a faulty signal? Or would that be reported / detected somewhere else anyway? |
|
This was initially reported at https://www.elvastower.com/forums/index.php?/topic/38716-sigscr-prooblem but PR #1070 was merged before I had time to say that the bug hadn't been fixed yet. Definitely logging a warning would be useful, but not here. The TCS is merely consuming a corrupted data structure (functionHead should never be null: all the signals in the list should have one SignalHead from the requested type). I believe the bug happens specifically for NORMAL signals, but only in Activity or Timetable mode (i.e. not in Explorer mode). This is because the information for NORMAL signals is extracted from a different place in such case:
My guess is that there is a signal in In my opinion, the bug should be solved by ensuring the consistency of SignalObjectItems and/or PlayerTrainSignals, but as this bug seems to happen only for specific routes, it's hard to debug. This fix at least solves the crash. The information is not used in many more places anyway, so solving the consistency bug is low priority. |
- Pull request #570 at 362e4e7: glTF 2.0 support with PBR lighting - Pull request #1062 at 9a76b26: Train Forces popup Window. - Pull request #1064 at 1be1fc4: Add Train Info tab to Help window (F1) - Pull request #1085 at 37e2817: updates key commands for Train Operations window and also Daylight Offset - Pull request #1086 at e10390b: Add Settings Exporter tool (copy settings to INI, etc) - Pull request #1087 at 1f64f02: Improve warning message for signal location mismatch. - Pull request #1088 at 4b3fa4c: Preserve previous log file. - Pull request #1089 at d750bd1: Fix Superelevation on Rigid Frame Rolling Stock Again - Pull request #1090 at 33d2582: Add null check to avoid crash on corrupt signal files - Pull request #1092 at 18238f4: Adds $req, depart-early and passing -time to Manual - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1081 at 689494b: Brake cuts power unification - Pull request #1091 at b0c622b: Automatic speed control
- Pull request #570 at 362e4e7: glTF 2.0 support with PBR lighting - Pull request #1062 at 9a76b26: Train Forces popup Window. - Pull request #1064 at 1be1fc4: Add Train Info tab to Help window (F1) - Pull request #1085 at 37e2817: updates key commands for Train Operations window and also Daylight Offset - Pull request #1086 at e10390b: Add Settings Exporter tool (copy settings to INI, etc) - Pull request #1087 at 1f64f02: Improve warning message for signal location mismatch. - Pull request #1088 at 4b3fa4c: Preserve previous log file. - Pull request #1089 at d750bd1: Fix Superelevation on Rigid Frame Rolling Stock Again - Pull request #1090 at 33d2582: Add null check to avoid crash on corrupt signal files - Pull request #1092 at d5816e4: Adds $gradient, $req, depart-early and passing-time to Manual - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1081 at 689494b: Brake cuts power unification - Pull request #1091 at b0c622b: Automatic speed control
- Pull request #570 at 362e4e7: glTF 2.0 support with PBR lighting - Pull request #1062 at 9a76b26: Train Forces popup Window. - Pull request #1064 at 1be1fc4: Add Train Info tab to Help window (F1) - Pull request #1085 at 37e2817: updates key commands for Train Operations window and also Daylight Offset - Pull request #1086 at e10390b: Add Settings Exporter tool (copy settings to INI, etc) - Pull request #1087 at 1f64f02: Improve warning message for signal location mismatch. - Pull request #1088 at 4b3fa4c: Preserve previous log file. - Pull request #1089 at d750bd1: Fix Superelevation on Rigid Frame Rolling Stock Again - Pull request #1090 at 9e0bfe8: Add null check to avoid crash on corrupt signal files - Pull request #1092 at d5816e4: Adds $gradient, $req, depart-early and passing-time to Manual - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1081 at 689494b: Brake cuts power unification - Pull request #1091 at b0c622b: Automatic speed control
- Pull request #570 at 362e4e7: glTF 2.0 support with PBR lighting - Pull request #1062 at 9a76b26: Train Forces popup Window. - Pull request #1064 at 1be1fc4: Add Train Info tab to Help window (F1) - Pull request #1085 at 37e2817: updates key commands for Train Operations window and also Daylight Offset - Pull request #1086 at e10390b: Add Settings Exporter tool (copy settings to INI, etc) - Pull request #1087 at 1f64f02: Improve warning message for signal location mismatch. - Pull request #1088 at 4b3fa4c: Preserve previous log file. - Pull request #1090 at 9e0bfe8: Add null check to avoid crash on corrupt signal files - Pull request #1092 at d5816e4: Adds $gradient, $req, depart-early and passing-time to Manual - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1081 at 689494b: Brake cuts power unification - Pull request #1091 at b0c622b: Automatic speed control
rwf-rr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, and fixes the case I reported in the bug.
- Pull request #570 at 362e4e7: glTF 2.0 support with PBR lighting - Pull request #1062 at 9a76b26: Train Forces popup Window. - Pull request #1064 at 1be1fc4: Add Train Info tab to Help window (F1) - Pull request #1085 at 37e2817: updates key commands for Train Operations window and also Daylight Offset - Pull request #1086 at e10390b: Add Settings Exporter tool (copy settings to INI, etc) - Pull request #1090 at 9e0bfe8: Add null check to avoid crash on corrupt signal files - Pull request #1092 at d5816e4: Adds $gradient, $req, depart-early and passing-time to Manual - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1081 at 689494b: Brake cuts power unification - Pull request #1091 at b0c622b: Automatic speed control
- Pull request #570 at 362e4e7: glTF 2.0 support with PBR lighting - Pull request #1062 at 9a76b26: Train Forces popup Window. - Pull request #1064 at 1be1fc4: Add Train Info tab to Help window (F1) - Pull request #1085 at 37e2817: updates key commands for Train Operations window and also Daylight Offset - Pull request #1086 at e10390b: Add Settings Exporter tool (copy settings to INI, etc) - Pull request #1090 at 9e0bfe8: Add null check to avoid crash on corrupt signal files - Pull request #1092 at 7cc63cb: Adds $gradient, $req, depart-early and passing-time to Manual - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1081 at 689494b: Brake cuts power unification - Pull request #1091 at b0c622b: Automatic speed control
- Pull request #570 at 362e4e7: glTF 2.0 support with PBR lighting - Pull request #1062 at 9a76b26: Train Forces popup Window. - Pull request #1064 at 1be1fc4: Add Train Info tab to Help window (F1) - Pull request #1085 at 37e2817: updates key commands for Train Operations window and also Daylight Offset - Pull request #1086 at e10390b: Add Settings Exporter tool (copy settings to INI, etc) - Pull request #1090 at 9e0bfe8: Add null check to avoid crash on corrupt signal files - Pull request #1092 at 344634b: Adds $gradient, $req, depart-early and passing-time to Manual - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1081 at 689494b: Brake cuts power unification - Pull request #1091 at b0c622b: Automatic speed control
Follow-up for #1070
If the signalling is corrupted, it is possible to get a signal added to the NORMAL signal list without actually having a NORMAL head, causing a null pointer exception.