[Freeciv-Dev] (PR#8920) bizarre crash
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8920 >
I have no idea why this is happening.
- Apply the attached patch.
- Load the attached savegame.
- Conquer the city.
- End the turn.
The game ends and I get the score screen.
But, if I've loaded the game through the gtk2 conndlg, I instead get a
client crash. The client says it "lost connection to server" and then
it (the client) crashes. This is because it receives some packets
causing a mapview redraw when map.tiles is NULL. Presumably the map
data is deallocated during the disconnect but the client goes on
handling packets.
The most bizarre thing is that if I start the server by hand I don't get
any error. The endgame happens as normal. Valgrind shows no errors
(other than the normal gzip ones).
#0 fill_tile_sprite_array (sprs=0xbfffe970, solid_bg=0xbfffe963,
bg_color=0xbfffe964, map_x=24, map_y=16, citymode=false) at
tilespec.c:2171
#1 0x080b7d76 in pixmap_put_tile_iso (pm=0x838b7b0, x=24, y=16,
canvas_x=-1,
canvas_y=-22, citymode=0, offset_x=0, offset_y=16, offset_y_unit=32,
width=64, height=16, height_unit=16, draw=D_B_LR) at mapview.c:1055
#2 0x080b67c0 in put_one_tile_iso (pcanvas=0x16ec0, map_x=93888,
map_y=93888,
canvas_x=93888, canvas_y=93888, offset_x=93888, offset_y=93888,
offset_y_unit=93888, width=93888, height=93888, height_unit=93888,
draw=93888) at mapview.c:427
#3 0x0807d1fe in put_tile_iso (map_x=24, map_y=16, draw=D_B_LR)
at mapview_common.c:1331
#4 0x0807d60c in update_map_canvas (canvas_x=0, canvas_y=0, width=510,
height=404) at mapview_common.c:1404
#5 0x0807dd82 in update_map_canvas_visible () at mapview_common.c:1451
#6 0x080b6938 in update_city_descriptions () at mapview.c:500
#7 0x0807f06d in unqueue_mapview_updates () at mapview_common.c:2004
#8 0x0807147c in input_from_server_till_request_got_processed (fd=93888,
expected_request_id=18) at clinet.c:388
#9 0x0806e416 in wait_till_request_got_processed (request_id=93888)
at civclient.c:497
#10 0x0812aef1 in wait_for_requests (
agent_name=0x16ec0 <Address 0x16ec0 out of bounds>,
first_request_id=17,
last_request_id=18) at agents.c:763
#11 0x0812c490 in apply_result_on_server (pcity=0x850fc98,
result=0xbffff490)
at cma_core.c:434
#12 0x0812c883 in handle_city (pcity=0x850fc98) at cma_core.c:538
#13 0x0812cbc7 in city_changed (city_id=93888) at cma_core.c:585
#14 0x08129b92 in execute_call (call=0x853df38) at agents.c:211
#15 0x08129c12 in call_handle_methods () at agents.c:247
#16 0x08129c9b in thaw () at agents.c:283
#17 0x0812a2a3 in agents_thaw_hint () at agents.c:447
#18 0x08086dc6 in handle_thaw_hint () at packhand.c:2919
#19 0x08086e47 in client_handle_packet (type=93888, packet=0x0)
at packhand_gen.c:35
#20 0x0806dfc2 in handle_packet_input (packet=0x850fba8, type=3)
at civclient.c:284
#21 0x0807121c in input_from_server (fd=93888) at clinet.c:326
#22 0x080afbd7 in get_net_input (data=0x0, fid=93888,
condition=GDK_INPUT_READ)
at gui_main.c:1451
#23 0x4031630b in gdk_get_show_events () from /usr/lib/libgdk-x11-2.0.so.0
(gdb) p map.tiles
$1 = (struct tile *) 0x0
7a4656ea376d139aee2b70334553fb45 /home/jdorje/error.sav.gz
jason
? error.gz
? orig
? test.gz
Index: client/civclient.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/civclient.c,v
retrieving revision 1.188
diff -u -r1.188 civclient.c
--- client/civclient.c 4 Jun 2004 15:49:59 -0000 1.188
+++ client/civclient.c 6 Jun 2004 05:21:31 -0000
@@ -405,7 +405,6 @@
client_state=newstate;
if (client_state == CLIENT_GAME_RUNNING_STATE) {
- generate_city_map_indices();
load_ruleset_specific_options();
create_event(-1, -1, E_GAME_START, _("Game started."));
update_research(game.player_ptr);
Index: common/map.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/map.c,v
retrieving revision 1.167
diff -u -r1.167 map.c
--- common/map.c 27 May 2004 02:06:52 -0000 1.167
+++ common/map.c 6 Jun 2004 05:21:31 -0000
@@ -262,6 +262,8 @@
whole_map_iterate(x, y) {
tile_init(map_get_tile(x, y));
} whole_map_iterate_end;
+
+ generate_city_map_indices();
}
/***************************************************************
Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.166
diff -u -r1.166 srv_main.c
--- server/srv_main.c 4 Jun 2004 15:49:59 -0000 1.166
+++ server/srv_main.c 6 Jun 2004 05:21:33 -0000
@@ -1566,7 +1566,6 @@
load_rulesets();
/* otherwise rulesets were loaded when savegame was loaded */
}
- generate_city_map_indices();
nations_avail = fc_calloc(game.playable_nation_count, sizeof(int));
nations_used = fc_calloc(game.playable_nation_count, sizeof(int));
error.sav.gz
Description: Unix tar archive
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#8920) bizarre crash,
Jason Short <=
|
|