cxong / cdogs-sdl

Classic overhead run-and-gun game
https://cxong.github.io/cdogs-sdl/
GNU General Public License v2.0
891 stars 114 forks source link

Segfault on multiplayer campaign summary screen #418

Closed ghost closed 8 years ago

ghost commented 8 years ago

....../cdogs-sdl/src/briefing_screens.c:546: MissionSummaryDraw: Assertion `0' failed.

Stack trace:

#0  0x00007f7fa27e7418 in __GI_raise (sig=sig@entry=6)
    at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007f7fa27e901a in __GI_abort () at abort.c:89
#2  0x00007f7fa27dfbd7 in __assert_fail_base (fmt=<optimized out>, 
    assertion=assertion@entry=0x4aed0d "0", 
    file=file@entry=0x4ae9e8 "/home/clemens/Projekte/cdogs-sdl/src/briefing_screens.c", line=line@entry=546, 
    function=function@entry=0x4aee70 <__PRETTY_FUNCTION__.14504> "MissionSummaryDraw") at assert.c:92
#3  0x00007f7fa27dfc82 in __GI___assert_fail (assertion=0x4aed0d "0", 
    file=0x4ae9e8 "/home/clemens/Projekte/cdogs-sdl/src/briefing_screens.c", 
    line=546, 
    function=0x4aee70 <__PRETTY_FUNCTION__.14504> "MissionSummaryDraw")
    at assert.c:101
#4  0x0000000000416b19 in MissionSummaryDraw (menu=0x0, 
    g=0x70e7a0 <gGraphicsDevice>, p=..., size=..., data=0x70e720 <gMission>)
    at /home/clemens/Projekte/cdogs-sdl/src/briefing_screens.c:546
#5  0x000000000041f51f in MenuDisplay (ms=0x7ffd47aa1740)
    at /home/clemens/Projekte/cdogs-sdl/src/menu.c:612
#6  0x000000000041e31a in MenuDraw (data=0x7ffd47aa1740)
    at /home/clemens/Projekte/cdogs-sdl/src/menu.c:200
#7  0x00000000004559db in GameLoop (data=0x7ffd47aa1690)
    at /home/clemens/Projekte/cdogs-sdl/src/cdogs/game_loop.c:132
cxong commented 8 years ago

Can you go back to gdb, and print the value of idx in MissionSummaryDraw? You can do this by repeatedly executing up until you are in that function, then execute print idx

ghost commented 8 years ago

It prints

#4  0x0000000000416b19 in MissionSummaryDraw (menu=0x0, 
    g=0x70e7a0 <gGraphicsDevice>, p=..., size=..., data=0x70e720 <gMission>)
    at /home/clemens/Projekte/cdogs-sdl/src/briefing_screens.c:546
546         CASSERT(false, "not implemented");
(gdb) print idx
$1 = 0
cxong commented 8 years ago

Thanks for catching this, it should be fixed.

ghost commented 8 years ago

Thanks!