Re: [Freeciv-Dev] (PR#40517) Can't load savegames in 2.2
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40517 Hello, this looks a bit different, so maybe this is of help for you: [EMAIL PROTECTED]:~$ file .freeciv/saves/Afrika-0075m.sav.gz .freeciv/saves/Afrika-0075m.sav.gz: gzip compressed data, from Unix [EMAIL PROTECTED]:~$ zless .freeciv/saves/Afrika-0075m.sav.gz [EMAIL PROTECTED]:~$ civserver -f .freeciv/saves/Afrika-0075m.sav.gz Freeciv Version 2.1.99-test Server Weitere Informationen zu Freeciv finden Sie auf http://www.freeciv.org/. 2: Lade Regelsätze 2: AI*0 ist als KI-Spieler mit dem Level 'Fortgeschritten' dazu gekommen. 2: AI*1 ist als KI-Spieler mit dem Level 'Fortgeschritten' dazu gekommen. 2: AI*2 ist als KI-Spieler mit dem Level 'Fortgeschritten' dazu gekommen. 0: Detected fatal error in savegame.c line 303: 0: Unknown ascii value for num: '?' 63 civserver: shared.c:772: real_die: Zusicherung »0« nicht erfüllt. Abgebrochen (core dumped) [EMAIL PROTECTED]:~$ gdb civserver -c core GNU gdb 6.4.90-debian Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i486-linux-gnu...Using host libthread_db library /lib/tls/i686/cmov/libthread_db.so.1. warning: Can't read pathname for load map: Eingabe-/Ausgabefehler. Reading symbols from /lib/libreadline.so.5...done. Loaded symbols for /lib/libreadline.so.5 Reading symbols from /lib/tls/i686/cmov/libm.so.6...done. Loaded symbols for /lib/tls/i686/cmov/libm.so.6 Reading symbols from /usr/lib/libz.so.1...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /lib/tls/i686/cmov/libc.so.6...done. Loaded symbols for /lib/tls/i686/cmov/libc.so.6 Reading symbols from /lib/libncurses.so.5...done. Loaded symbols for /lib/libncurses.so.5 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done. Loaded symbols for /lib/tls/i686/cmov/libdl.so.2 Core was generated by `civserver -f .freeciv/saves/Afrika-0075m.sav.gz'. Program terminated with signal 6, Aborted. #0 0xb7f64410 in ?? () (gdb) bt full #0 0xb7f64410 in ?? () No symbol table info available. #1 0xbfcc2c28 in ?? () No symbol table info available. #2 0x0006 in ?? () No symbol table info available. #3 0x335b in ?? () No symbol table info available. #4 0xb7dd9811 in raise () from /lib/tls/i686/cmov/libc.so.6 No symbol table info available. #5 0xb7ddafb9 in abort () from /lib/tls/i686/cmov/libc.so.6 No symbol table info available. #6 0xb7dd2fbf in __assert_fail () from /lib/tls/i686/cmov/libc.so.6 No symbol table info available. #7 0x0804dfad in real_die (file=0x818ebfd savegame.c, line=303, format=0x81920bc Unknown ascii value for num: '%c' %d) at shared.c:772 ap = 0xbfcc2ddc ? __PRETTY_FUNCTION__ = real_die #8 0x080ffe9e in player_load_units (plr=0x82adec8, plrno=0, #file=0xbfcc53d0, savefile_options=0x82d9468 attributes client_worklists #diplchance_percent embassies improvement_order known32fix map_editor orders resources rulesetdir rulesets spacerace2 startoptions startunits #technology_order turn turn_las..., base_order=0x85c7418) at savegame.c:303 order = (struct unit_order *) 0x84b1f70 pbase = value optimized out orders_buf = 0x830c8f0 m dir_buf = value optimized out act_buf = value optimized out base_buf = 0x830c998 ? len = 5 nunits = 37 i = 0 j = 0 activity = value optimized out #9 0x08104be5 in game_load_internal (file=0xbfcc53d0) at savegame.c:4583 p = 0x830bea9 j = value optimized out named = player0.c15.name\000\000\032\b\034\226۷�*-\bH)- past = (struct player *) 0x0 kind = value optimized out id = value optimized out k = value optimized out ---Type return to continue, or q return to quit--- ncities = 16 name = value optimized out i = 16 n = 0 pplayer = (struct player *) 0x82adec8 i = value optimized out k = value optimized out rstate = {v = {3483144510, 4149434778, 616945146, 3983220155, 2524127079, 4245523835, 58694983, 2502313567, 1632024145, 622805316, 3220350491, 2643454244, 4225382234, 4088774264, 2182431222, 3232741472, 3639874635, 2182188660, 287460, 237971662, 1143670015, 2844288896, 3741617436, 2179684885, 327247759, 2227991261, 800633405, 2585865354, 3117939903, 3117430286, 2619047182, 2966979254, 1453378170, 1367937921, 615603337, 1043026935, 584316410, 1279935614, 3511316146, 1226841590, 2134732736, 42320694, 661506010, 3919593762, 2269939074, 39015563, 2487614338, 3050839058, 1949631683, 3093259531, 2124711708, 3740016727, 3828366745, 898243122,
Re: [Freeciv-Dev] (PR#40517) Can't load savegames in 2.2
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40517 me wrote on Oct 11, 13:05 (-0700): this looks a bit different, so maybe this is of help for you: civserver: shared.c:772: real_die: Zusicherung »0« nicht erfüllt. Abgebrochen (core dumped) sorry if this is old news for you, I haven't followed the discussion. civclient can't load games because of confusion with the name: chris: '/load /home/chris/.freeciv/saves/Afrika-0075m.sav' 3: sending packet type=PACKET_CHAT_MSG(18) len=62 3: Could not find readable file /home/chris/.freeciv/saves/Afrika-0075m.sav.sav in data path. 3: Could not find readable file /home/chris/.freeciv/saves/Afrika-0075m.sav.sav.gz in data path. 3: Could not find readable file scenario//home/chris/.freeciv/saves/Afrika-0075m.sav.sav in data path. 3: Could not find readable file scenario//home/chris/.freeciv/saves/Afrika-0075m.sav.sav.gz in data path. or chris: '/load /home/chris/.freeciv/saves/Afrika-0075.sav.' 3: sending packet type=PACKET_CHAT_MSG(18) len=62 3: Could not find readable file /home/chris/.freeciv/saves/Afrika-0075.sav..sav in data path. 3: Could not find readable file /home/chris/.freeciv/saves/Afrika-0075.sav..sav.gz in data path. 3: Could not find readable file scenario//home/chris/.freeciv/saves/Afrika-0075.sav..sav in data path. 3: Could not find readable file scenario//home/chris/.freeciv/saves/Afrika-0075.sav..sav.gz in data path. Some of these games can be loaded and played with civserver -f ..., some others not. I have: Afrika-0050m.sav.gz Afrika-0050.sav.gz Afrika-0075m.sav.gz Afrika-0075.sav.gz The manually saved games can't be loaded with civserver -f ..., the others can. This is a pattern. If you need saves, logs, dumps, tell me. HTH, Christian -- Christian Knoke* * *http://cknoke.de * * * * * * * * * Ceterum censeo Microsoft esse dividendum. ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#40525) unit report
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40525 SVN 11 OCT 2008 2.1.99 GTK+ I have 3 living workers in my game, save game says so as well, but the unit report only shows 1 active worker. The other numbers are correkt. What happened (some turns) before is, an ironclad knocked some of them down. I have log and civserver core file avail. Christian -- Christian Knoke* * *http://cknoke.de * * * * * * * * * Ceterum censeo Microsoft esse dividendum. ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#40525) unit report
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40525 2008/10/12 Christian Knoke: I have 3 living workers in my game, save game says so as well, but the unit report only shows 1 active worker. The other numbers are correkt. I've seen this too, and I think most likely units with no homecity are not counted. Do you still have two of the initial workers? - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#40525) unit report
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40525 Christian Knoke wrote on Oct 11, 14:50 (-0700): SVN 11 OCT 2008 2.1.99 GTK+ I have 3 living workers in my game, save game says so as well, but the unit report only shows 1 active worker. The other numbers are correkt. Reloading the save game (with 3 workers) shows 3 workers on map and still only 1 active worker in unit report. attached. Christian -- Christian Knoke* * *http://cknoke.de * * * * * * * * * Ceterum censeo Microsoft esse dividendum. Afrika+0640.sav.gz Description: Binary data ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#40525) unit report
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40525 Du schriebst am 11. Oct um 14:58 Uhr: 2008/10/12 Christian Knoke: I have 3 living workers in my game, save game says so as well, but the unit report only shows 1 active worker. The other numbers are correkt. I've seen this too, and I think most likely units with no homecity are not counted. Do you still have two of the initial workers? That's right, 2 of them have homecity=0 in the save game. Christian -- Christian Knoke* * *http://cknoke.de * * * * * * * * * Ceterum censeo Microsoft esse dividendum. ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#40517) Can't load savegames in 2.2
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40517 [EMAIL PROTECTED] - Fri Oct 10 19:37:34 2008]: On Thu, 9 Oct 2008 Madeline Book wrote: The missing '\0' at the end of base_buf seems to be the main bug; No, all chars after strlen(order_list)-1 aren't processed. So this is just a non-orderliness, which doesn't affect game loading. Since base_buf is allocated on the stack (auto) it contains whatever garbage happened to be there before. Because of the missing assignment of '\0', we end up calling strlen on a non-terminated string (via secfile_insert_str, sbuf_strdup). This will seek ahead in memory (on the stack) until it finds a zero byte that it thinks is the terminator. Best case is that this is inside base_buf already or just past the end of it, but much more likely is that a bunch of random garbage gets saved to the secfile. This is then stored in the savegame and may cause loading to fail (e.g. if the garbage contained delimiters, newlines, etc.). sizeof(base_order) / sizeof(struct base_type *) Since base_order has type struct base_type ** the dividend will always evaluate to the size of a pointer, which is the same as the value of the divisor. So the whole expression will always evaluate to one (which I think is not the desired behaviour). Ooh... but I want to count this as another bug, let's go on with it in another ticket (and with author of this code). I'm guessing that game.control.num_base_types should be used instead, but even so this sounds suspicious since base_order is allocated with size nmod + (4 - (nmod % 4)) where nmod is loaded from the savegame (maybe nmod should be replaced by game.control.num_base_types in the calloc call?). There may be a problem that bases list from savegame can differ from ruleset's one. I guess that game.control.num_base_types is loaded from ruleset (the only place where I can see it changed is in server/ruleset.c). Maybe it would just solve a lot of these problems to have base_order be a specvecstruct base_type * (to borrow c++ template syntax). Then we would have the fast random access of arrays, but also keep the maximum size information that is needed in the place of the sizeof/sizeof expression. [side note] Speaking of nmod, am I right that if nmod % 4 == 0 aligning will add extra four positions? (nmod + 3 - (nmod - 1) % 4) should be nearest alignment, right? Maybe it is nmod + (4 - (nmod % 4) to avoid calloc(0) when nmod is zero. Though you are right that when nmod is divisible by 4 then it adds 4 positions. It still bothers me that we have: base_order = fc_calloc(nmod + (4 - (nmod % 4)), sizeof(*base_order)); for (j = 0; j nmod; j++) { base_order[j] = ... for (; j game.control.num_base_types + (4 - (game.control.num_base_types % 4)); j++) { base_order[j] = NULL; The array base_order is being allocated in terms of nmod, but is assumed to have a size in terms of num_base_types? Sure they would appear to be the same most of the time, but if nmod is less, it would seem to go past the end of the memory for the array. :? --- 目玉をくり抜けば、朝飯前だぞ。 ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#40515) Windows Vista x64 running client 2.1.99 built on 25/09/2008 unable to load save file
URL: http://bugs.freeciv.org/Ticket/Display.html?id=40515 [EMAIL PROTECTED] - Tue Oct 07 01:59:00 2008]: 2008/10/5 Christian Prochaska: The problem is that send_chat_printf() cuts the /load message (and any other message) after 50 characters, so the path gets trunkated. We should 1) Make initial buffer bigger so that message usually fits to it 2) Make buffer dynamically expanding just in case. Even with #40518 making dynamic buffer implementation harder, we can at least make current static buffer bigger. Sorry for not noticing this sooner, but the buffer should probably be of size MAX_LEN_MSG rather than 250 (since this could still be too small in some cases). This ensures that the maximum capacity of the message packet is available for use. --- 私が赤ちゃんであればいいのに。 ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev