[Freeciv-Dev] bug: server core dump when homeless unit opens hut
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I looked through the code a bit to try to track this down, but I couldn't
find the actual bug. This occurred when my initial Explorer moved onto
a hut; at that point, I had no cities (hadn't even moved a Settler yet).
Judging by the line numbers below, it appears that the hut contained
barbarians.
(dbx) where
unnamed block $b185, line 83 in "genlist.c"
genlist_unlink(pgenlist = internal error: assertion failed at line 1091 in file
frame.c
(nil), punlink = 0x201c45d8), line 83 in "genlist.c"
unit_list_unlink(??, ??), line 847 in "unit.c"
unnamed block $b178, line 212 in "game.c"
game_remove_unit(??), line 212 in "game.c"
wipe_unit_spec_safe(??, ??, ??, ??), line 1545 in "unitfunc.c"
wipe_unit_safe(??, ??, ??), line 1554 in "unitfunc.c"
wipe_unit(??, ??), line 1563 in "unitfunc.c"
handle_unit_enter_hut(??), line 686 in "unithand.c"
unnamed block $b155, line 867 in "unithand.c"
handle_unit_move_request(??, ??, ??, ??), line 867 in "unithand.c"
handle_move_unit(??, ??), line 433 in "unithand.c"
handle_packet_input(pconn = (nil), packet = internal error: assertion failed at
line 1091 in file frame.c
(nil), type = 0), line 855 in "civserver.c"
unnamed block $b101, line 145 in "sernet.c"
sniff_packets(), line 145 in "sernet.c"
main(argc = internal error: assertion failed at line 1091 in file frame.c
536913256, argv = internal error: assertion failed at line 1091 in file frame.c
0x00000008), line 425 in "civserver.c"
As far as I can tell, game_remove_unit() never should have called
unit_list_unlink, since player_find_city_by_id() should have returned 0
for this homeless unit. Unfortunately, gdb on this system doesn't
understand the core file, so I had to use dbx to get the stack trace,
and dbx gives some *ugly* error messages and is missing bits of
information....
Anyway, I pretended dbx was gdb and typed "up" a few times, and then
"print pcity" and "print *pcity":
(dbx) print pcity
0xa07ca000
(dbx) print *pcity
warning: Unable to access address 0xa07ca000 from core
(id = -1, owner = -1, x = -1, y = -1, name = "ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ",
[...]
I got lots of -1's, which I won't bother showing.
Interestingly, dbx fills in some of the ?? values above when I use "up"
and "down":
(dbx) up
genlist_unlink(pgenlist = internal error: assertion failed at line 1091 in file
frame.c
0x00000001, punlink = 0x201c45d8), line 83 in "genlist.c"
(dbx) up
unit_list_unlink(This = 0xa07ca000, punit = 0x201c45d8), line 847 in "unit.c"
(dbx) up
unnamed block $b178, line 212 in "game.c"
(dbx) up
game_remove_unit(unit_id = internal error: assertion failed at line 1091 in
file frame.c
0), line 212 in "game.c"
I don't trust what dbx is telling me, though, so I can't really make
much progress on this one. I'll run the server under gdb in the future
whenever I don't forget.... And if I get lucky again and find a visible
hut in my starting position I'll try to get a save game which reproduces
the bug.
- [Freeciv-Dev] bug: server core dump when homeless unit opens hut,
Greg Wooledge <=
|
|