Save progress screen pops up when leaving server (causes game crash)
Submitted
When leaving a server sometimes a 'save progress' screen pops up, clicking save or do not save crashes game. Log made on normal version of SE when logging off of the server US7, no plugins.
Fixed with pulsars bugfixes plugin, their bot said
"
- 23:38:23 you exited to the main menu, yes to the save prompt, and the session started unloading in the background.
- During that ~1 second tail, the window close (the X on the title bar) was requested. The close handler (MySandboxGame.Window_OnManualWindowCloseRequest) shows the "Do you want to save your progress?" box when the session is still alive and Sync.IsServer is true. Your US7 client object is disposed mid-unload, and Sync.IsServer (the Sandbox.Game.Multiplayer.Sync shortcut) returns true whenever the multiplayer object is gone, so the check passed and the box was queued.
- 23:38:24.836 the unload finished, MySession.Static became null, and the box appeared on top of the main menu.
- 23:39:20 you clicked it. That box's callback, MySandboxGame.OnSaveWorldMessageBoxCallback, first fires the analytics reports: ReportMinedStats().
- ReportMinedStats() is supposed to bail when there is no session, but its guard also passes when the analytics flag m_isSessionStarted is set. That flag is only cleared when a SessionEnd event is sent, and exit-to-menu never does that (your log has SessionStart at 22:49 and no SessionEnd ever).
- So it went on to GatherMinedStatsData(), which reads MySession.Static.AmountMined with no null check. MySession.Static was null: NullReferenceException, crash. The sibling GatherWorldEndData() does null-check; this one simply doesn't."
Files:
SpaceEngineers_...
I have the same bug
Replies have been locked on this page!