-
Notifications
You must be signed in to change notification settings - Fork 41
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
Crash when loading scenario (after previously quitting scenario) #683
Comments
I can at least reproduce the long loading time. Fixing that first..; |
I can confirm the crash happens with Alpha 8 as well. I noticed that on one occasion, after leaving a game, when I clicked on the Scenario list the game-server of the old game (the one I'd just left) appeared momentarily before the crash. Perhaps it is some sort of error involved with making a new server when the previous one is still running? |
I have a fix for the crash, now looking at the performance issue. Do you have many saves in the same folder as the server, or in the |
10 savegames + 50 autosaves. All of the saves are stored in |
More testing showed that the crash only happens if I have clicked on a particular scenario prior to canceling and re-opening the Scenario menu. |
This is right; the problem is that when it reloads the list of scenarios, it starts by erasing the list, which also erases the selection. But the code called when the selection is updated assumes that at least one item is selected. |
The client was crashing when loading a scenario, exiting the game, and trying to go back to the scenario page. The reason was that the list of scenarios is reloaded in this case, and the first time the loading code does is to clear the QListWidget holding the list of scenarios. This propagated to the "selection changed" callback that was trying to access the (nonexistant) first selected item, resulting in a crash. The fix is to check that there's something selected before trying to use it. See longturn#683.
The delay when loading the list is most likely related to the server starting in the background. |
The client was crashing when loading a scenario, exiting the game, and trying to go back to the scenario page. The reason was that the list of scenarios is reloaded in this case, and the first time the loading code does is to clear the QListWidget holding the list of scenarios. This propagated to the "selection changed" callback that was trying to access the (nonexistant) first selected item, resulting in a crash. The fix is to check that there's something selected before trying to use it. See #683.
The client was crashing when loading a scenario, exiting the game, and trying to go back to the scenario page. The reason was that the list of scenarios is reloaded in this case, and the first time the loading code does is to clear the QListWidget holding the list of scenarios. This propagated to the "selection changed" callback that was trying to access the (nonexistant) first selected item, resulting in a crash. The fix is to check that there's something selected before trying to use it. See longturn#683.
Describe the bug
If you load a scenario, then disconnect or otherwise leave the game, when you try to load a scenario again, the program crashes.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The menu of scenarios should show up a second time, this being the function of the "Start Scenario" button.
Screenshots
How do you show a picture of something crashing?
Platform and version (please complete the following information):
Additional context
"Start Scenario Game" seems to take a fairly long time to load up the menu showing all the scenarios. Could this perhaps be related?
The text was updated successfully, but these errors were encountered: