omf2097 / openomf

One Must Fall 2097 Remake
http://www.openomf.org
MIT License
362 stars 35 forks source link

Crash when attempting to cancel network connection #321

Closed katajakasa closed 7 years ago

katajakasa commented 8 years ago

When connecting to another game via the network menu, both attempting to cancel or closing the game entirely will crash the game.

Cancelling:

(gdb) bt
#0  0x000000000044d085 in enet_list_remove ()
#1  0x000000000044f356 in enet_protocol_dispatch_incoming_commands ()
#2  0x0000000000453708 in enet_host_service ()
#3  0x000000000043f799 in net_controller_tick (ctrl=0x6002820, ticks=4428, ev=0x6002858) 
    at C:/msys64/home/Tuomas/omf/openomf/src/controller/net_controller.c:93
#4  0x000000000043e07a in controller_tick (ctrl=0x6002820, ticks=4428, ev=0x6002858) 
    at C:/msys64/home/Tuomas/omf/openomf/src/controller/controller.c:102
#5  0x000000000043a132 in game_state_tick_controllers (gs=0x5f98930)
    at C:/msys64/home/Tuomas/omf/openomf/src/game/game_state.c:562
#6  0x0000000000443734 in engine_run (init_flags=0x24fc80)
    at C:/msys64/home/Tuomas/omf/openomf/src/engine.c:250
#7  0x000000000044426c in SDL_main (argc=1, argv=0x290010)
    at C:/msys64/home/Tuomas/omf/openomf/src/main.c:221
#8  0x0000000000445a9a in console_main ()
#9  0x0000000000445b51 in WinMain ()
#10 0x00000000004013ed in __tmainCRTStartup ()
    at C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:332
#11 0x000000000040152b in mainCRTStartup ()
    at C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:212

Quitting:

(gdb) bt
#0  0x000000000044c563 in enet_host_destroy ()
#1  0x000000000043f3dc in net_controller_free (ctrl=0x6d6cdd0)
    at C:/msys64/home/Tuomas/omf/openomf/src/controller/net_controller.c:82
#2  0x000000000043b831 in game_player_set_ctrl (gp=0x6139e80, ctrl=0x0)
    at C:/msys64/home/Tuomas/omf/openomf/src/game/game_player.c:42
#3  0x000000000043ae99 in game_state_free (gs=0x6178910)
    at C:/msys64/home/Tuomas/omf/openomf/src/game/game_state.c:859
#4  0x000000000044392c in engine_run (init_flags=0x24fc80)
    at C:/msys64/home/Tuomas/omf/openomf/src/engine.c:332
#5  0x000000000044426c in SDL_main (argc=1, argv=0x2c0010)
    at C:/msys64/home/Tuomas/omf/openomf/src/main.c:221
#6  0x0000000000445a9a in console_main ()
#7  0x0000000000445b51 in WinMain ()
#8  0x00000000004013ed in __tmainCRTStartup ()
    at C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:332
#9  0x000000000040152b in mainCRTStartup ()
    at C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:212
katajakasa commented 7 years ago

This should be fixed with 7bc17baaa370727dedb31d618e165b7e15a152c3, closing