TemplePlus icon indicating copy to clipboard operation
TemplePlus copied to clipboard

Crash when closing game while in combat

Open shartte opened this issue 9 years ago • 2 comments

When the game is closed while in combat, the game crashes in combat_exit.

Apparently the initiative list is never cleaned up when the map is closed and as such it still contains handles for objects that have already been deallocated.

shartte avatar Feb 15 '16 08:02 shartte

Crash does not happen when quitting to main menu during combat, and then closing the game.

shartte avatar Feb 15 '16 08:02 shartte

This is related to the order of shutdown for game systems. Vanilla map_close accesses game systems that have already been closed during shutdown. In our case, this causes a crash because the game system has been deleted completely. In vanilla, this worked, since everything is just a static function.

shartte avatar Feb 19 '16 10:02 shartte