Closed ghost closed 8 years ago
@cxong Also, the editor crashes once I insert a level with:
Program terminated with signal SIGFPE, Arithmetic exception.
#0 ObjAdd (amo=...) at /home/clemens/Projekte/cdogs-sdl/src/cdogs/objs.c:392
392 MapTryMoveTileItem(&gMap, &o->tileItem, Net2Vec2i(amo.Pos));
Please try again; I've added a possible fix
@cxong Thanks! That fixed it, but now I get a crash after finishing the round of a dogfight. When you are at the intermediate score screen and then press enter, it crashes with this stacktrace:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 strlen () at ../sysdeps/x86_64/strlen.S:106
106 ../sysdeps/x86_64/strlen.S: no such file or directory
According to some SO entry it may be that NULL gets passed to strlen, but since strlen is written in assembly, gdb can't make sense of it.
Can you give a full stack trace? I can't tell where in the code that is
@cxong Right, sorry, I completely forgot that is possible.
#0 strlen () at ../sysdeps/x86_64/strlen.S:106
#1 0x000000000041ea16 in MenuCreate (name=0x0, type=MENU_TYPE_BASIC)
at /home/clemens/Projekte/cdogs-sdl/src/menu.c:324
#2 0x0000000000428d28 in WeaponMenuCreate (menu=0x7ffe80712860, numPlayers=2,
player=0, playerUID=0, handlers=0x70d0a0 <gEventHandlers>,
graphics=0x711380 <gGraphicsDevice>)
at /home/clemens/Projekte/cdogs-sdl/src/weapon_menu.c:209
#3 0x00000000004263ad in PlayerEquip ()
at /home/clemens/Projekte/cdogs-sdl/src/prep.c:605
#4 0x0000000000426e94 in Campaign (graphics=0x711380 <gGraphicsDevice>,
co=0x711220 <gCampaign>)
at /home/clemens/Projekte/cdogs-sdl/src/screens.c:170
#5 0x0000000000426c55 in ScreenStart ()
at /home/clemens/Projekte/cdogs-sdl/src/screens.c:106
#6 0x0000000000417335 in MainLoop (creditsDisplayer=0x7ffe80712cd0,
campaigns=0x7ffe80712d10)
at /home/clemens/Projekte/cdogs-sdl/src/cdogs.c:117
#7 0x00000000004198bd in main (argc=1, argv=0x7ffe80714068)
at /home/clemens/Projekte/cdogs-sdl/src/cdogs.c:489
Thanks; please confirm the fix
@cxong Confirmed, thanks for fixing.