[Freeciv-Dev] rndCiv error
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
hey guys
im somewhat closer to tracking down one error.
it seems to be in the classical package, and is easily
created by...
bash$ ./rndCiv.pl 4 classical
(gdb) bt
#0 can_player_eventually_build_unit (p=0x81e488c, punittype=0x81ace60)
at unittype.c:502
#1 0x0805a52d in collect_eventually_buildable_targets
(targets=0xbfec1b30, pcity=0x8bceef0, advanced_tech=false)
at climisc.c:796
#2 0x080f21cf in refresh_city_dialog (pcity=0x8bceef0) at citydlg.c:1555
#3 0x080f40c7 in create_city_dialog (pcity=0x8bceef0) at citydlg.c:1294
#4 0x080f41d8 in popup_city_dialog (pcity=0x8bceef0) at citydlg.c:425
#5 0x0807327f in handle_city_packet_common (pcity=0x8bceef0,
is_new=true, popup=true, investigate=false)
at packhand.c:642
#6 0x08073d1a in handle_city_info (packet=0x8ce1800) at packhand.c:563
#7 0x0807408c in client_handle_packet (type=PACKET_PROCESSING_STARTED,
packet=0x8c) at packhand_gen.c:102
#8 0x08057709 in handle_packet_input (packet=0x0, type=21) at
civclient.c:398
#9 0x0805b921 in input_from_server (fd=7) at clinet.c:379
#10 0xb7c5dbe0 in gdk_get_show_events () from /usr/lib/libgdk-x11-2.0.so.0
#11 0xb79af52c in g_vasprintf () from /usr/lib/libglib-2.0.so.0
#12 0xb79888d6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#13 0xb798b996 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#14 0xb798bcb8 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#15 0xb7ddf6d5 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#16 0x08105165 in ui_main (argc=1, argv=0xbfec3684) at gui_main.c:1336
#17 0x08058231 in main (argc=3, argv=0xbfec3684) at civclient.c:355
the program is looping between...
(gdb)
502 while ((punittype = punittype->obsoleted_by) != U_NOT_OBSOLETED) {
(gdb)
503 if (can_player_build_unit_direct(p, punittype)) {
in common/unittype.c
bool can_player_eventually_build_unit(const struct player *p,
const struct unit_type *punittype)
{
CHECK_UNIT_TYPE(punittype);
if (unit_type_flag(punittype, F_NOBUILD)) {
return FALSE;
}
while ((punittype = punittype->obsoleted_by) != U_NOT_OBSOLETED) {
if (can_player_build_unit_direct(p, punittype)) {
return FALSE;
}
}
return TRUE;
}
Aha! Ballista & Catapult obsolete each other - doh, i fix that and the
problem goes away. Hmmmm, this should have been caught by the server
tho', (& it should be caught by rndCiv as well)
with that problem fixed i run a big game
bash$ ./rndCiv.pl -s 180 all
and about turn 60 it fails...
Program received signal SIGSEGV, Segmentation fault.
0x080ffe4a in military_advisor_choose_build (pplayer=0x827a454,
pcity=0x8a79770, choice=0x8a7a0a8)
at advmilitary.c:740
740 if (!walls && best_unit_type->move_type == LAND_MOVING) {
(gdb) bt
#0 0x080ffe4a in military_advisor_choose_build (pplayer=0x827a454,
pcity=0x8a79770, choice=0x8a7a0a8)
at advmilitary.c:740
#1 0x08107077 in ai_manage_cities (pplayer=0x827a454) at aicity.c:1302
#2 0x0810bd5e in ai_do_last_activities (pplayer=0x827a454) at aihand.c:449
#3 0x08051c53 in main_loop () at srv_main.c:692
#4 0x08052439 in srv_main () at srv_main.c:1937
#5 0x0804aa8c in main (argc=3, argv=0xbfc21a84) at civserver.c:256
-banjo
- [Freeciv-Dev] rndCiv error,
banjo <=
|
|