[Freeciv-Dev] [bug #17506] Server segfault in map_change_own_seen() when loading savegame

2011-01-19 Thread Matthias Pfafferodt

Update of bug #17506 (project freeciv):

  Status:  Ready For Test = Fixed  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/bugs/?17506

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #17506] Server segfault in map_change_own_seen() when loading savegame

2011-01-16 Thread Jacob Nevins

URL:
  http://gna.org/bugs/?17506

 Summary: Server segfault in map_change_own_seen() when
loading savegame
 Project: Freeciv
Submitted by: jtn
Submitted on: Sun Jan 16 20:40:41 2011
Category: None
Severity: 4 - Important
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: S2_3 r18960
 Discussion Lock: Any
Operating System: GNU/Linux
 Planned Release: 2.3.0

___

Details:

Reproducible for me with S2_3 r18960 and attached savegame. This savegame was
saved with an earlier version of S2_3 svn (circa 2010-12-16), using the
experimental ruleset.

The backtrace looks very similar to bug #17459, but I haven't investigated
enough, so separate bug for now.

Running on Ubuntu Lucid on amd64. Backtrace from GDB:


#0  map_change_own_seen (pplayer=0x2a88780, ptile=0x297db70,
change=0x7fffb0282050, can_reveal_tiles=value optimized out)
at maphand.c:879
#1  shared_vision_change_seen (pplayer=0x2a88780, ptile=0x297db70,
change=0x7fffb0282050, can_reveal_tiles=value optimized out)
at maphand.c:496
#2  0x0047d0a6 in map_claim_ownership_full (ptile=0x297db70,
powner=0x2a88780, psource=value optimized out, ignore_loss=0x0)
at maphand.c:1590
#3  0x0049c610 in sg_load_map_owner (loading=value optimized out)
at savegame2.c:2530
#4  sg_load_map (loading=value optimized out) at savegame2.c:2111
#5  0x004a4289 in savegame2_load_real (file=value optimized out)
at savegame2.c:598
#6  savegame2_load (file=value optimized out) at savegame2.c:528
#7  0x0041403a in load_command (caller=value optimized out,
filename=value optimized out, check=value optimized out)
at stdinhand.c:3545
#8  0x0040c3e6 in srv_prepare () at srv_main.c:2251
#9  0x0040c504 in srv_main () at srv_main.c:2518
#10 0x00404137 in main (argc=value optimized out,
argv=0x7fffb0284678) at civserver.c:375




___

File Attachments:


---
Date: Sun Jan 16 20:40:41 2011  Name: freeciv-T0211-Y01555-manual.sav.bz2 
Size: 66kB   By: jtn
Savegame which segfaults with S2_3 r18960
http://gna.org/bugs/download.php?file_id=11923

___

Reply to this item at:

  http://gna.org/bugs/?17506

___
  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 #17506] Server segfault in map_change_own_seen() when loading savegame

2011-01-16 Thread Jacob Nevins

Follow-up Comment #1, bug #17506 (project freeciv):

As for bug #17459, this savegame has borders=SEE_INSIDE.

___

Reply to this item at:

  http://gna.org/bugs/?17506

___
  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 #17506] Server segfault in map_change_own_seen() when loading savegame

2011-01-16 Thread Matthias Pfafferodt

Update of bug #17506 (project freeciv):

  Status:None = Ready For Test 
 Assigned to:None = syntron
 Planned Release:   2.3.0 = 2.3.0, 2.4.0   

___

Follow-up Comment #2:

Could you please test the attached patch? For me it fixed the segfault ...

fix server segfault in shared_vision_change_seen()

* move loading of map knowledge before loading of map owner / worked map as
it is needed there
* add an assert in map_get_player_tile() to check if the map was initialised



(file #11924)
___

Additional Item Attachment:

File name: 20110116-fix-server-segfault-in-shared_vision_change_seen.patch
Size:1 KB


___

Reply to this item at:

  http://gna.org/bugs/?17506

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #17506] Server segfault in map_change_own_seen() when loading savegame

2011-01-16 Thread Jacob Nevins

Follow-up Comment #3, bug #17506 (project freeciv):

I'll try your patch. In the meantime:

2.3.0-beta1 (and  S2_3 at the branch point) don't show the problem. A git
bisect run on S2_3 suggests that r18812 (bug #17372) is when the segfaults
started. I haven't looked at the changes at all; does that sound plausible?

___

Reply to this item at:

  http://gna.org/bugs/?17506

___
  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 #17506] Server segfault in map_change_own_seen() when loading savegame

2011-01-16 Thread Matthias Pfafferodt

Follow-up Comment #4, bug #17506 (project freeciv):

 2.3.0-beta1 (and S2_3 at the branch point) don't show the
 problem. A git bisect run on S2_3 suggests that r18812
 (bug #17372) is when the segfaults started. I haven't looked at
 the changes at all; does that sound plausible?

Sounds possible (not tested). The handling of the map knowledge is tricky due
to the fact that there are so much different possibilities to define this
setting in savegames / scenarios


___

Reply to this item at:

  http://gna.org/bugs/?17506

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #17506] Server segfault in map_change_own_seen() when loading savegame

2011-01-16 Thread Matthias Pfafferodt

Follow-up Comment #5, bug #17506 (project freeciv):

 Sounds possible (not tested).

Some background: at the moment there are two types of savegames which use a
different order of loading the data. A previous patch  (bug #17158) fixed new
savegames but broke loading of old savegames. In bug #17372 loading was fixed
for both by moving the loading of map knowledge.

The problem here is, that in this case the map knowledge is needed before it
is loaded. Because there is no error check, the code did try to use a NULL
pointer ... segfault ...

___

Reply to this item at:

  http://gna.org/bugs/?17506

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #17506] Server segfault in map_change_own_seen() when loading savegame

2011-01-16 Thread Jacob Nevins

Follow-up Comment #6, bug #17506 (project freeciv):

I confirm that your patch fixes the segfault for me, thanks.

___

Reply to this item at:

  http://gna.org/bugs/?17506

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev