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

Editor crashes when clicking on objective list #317

Closed Wuzzy2 closed 9 years ago

Wuzzy2 commented 9 years ago

Now the editor crashes when I just click on the list of objectives, no matter if it is empty or not.

The editor crashes with this message:

cdogs-sdl-editor: /home/wuzzy/src/cdogs-sdl/cdogs-sdl/src/cdogs/c_array.c:101: CArrayGet: Assertion `idx >= 0 && idx < (int)a->size' failed.

GNU Debugger output:

#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb7cc9297 in raise () from /usr/lib/libc.so.6
#2  0xb7cca8ea in abort () from /usr/lib/libc.so.6
#3  0xb7cc22f7 in __assert_fail_base () from /usr/lib/libc.so.6
#4  0xb7cc237b in __assert_fail () from /usr/lib/libc.so.6
#5  0x0806c731 in CArrayGet (a=0x813dd1c <gCampaign+28>, idx=0) at /home/wuzzy/src/cdogs-sdl/cdogs-sdl/src/cdogs/c_array.c:101
#6  0x0805abdc in MissionDrawObjective (o=0xc2982f8, g=0x813dd80 <gGraphicsDevice>, pos=..., vData=0xc298388)
    at /home/wuzzy/src/cdogs-sdl/cdogs-sdl/src/cdogsed/editor_ui.c:736
#7  0x08062383 in UIObjectDrawAndAddChildren (o=0x0, g=0x6, pos=..., mouse=..., objs=0x8125608 <sDrawObjs>)
    at /home/wuzzy/src/cdogs-sdl/cdogs-sdl/src/cdogsed/ui_object.c:457
#8  0x080630f4 in UIObjectDraw (o=0x0, g=0x813dd80 <gGraphicsDevice>, pos=..., mouse=..., drawObjs=0x8125608 <sDrawObjs>)
    at /home/wuzzy/src/cdogs-sdl/cdogs-sdl/src/cdogsed/ui_object.c:498
#9  0x08053cbc in Display (g=<optimized out>, yc=<optimized out>, result=...)
    at /home/wuzzy/src/cdogs-sdl/cdogs-sdl/src/cdogsed.c:262
#10 EditCampaign () at /home/wuzzy/src/cdogs-sdl/cdogs-sdl/src/cdogsed.c:1115
#11 main (argc=1, argv=0xbffff634) at /home/wuzzy/src/cdogs-sdl/cdogs-sdl/src/cdogsed.c:1230

Version: f7e0523f8c2386c350316f2e975af4aa5be8c038

cxong commented 9 years ago

Oops, sorry you had to try a broken build; fixed a few minutes ago! https://github.com/cxong/cdogs-sdl/commit/c9f5836a90c4c615df24ffd7c8c19894694e0fc9