[Freeciv-Dev] (PR#3411) Core dump with sdl client
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients:; |
Subject: |
[Freeciv-Dev] (PR#3411) Core dump with sdl client |
From: |
"Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx> |
Date: |
Thu, 13 Feb 2003 03:12:36 -0800 |
With the attached patch I get this:
(gdb) bt
#0 0x402550a1 in kill () from /lib/libc.so.6
#1 0x4009dfe6 in raise () from /lib/libpthread.so.0
#2 0x40256364 in abort () from /lib/libc.so.6
#3 0x4024f15d in __assert_fail () from /lib/libc.so.6
#4 0x0809f068 in get_player_city_style () at city.c:1174
#5 0x080640d1 in get_city_occupied_sprite (pcity=0x0) at tilespec.c:1141
#6 0x080642f8 in fill_city_sprite_array_iso (sprs=0xbfffec14, pcity=0x846f0c0)
at tilespec.c:1207
#7 0x0808ca55 in put_city_pixmap_draw (pCity=0x0, pDest=0x824d490,
map_x=-5100, map_y=256)
at mapview.c:1309
#8 0x0808d625 in draw_map_cell (pDest=0x824d490, map_x=192, map_y=272,
map_col=61, map_row=30,
citymode=138866880) at mapview.c:1604
#9 0x0808a69a in gui_map_put_tile_iso (map_x=0, map_y=30,
canvas_x=-1073746924, canvas_y=138866880,
offset_x=0, offset_y=0, offset_y_unit=0, width=0, height=0, height_unit=48,
draw=0) at mapview.c:183
#10 0x0805a5ce in put_tile_iso (map_x=61, map_y=30, draw=3221220372) at
mapview_common.c:502
#11 0x0805aa68 in update_map_canvas (x=61, y=30, width=1, height=1,
write_to_screen=false)
at mapview_common.c:562
#12 0x080598fc in refresh_tile_mapcanvas (x=61, y=30, write_to_screen=true) at
mapview_common.c:43
#13 0x0805ca14 in handle_city_packet_common (pcity=0x846f0c0, is_new=true,
popup=false)
at packhand.c:506
#14 0x0805c78f in handle_city_info (packet=0x846ee20) at packhand.c:468
#15 0x0804e464 in handle_packet_input (packet=0x846ee20, type=0) at
civclient.c:311
#16 0x08051a69 in input_from_server (fd=6) at clinet.c:329
#17 0x08082c8c in socket_timer (interval=0, socket=0x0) at gui_main.c:359
#18 0x08082bac in gui_main_loop () at gui_main.c:191
#19 0x08083083 in ui_main (argc=0, argv=0x0) at gui_main.c:549
#20 0x0804de30 in main (argc=1, argv=0xbffff3a4) at civclient.c:240
#21 0x402441c4 in __libc_start_main () from /lib/libc.so.6
(gdb) up 4
#4 0x0809f068 in get_player_city_style () at city.c:1174
1174 style = replace;
(gdb) p style
$1 = 49
(gdb) p game.styles_count
$2 = 7
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
The trick is to keep breathing.
Index: common/city.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/city.c,v
retrieving revision 1.183
diff -u -u -r1.183 city.c
--- common/city.c 2003/02/12 22:22:33 1.183
+++ common/city.c 2003/02/13 11:03:56
@@ -1166,6 +1166,8 @@
style = plr->city_style;
prev = style;
+ assert(style >= 0 && style < game.styles_count);
+
while ( (replace = city_styles[prev].replaced_by) != -1) {
prev = replace;
if (get_invention( plr, city_styles[replace].techreq) == TECH_KNOWN)
- [Freeciv-Dev] (PR#3411) Core dump with sdl client,
Raimar Falke <=
|
|