[DXXR 0.58.1] segfaults on the RPi
#1
Today, I tried to make some .debs of the current rebirth release for raspbian and did some test-playing with the resulting binaries. Unfortunately, I experienced some random segfaults, like this one which happend when I was just killed and the death roll was supposed to start:
Code:
Program received signal SIGSEGV, Segmentation fault.
0x00047b6c in _piggy_page_in (bmp=...) at main/piggy.h:104
104         if ( GameBitmaps[(bmp).index].bm_flags & BM_FLAG_PAGED_OUT ) {
(gdb) bt
#0  0x00047b6c in _piggy_page_in (bmp=...) at main/piggy.h:104
#1  update_cockpits () at main/gamerend.c:411
#2  0x00047d94 in game_render_frame_mono (flip=<optimized out>) at main/gamerend.c:358
#3  0x0004260c in game_handler (wind=<optimized out>, event=<optimized out>, data=<optimized out>)
    at main/game.c:982
#4  0x00018898 in window_send_event (wind=<optimized out>, event=<optimized out>) at arch/sdl/window.c:211
#5  0x000162e4 in event_process () at arch/sdl/event.c:165
#6  0x0005d0f4 in main (argc=<optimized out>, argv=<optimized out>) at main/inferno.c:437
(gdb) p bmp
$1 = {index = 16508}
(gdb) ptype GameBitmap
type = struct _grs_bitmap {
    short int bm_x;
    short int bm_y;
    short int bm_w;
    short int bm_h;
    sbyte bm_type;
    sbyte bm_flags;
    short int bm_rowsize;
    unsigned char *bm_data;
    short unsigned int bm_handle;
    ubyte avg_color;
    fix avg_color_rgb[3];
    sbyte unused;
    struct _grs_bitmap *bm_parent;
    struct _ogl_texture *gltexture;
} [1800]
(gdb) up
#1  update_cockpits () at main/gamerend.c:411
411             PIGGY_PAGE_IN(cockpit_bitmap[PlayerCfg.CockpitMode[1]]);
(gdb) p PlayerCfg.CockpitMode
$10 = {0, 4}
(gdb) p cockpit_bitmap
$11 = {{index = 61}, {index = 62}, {index = 63}, {index = 0}}

Currently, I've no idea how this cockpit mode 4 came into beeing (the PlayerCfg structure itself seems OK), and if this is specific to the RPi code paths or if the different architecture just exposes some other more general bug. (Also note that unlike the default release builds which use -O2, I use -Os for my builds, which I found preferrable on the RPi at least). All I currently know is that these crashes are not easy to reproduce. I will investigate this further during the next days...
"Perfection is attained not when there is nothing more to add, but when there is nothing more to remove." -- Antoine de Saint Exupéry
Reply


Messages In This Thread
[DXXR 0.58.1] segfaults on the RPi - by derhass - 08-10-2013, 06:05 PM
Re: [DXXR 0.58.1] segfaults on the RPi - by zico - 08-10-2013, 06:23 PM
Re: [DXXR 0.58.1] segfaults on the RPi - by Kp - 08-10-2013, 06:28 PM
Re: [DXXR 0.58.1] segfaults on the RPi - by zico - 08-10-2013, 06:57 PM
Re: [DXXR 0.58.1] segfaults on the RPi - by zico - 08-10-2013, 07:49 PM
Re: [DXXR 0.58.1] segfaults on the RPi - by zico - 08-10-2013, 08:32 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)