#641 closed defect (fixed)
Atlas crashes when you "Leave the game" while in the the simulation
Reported by: | dee@earlsoft.co.uk | Owned by: | ben |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 10 |
Component: | Atlas editor | Keywords: | editor, simulation, leave game, crash |
Cc: | Patch: |
Description
I know it's a silly thing to do, but as it let me... :p I ran a simulation and let all my units get killed. When it said I was defeated, I clciked Yes to leave the game and it crashed with: Unhandled access violation reading 0x00000004 Location: Unknown:0 (?) Call stack: 0142DF27 0142CE1F 013AB9C1 013AB9D9 013D795E 013D7988 013BA036
OS Error: 487 attempt to access invalid address.
On showing the message, it immediatly crashes and falls back to the installed debugger.
(Alpha 2 on Windows Vista)
Attachments (2)
Change History (7)
by , 14 years ago
Attachment: | crashlog.txt added |
---|
by , 14 years ago
Attachment: | crashlog.dmp added |
---|
comment:1 by , 14 years ago
Summary: | Atlas crashes when you "exit" after being defeated in a simulation → Atlas crashes when you "Leave the game" while in the the simulation |
---|
comment:2 by , 13 years ago
I'm not entirely certain what we ought to do here (though I expect it shouldn't involve crashing). Maybe disable the exit buttons in the GUI when running inside Atlas? Maybe work like the stop/reset simulation buttons (i.e. revert to editor mode and initial world state)? I guess the latter would be simpler since we wouldn't need to special-case the GUI scripts for editor mode.
comment:3 by , 13 years ago
Looking at how the simulation buttons work, it can't be that simple because they rely on having the game data intact. It seems shortly after exiting the game that data is deleted, causing the null pointer exception. Running initialization again would be required if we wanted to get back to a playable state in Atlas. Seems more complex than having a global variable or API call for the engine GUI that we can use to determine if we're in editor mode when leaveGame() is called. We could have a dialog that says something to the effect of "You are in editor mode: press reset to end simulation and resume editing".
comment:5 by , 12 years ago
Milestone: | Backlog → Alpha 10 |
---|
Solved this for now by handling the Atlas case in the session GUI. The best solution would be making "leave game" equivalent to pressing the simulation Reset button in Atlas, but I think we need a way to send messages from the engine to AtlasUI to do that properly. At least now it shouldn't crash :)
This also happens when you quit from the menu.