[Freeciv-Dev] [bug #21693] server crash
Update of bug #21693 (project freeciv): Status: Ready For Test = Fixed Assigned to:None = cazfi Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/bugs/?21693 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #21693] server crash
Follow-up Comment #6, bug #21693 (project freeciv): Think this might have been caused by patch #4445 (post 2.4.2): when building the autoattack list, unit_survive_autoattack() treats return from can_unit_attack_unit_at_tile() as boolean, but it's now an enum. That's certainly a bug, and almost certainly cause of this particular crash. Checking now, it seems I missed also some other can_unit_attack_unit_at_tile() callers (several in AI) when making patch #4445. File under grepping failures. ___ Reply to this item at: http://gna.org/bugs/?21693 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #21693] server crash
Update of bug #21693 (project freeciv): Status: Confirmed = Ready For Test ___ Follow-up Comment #7: Attached patches fix all the reversed can_unit_attack_...() callers (expecting true (anything but 0) instead of ATT_OK (0)) file #20117 no longer crashes. (file #20164, file #20165) ___ Additional Item Attachment: File name: AttOk.patchSize:6 KB File name: AttOk-S2_4.patch Size:6 KB ___ Reply to this item at: http://gna.org/bugs/?21693 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #21693] server crash
Update of bug #21693 (project freeciv): Status:None = Confirmed Planned Release: = 2.4.3,2.5.0,2.6.0 ___ Reply to this item at: http://gna.org/bugs/?21693 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #21693] server crash
URL: http://gna.org/bugs/?21693 Summary: server crash Project: Freeciv Submitted by: chrisk Submitted on: Mi 19 Feb 2014 12:46:05 CET Category: None Severity: 3 - Normal Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Release: 2.4.2+ Discussion Lock: Any Operating System: GNU/Linux Planned Release: ___ Details: Core was generated by `freeciv-server --debug 0 -f bigger-T0063-Y-0925-auto.sav.bz2'. Program terminated with signal 11, Segmentation fault. #0 get_total_defense_power (attacker=0xa3b64a8, defender=0x0) at combat.c:594 594 return defense_multiplication(unit_type(attacker), unit_type(defender), (gdb) bt #0 get_total_defense_power (attacker=0xa3b64a8, defender=0x0) at combat.c:594 #1 0x0818d621 in unit_win_chance (attacker=0xa3b64a8, defender=0x0) at combat.c:375 #2 0x080941be in compare_units (p1=0xb39c464, q1=0xb39c468) at unittools.c:2715 #3 0xb6ae13bb in ?? () from /lib/i686/cmov/libc.so.6 #4 0xb6ae134a in ?? () from /lib/i686/cmov/libc.so.6 #5 0xb6ae18d1 in qsort_r () from /lib/i686/cmov/libc.so.6 #6 0xb6ae19ce in qsort () from /lib/i686/cmov/libc.so.6 #7 0x08278804 in genlist_sort (pgenlist=0xb4376a8, compar=0x8094170 compare_units) at genlist.c:640 #8 0x08096a86 in unit_list_sort (punit=0xa36c620) at ../utility/speclist.h:471 #9 unit_survive_autoattack (punit=0xa36c620) at unittools.c:2773 #10 0x0809a466 in unit_move (punit=0xa36c620, pdesttile=0x9f02088, move_cost=1) at unittools.c:3285 #11 0x08125305 in unit_move_handling (punit=0xa36c620, pdesttile=0x9f02088, igzoc=value optimized out, move_diplomat_city=false) at unithand.c:1602 #12 0x080978e3 in execute_orders (punit=0xa36c620) at unittools.c:3567 #13 0x080989f8 in update_unit_activity (pplayer=0xa1f4208) at unittools.c:904 #14 update_unit_activities (pplayer=0xa1f4208) at unittools.c:571 #15 0x0807ea4b in begin_phase () at srv_main.c:905 #16 srv_running () at srv_main.c:2254 #17 0x0807f3d0 in srv_main () at srv_main.c:2770 #18 0x0807520f in main (argc=5, argv=0xbf876384) at civserver.c:453 ___ Reply to this item at: http://gna.org/bugs/?21693 ___ Nachricht gesendet von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #21693] server crash
Follow-up Comment #1, bug #21693 (project freeciv): reproducible, savegame attached. press turn done platform: i386 compile options: ./autogen.sh --enable-debug=yes --enable-svnrev --enable-client=all --enable-fcmp=yes --with-readline --with-efence --with-ggz-client --with-ggzconfig=/usr/bin/ggz-config --enable-fcdb=all --enable-ipv6=yes --with-xawrd --enable-mapimg=magickwand run opts: --debug 0 $ freeciv-server -v Encodings: Data=UTF-8, Local=UTF-8, Internal=UTF-8 Freeciv Version 2.4.2+ (modified r24482) Christian (file #20117) ___ Additional Item Attachment: File name: bigger-T0074-Y-0650-test1.sav.bz2 Size:59 KB ___ Reply to this item at: http://gna.org/bugs/?21693 ___ Nachricht gesendet von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #21693] server crash
Follow-up Comment #2, bug #21693 (project freeciv): another backtrace, think this is the same bug get_total_defense_power todays svn w/o options two savegames Christian Spiel begonnen. Der Spieler 'Wang Guangmei' hat jetzt die KI-Spielstärke 'Mogeln'. Der Spieler 'Oscar II' hat jetzt die KI-Spielstärke 'Mogeln'. Der Spieler 'İsmail Enver' hat jetzt die KI-Spielstärke 'Mogeln'. Der Spieler 'Sukarno' hat jetzt die KI-Spielstärke 'Mogeln'. Der Spieler 'Henry Morgan' hat jetzt die KI-Spielstärke 'Mogeln'. Der Spieler 'Genseric' hat jetzt die KI-Spielstärke 'Mogeln'. 1: [freeciv-score.log:6] IDs don't match! game='FA8N21xrzZzWSIJfWJfZCOptv0Oxarvv' scorelog='OpVzBfh003llwWNopibNhf6eRoVA4ZUu' Spiel gespeichert als 'bigger-T0075-Y-0625-auto.sav.bz2' 1: in unit_survive_autoattack() [unittools.c::2784]: assertion '((void *)0) != punit_defender' failed. 1: Bitte berichten Sie diese Fehlermeldung unter http://gna.org/projects/freeciv/ 1: in unit_survive_autoattack() [unittools.c::2784]: assertion '((void *)0) != punit_defender' failed. 1: Bitte berichten Sie diese Fehlermeldung unter http://gna.org/projects/freeciv/ 1: in unit_survive_autoattack() [unittools.c::2784]: assertion '((void *)0) != punit_defender' failed. 1: Bitte berichten Sie diese Fehlermeldung unter http://gna.org/projects/freeciv/ 1: in unit_survive_autoattack() [unittools.c::2784]: assertion '((void *)0) != punit_defender' failed. 1: Bitte berichten Sie diese Fehlermeldung unter http://gna.org/projects/freeciv/ 1: in unit_survive_autoattack() [unittools.c::2784]: assertion '((void *)0) != punit_defender' failed. 1: Bitte berichten Sie diese Fehlermeldung unter http://gna.org/projects/freeciv/ 1: in unit_survive_autoattack() [unittools.c::2784]: assertion '((void *)0) != punit_defender' failed. 1: Bitte berichten Sie diese Fehlermeldung unter http://gna.org/projects/freeciv/ Spiel gespeichert als 'bigger-T0076-Y-0600-auto.sav.bz2' 1: in unit_survive_autoattack() [unittools.c::2784]: assertion '((void *)0) != punit_defender' failed. 1: Bitte berichten Sie diese Fehlermeldung unter http://gna.org/projects/freeciv/ 1: in unit_survive_autoattack() [unittools.c::2784]: assertion '((void *)0) != punit_defender' failed. 1: Bitte berichten Sie diese Fehlermeldung unter http://gna.org/projects/freeciv/ 1: in unit_survive_autoattack() [unittools.c::2784]: assertion '((void *)0) != punit_defender' failed. 1: Bitte berichten Sie diese Fehlermeldung unter http://gna.org/projects/freeciv/ 1: in unit_survive_autoattack() [unittools.c::2784]: assertion '((void *)0) != punit_defender' failed. 1: Bitte berichten Sie diese Fehlermeldung unter http://gna.org/projects/freeciv/ Spiel gespeichert als 'bigger-T0077-Y-0575-auto.sav.bz2' Speicherzugriffsfehler (Speicherabzug geschrieben) chris@leo:~/freeciv/play$ gdb freeciv-server -core core GNU gdb (GDB) 7.0.1-debian warning: Can't read pathname for load map: Eingabe-/Ausgabefehler. Core was generated by `freeciv-server -f bigger-T0074-Y-0650-manual.sav.bz2'. Program terminated with signal 11, Segmentation fault. #0 get_total_defense_power (attacker=0xab50a68, defender=0x0) at combat.c:594 594 return defense_multiplication(unit_type(attacker), unit_type(defender), (gdb) bt #0 get_total_defense_power (attacker=0xab50a68, defender=0x0) at combat.c:594 #1 0x08137751 in unit_win_chance (attacker=0xab50a68, defender=0x0) at combat.c:375 #2 0x08067fbe in compare_units (p1=0xae16650, q1=0xae16654) at unittools.c:2715 #3 0xb6e703bb in ?? () from /lib/i686/cmov/libc.so.6 #4 0xb6e708d1 in qsort_r () from /lib/i686/cmov/libc.so.6 #5 0xb6e709ce in qsort () from /lib/i686/cmov/libc.so.6 #6 0x081d58c4 in genlist_sort (pgenlist=0xadea730, compar=0x8067f70 compare_units) at genlist.c:640 #7 0x0806c326 in unit_list_sort (punit=0xadd1c88) at ../utility/speclist.h:471 #8 unit_survive_autoattack (punit=0xadd1c88) at unittools.c:2773 #9 0x0806cc33 in unit_move (punit=0xadd1c88, pdesttile=0xa9ec96c, move_cost=1) at unittools.c:3285 #10 0x080ddbcd in unit_move_handling (punit=0xadd1c88, pdesttile=0xa9ec96c, igzoc=value optimized out, move_diplomat_city=true) at unithand.c:1602 #11 0x080e0d65 in ai_unit_move (punit=0xadd1c88, ptile=0xa9ec96c) at aitools.c:982 #12 0x0807596c in adv_unit_execute_path (punit=0xadd1c88, path=0xbc03b70) at advgoto.c:102 #13 0x08075d09 in adv_follow_path (punit=0xadd1c88, path=0xbc03b70, ptile=0xa9ea738) at advgoto.c:59 #14 0x080e1729 in ai_unit_goto_constrained (punit=0xadd1c88, ptile=0xa9ea738, parameter=0xbf95edc8) at aitools.c:419 #15 0x080e1a47 in ai_unit_goto (punit=0xadd1c88, ptile=0xa9ea738) at aitools.c:690 #16 0x080e2759 in ai_gothere (pplayer=0xa865990, punit=0xadd1c88, dest_tile=0xa9ea738) at aitools.c:282 #17 0x0812164d in dai_auto_settler_run (pplayer=0xa865990, punit=0xadd1c88, state=0xbd0e520) at aisettler.c:1016 #18 0x08074618 in auto_settlers_player (pplayer=0xa865990) at autosettlers.c:715 #19 0x0804f564 in end_phase () at srv_main.c:1007 #20
[Freeciv-Dev] [bug #21693] server crash
Update of bug #21693 (project freeciv): Category:None = general Priority: 5 - Normal = 7 - High Release: 2.4.2+ = 2.4.2+,2.5.99 ___ Reply to this item at: http://gna.org/bugs/?21693 ___ Nachricht gesendet von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #21693] server crash
Follow-up Comment #3, bug #21693 (project freeciv): Both backtraces show unit_survive_autoattack() so I take it you have autoattack enabled, and that's relevant. ___ Reply to this item at: http://gna.org/bugs/?21693 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #21693] server crash
Follow-up Comment #4, bug #21693 (project freeciv): So. I can continue my game. Yes. Christian ___ Reply to this item at: http://gna.org/bugs/?21693 ___ Nachricht gesendet von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #21693] server crash
Follow-up Comment #5, bug #21693 (project freeciv): Reproduced with S2_4 r24519 from file #20117 (haven't tried the others). Moving unit is Willy Brandt's Archers [l tgt=unit id=274/], into Dortmund. Server is considering autoattack from pirates in boat adjacent to city. In my case it's trying to work out which of Musketeers [l tgt=unit id=393/] and Barbarian Leader [l tgt=unit id=394/] is the better attacker. But neither can attack from boats so get_defender() returns NULL, which compare_units() isn't prepared for. Think this might have been caused by patch #4445 (post 2.4.2): when building the autoattack list, unit_survive_autoattack() treats return from can_unit_attack_unit_at_tile() as boolean, but it's now an enum. (In passing: I think the return from can_unit_attack_any_at_tile() is now different if passed the empty list?) ___ Reply to this item at: http://gna.org/bugs/?21693 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev