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
If you change the game mode 9 times in succession, then the game crashes on the ninth attempt. #7590
Comments
Hard crash call stack:
Seems it's doing ScriptConfig::GetSetting(nullptr) and crash on Other crash call stack:
|
I'd imagine that the new squirrel memory tracking isn't getting cleared at some point. |
Actually, just executing the console command "rescangame" 18 times or executing the command "rescanai" 9 times is enough to crash the game. You don't need to repeatedly change the game mode multiple times like I originally said. |
Number of times probably depends on number of AI/GS you have, and also on the memory limit set for scripts. |
As for number of command "rescanai" or "rescangame" reruns, it is the same no matter the RAM limit set in openttd.cfg. However, the number of Ais and Game Scripts and the complexity of their info.nut files do affect the number of times that "rescanai" or "rescangame" need to be rerun until a crash occurs. For example, with all AIs and Game Scripts available on Bananas, it takes 10-15 loops until crash. With just a single PathZilla AI, it takes 1000-1500 loops until crash. |
Version of OpenTTD
20190511-master-g38bb6b7d1b
Expected result
The game doesn't crash at all when creating a new map, loading a saved game, or otherwise modifying the game state.
Actual result
On the ninth time that you create a new world, load a saved game, or otherwise modify the gamemode, the game crashes hard. Note that the exact crash is different depending on the last game-mode-modifying action you took, but there are two similar crash logs that account for all situations mentioned below.
Crash log for the hard crash (no error message)
Crash log for the crash with the error message
Steps to reproduce
Create a new world, load a saved game, start scenario editor, connect to or (re)start a server, return to the title screen, or otherwise modify the game mode 9 times. The 1st through 8th attempts will go through, but the 9th attempt crashes with either an E06D7363 error or C0000005 error.
Edit: Just running "rescanai" 9 times or running "rescangame" 18 times is enough to crash the game with this log (should be similar to above).
The text was updated successfully, but these errors were encountered: