-
Notifications
You must be signed in to change notification settings - Fork 18
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
Game crashes if the player fails a mission with no "no_ships" line set in the data #408
Comments
Looks potentially valid. srtm.pn doesn't define any "no_ships" string, so I guess it can be uninitialized if you fail it? |
Hmm. In practice, the replay shouldn’t get that far, because the key input stream ends before the last ship dies, and that’s supposed to stop the replay. Somehow, pausing (do you mean ESC or CAPS?) must allow the game time to advance further. (It would also be good to not crash when |
I mean like suspending the process with the debugger attached. Not 100% sure if this is reproducible in a real-world scenario yet, but should probably test to see what happens in Space Race, The Musical if you game over from ship loss. |
I see, that makes more sense. If the process is suspended and resumed, it will probably attempt to catch up by running the clock through that whole time, before the replay end check. The corresponding real-world scenario would be a very slow computer that can't effectively keep up, though that computer is not going to have a good time anyway. |
Appears to be some sort of race condition or discontinuity that can crash the game in debug conditions, but might be a symptom of a real problem that needs to be diagnosed.
Reproduction steps:
It will crash with the following stack trace:
This appears to be because g.level->solo.no_ships is an "optional" but is not set. If the process isn't paused/resumed, then the demo ends and PlayerShipBodyExpire isn't called.
The text was updated successfully, but these errors were encountered: