[crossfire] gcfclient segfault with -sdl
Bob Tanner
tanner at real-time.com
Thu Feb 3 16:32:34 CST 2005
Debugging a bug report from BTS (debian bug tracking system).
Summary, gcfclient segfaults when invoked with -sdl. I can confirm it.
Crashed at map.c:576 with a segfault.
Backtrace:
#0 0x0806c65f in gtk_draw_map (redraw=0) at map.c:576
#1 0x0806770c in display_map_doneupdate (redraw=0) at gx11.c:5657
#2 0x08071b03 in map1_common (data=0x825f400 "", len=560, rev=1)
at commands.c:1159
#3 0x08071b4b in Map1aCmd (data=0x825f400 "", len=560) at commands.c:1174
#4 0x0806e797 in DoClient (csocket=0x81cc780) at client.c:152
#5 0x080534ea in do_network () at gx11.c:346
#6 0xb7e81cfb in gdk_get_show_events () from /usr/lib/libgdk-1.2.so.0
#7 0x081cc780 in sound_process ()
#8 0x0000000c in ?? ()
#9 0x00000001 in ?? ()
#10 0xb7e664a8 in ?? () from /usr/lib/libglib-1.2.so.0
#11 0x00000000 in ?? ()
#12 0x081e6ff0 in ?? ()
#13 0xbffff5e8 in ?? ()
#14 0xb7e54a56 in g_io_add_watch () from /usr/lib/libglib-1.2.so.0
#15 0xb7e54a56 in g_io_add_watch () from /usr/lib/libglib-1.2.so.0
#16 0xb7e5603d in g_get_current_time () from /usr/lib/libglib-1.2.so.0
#17 0xb7e564f4 in g_get_current_time () from /usr/lib/libglib-1.2.so.0
#18 0xb7e56724 in g_main_run () from /usr/lib/libglib-1.2.so.0
#19 0xb7f4325f in gtk_main () from /usr/lib/libgtk-1.2.so.0
#20 0x080535b3 in event_loop () at gx11.c:401
#21 0x08067e04 in main (argc=4, argv=0xbffff814) at gx11.c:5991
Offending code:
if (the_map.cells[mx][my].heads[layer].face &&
pixmaps[the_map.cells[mx][my].heads[layer].face]->map_image){
The problem is the pixmaps array.
(gdb) p pixmaps
$7 = {0x0 <repeats 10000 times>}
Go to frame 1, this is where I'm confused, code follows:
#if !ALTERNATE_MAP_REDRAW
#ifdef HAVE_SDL
if (use_config[CONFIG_SDL]) sdl_gen_map(redraw);
else
#endif
gtk_draw_map(redraw);
#endif
} /* if updatelock */
Why is gtk_draw_map(redraw) even being invoked? Shouldn't sdl_gen_map(redraw)
be used?
(gdb) p CONFIG_SDL
$8 = 12
(gdb) p use_config[CONFIG_SDL]
$9 = 1
--
Bob Tanner <
tanner at mn-linux.org
> | Phone : (952)943-8700
http://www.mn-linux.org,
Minnesota, Linux | Fax : (952)943-8500
Key fingerprint = AB15 0BDF BCDE 4369 5B42 1973 7CF1 A709 2CC1 B288
More information about the crossfire
mailing list