[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-19 Thread Matthias Pfafferodt
Update of bug #18776 (project freeciv): Status: Ready For Test = In Progress Planned Release: 2.3.1,2.4.0 = 2.3.2,2.4.0 ___ Reply to this item at:

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-18 Thread Matthias Pfafferodt
Follow-up Comment #30, bug #18776 (project freeciv): Last call for 2.3.1 -- I will make the release starting tomorrow morning. I will create a minimal version which does allow the /remove command to work. A hint is comment #21: It does not crash. And i tested it without your previous

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-18 Thread Matthias Pfafferodt
Follow-up Comment #31, bug #18776 (project freeciv): The attached two patches should fix the bug, but (see below) 0005-basic-fix-known-map-in-savegame2.patch - do not use the player_count() but the highest used player slot index - fast fix to be used in 2.3.1 - it only changes the function used

Re: [Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-17 Thread Marko Lindqvist
On 15 November 2011 16:39, Michal Mazurek no-reply.invalid-addr...@gna.org wrote: This part is really perplexing: +verbose+   2782             known[l * MAP_INDEX_SIZE + tile_index(ptile)]   2783               |= (1u (p - l * 8)); -verbose- Suppose there is a player with index 60. p = 60,

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-17 Thread Matthias Pfafferodt
Follow-up Comment #26, bug #18776 (project freeciv): by Marko Lindqvist: I think someone has mixed number of bits and hex values at some point. While we read 8 hex values to known[], here we handle it as bits already, so that 8 should be 32 (p is always 0 to 31 bigger than l*32) I think that

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-17 Thread Michal Mazurek
Follow-up Comment #27, bug #18776 (project freeciv): p = player_index(pplayer); l = player_index(pplayer) / 32; (p - l * 32) Can't we just use modulo here? Won't this break existing save games? If i saved using the '8' code, I cannot load using the '32' code. Well, at least if

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-17 Thread Michal Mazurek
Follow-up Comment #28, bug #18776 (project freeciv): What does this code save anyway? Map tiles without fog of war? Can't this be recreated after /load? ___ Reply to this item at: http://gna.org/bugs/?18776

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-16 Thread Michal Mazurek
Follow-up Comment #21, bug #18776 (project freeciv): It does not crash. And i tested it without your previous patches, the ones with vision - while they might have fixed something they were not the cause of my segfaults. Still, could you help me understand: 1u (p - l * 8), which really means

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-16 Thread Michal Mazurek
Follow-up Comment #22, bug #18776 (project freeciv): I removed half the players in LTeX (idlers). The memory usage dropped by about half. I saved the game then restarted the server, and a turn was made - everything is ok. ___ Reply to

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-16 Thread Matthias Pfafferodt
Follow-up Comment #23, bug #18776 (project freeciv): I removed half the players in LTeX (idlers). The memory usage dropped by about half. I saved the game then restarted the server, and a turn was made - everything is ok. So the last patch fixed it? If this is the case, should both patches be

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-16 Thread Michal Mazurek
Follow-up Comment #24, bug #18776 (project freeciv): [bit] = p - floor(p/32) * 8 which limits it to values between 0 and 31. Does it? p - player index in 0..127. let p = 127. p - floor(p/32) * 8 = 127 - 3 * 8 = 103. I run just this part in a test c program. This is really weird. #include

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-16 Thread Matthias Pfafferodt
Follow-up Comment #25, bug #18776 (project freeciv): Why isn't that 1 just shifted by p % 32? I do not know! I did take the code from the old version, (tried to) understand it and used it in savegame2.c - and it did work! As you say, this seems to be at least strange ...

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-15 Thread Michal Mazurek
Follow-up Comment #19, bug #18776 (project freeciv): The allocated table is not always of constant size: +verbose+ int lines = player_count()/32 + 1; --- ./player.c:640: int player_count(void) ./player.c:641: { ./player.c:642: return player_slots.used_slots; ./player.c:643: } +verbose+ Should

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-15 Thread Matthias Pfafferodt
Follow-up Comment #20, bug #18776 (project freeciv): Thanks for the analyses! Could you test the attached patch? It does not use player_count() but a new function player_slot_max_used_number() which returns the highest used player slot index. Thus, there should be enough memory be allocated.

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-08 Thread Matthias Pfafferodt
Follow-up Comment #18, bug #18776 (project freeciv): any update to the status of this bug? I can not reproduce a segfault with the patch applied. I will commit it for 2.3.1 if there are no comments. ___ Reply to this item at:

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-06 Thread Michal Mazurek
Follow-up Comment #16, bug #18776 (project freeciv): 2785 p = player_index(pplayer); 2786 l = p / 32; 2787 known[l * MAP_INDEX_SIZE + tile_index(ptile)] 2788 |= (1u (p - l * 8)); Are player indexes updated for existing players,

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-06 Thread Matthias Pfafferodt
Follow-up Comment #17, bug #18776 (project freeciv): Are player indexes updated for existing players, after one from the middle is removed? player_index() calls player_number() which calls player_slot_index(); thus, the index of a player does not change if one is removed. Furthermore,

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-05 Thread Michal Mazurek
Follow-up Comment #14, bug #18776 (project freeciv): I applied file #14319 and file #14320. ... /removed 15 players ... /save removed Segmentation fault (core dumped) #0 0x0019925c in sg_save_map_known (saving=0x208c3b000) at savegame2.c:2787 2787known[l *

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-11-05 Thread Matthias Pfafferodt
Follow-up Comment #15, bug #18776 (project freeciv): I did try to reproduce the error with the savegame. I did removed some players and set others to AI. It runs a autogame without problems. So there has to be something else. Di dyou do something else between starting the game, calling remove

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-30 Thread Matthias Pfafferodt
Follow-up Comment #11, bug #18776 (project freeciv): found out after my last message that loading such a savegame is still not possible (see comment #2). There is more to this bug ... ___ Reply to this item at:

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-30 Thread Matthias Pfafferodt
Follow-up Comment #12, bug #18776 (project freeciv): updated patch - remove some duplicated code (file #14319) ___ Additional Item Attachment: File name: 0034-fix-bug-in-player_map_free.patch Size:2 KB

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-30 Thread Matthias Pfafferodt
Follow-up Comment #13, bug #18776 (project freeciv): found out after my last message that loading such a savegame is still not possible (see comment #2). There is more to this bug ... this is fixed in bug #18886 ___ Reply to this item

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-29 Thread Matthias Pfafferodt
Update of bug #18776 (project freeciv): Category:None = general Status:None = Ready For Test Assigned to:None = syntron Planned Release:

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-28 Thread Jacob Nevins
Update of bug #18776 (project freeciv): Planned Release: = 2.3.2,2.4.0 ___ Follow-up Comment #9: Setting 2.3.2 target, although it can go in 2.3.1 if a working patch is ready in time.

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-27 Thread Michal Mazurek
Follow-up Comment #8, bug #18776 (project freeciv): It still crashes, though there were no assertion failures this time. The crash is at TC, apparently during the /save phase. #0 0x001991bc in sg_save_map_known (saving=0x20c060c00) at savegame2.c:2782 2782known[l *

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-26 Thread Matthias Pfafferodt
Follow-up Comment #7, bug #18776 (project freeciv): updated patch (it compiles; test still needed!) (file #14287) ___ Additional Item Attachment: File name: 0040-fix-bug-in-player_map_free.patch Size:1 KB

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-24 Thread Michal Mazurek
Follow-up Comment #5, bug #18776 (project freeciv): Did anyone have a chance to look at this bug? ___ Reply to this item at: http://gna.org/bugs/?18776 ___ Message sent via/by Gna!

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-24 Thread Matthias Pfafferodt
Follow-up Comment #6, bug #18776 (project freeciv): untested possible patch (not even compile tested) ... could you test it with your savegame? (first check if it still crashs - then test with a patched version of the server) (file #14245)

Re: [Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-03 Thread Egor Vyscrebentsov
On Sun, 02 Oct 2011 15:07:05 +0200 Michal Mazurek wrote: I removed around 15 players using the /remove command. The server crashed. I only have a savegame from right before the /removes (which implies the turn change did not get to save). Here is what i got: #0 0x001ab454 in

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-03 Thread Michal Mazurek
Follow-up Comment #3, bug #18776 (project freeciv): Version is S2.3 #0 0x001ab454 in calc_civ_score (pplayer=0x20d084000) at score.c:199 199 pcmap-player[player_index(owner)].landarea++; (gdb) bt full #0 0x001ab454 in calc_civ_score (pplayer=0x20d084000) at

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-03 Thread Egor Vyscrebentsov
Follow-up Comment #4, bug #18776 (project freeciv): Looks to me like game has borders and tile ownership wasn't cleared when player was removed. The only function that (to me) plays with map is player_map_free, and it only removes vision_site. BTW, if player had tiles ownership, there should

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-02 Thread Michal Mazurek
URL: http://gna.org/bugs/?18776 Summary: /remove perhaps faulty Project: Freeciv Submitted by: akfaew Submitted on: Sun Oct 2 13:07:04 2011 Category: None Severity: 3 - Normal Priority: 5

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-02 Thread Michal Mazurek
Follow-up Comment #1, bug #18776 (project freeciv): I managed to recreate the crash. Again I removed the players. ... remove 15 players ... /remove alex pancho 2: Removing player Alex Pancho. Removed player Alex Pancho from the game. /save test Game saved as

[Freeciv-Dev] [bug #18776] /remove perhaps faulty

2011-10-02 Thread Michal Mazurek
Follow-up Comment #2, bug #18776 (project freeciv): After loading test.sav.gz: 1: Player shuffle 22 used two times 1: Failure loading savegame! The savegame cannot be loaded. Complete log: [15:17:ttyp9][longturn@spock:~/server/ltex2.3:11]$ sh ltex2.3.sh test.sav.gz