bugFreeciv - Bugs: bug #19160, in player_load_units_transporter()...

 
 
Show feedback again

bug #19160: in player_load_units_transporter() [savegame.c::2285]: assertion 'id_trans == -1 || ptrans != ((void *)0)' failed

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Sat 10 Dec 2011 12:48:01 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Jacob Nevins <jtn>Open/Closed: Closed
Release: S2_4 r20638Operating System: Any
Planned Release: 2.4.0,2.5.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 06 Feb 2013 01:05:35 AM UTC, comment #7:

Excellent, thanks for tracking this down.
I confirm my symptom is fixed, and I don't see any further instances of this category of error in the original change that introduced this.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Wed 06 Feb 2013 01:05:18 AM UTC, SVN revision 22290:

Fix assertion failure when loading pre-2.3 savegame with unit on allied
transport.

Fix by pepeto@gna.

See gna bug #19160.

(Browse SVN revision 22290)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Wed 06 Feb 2013 01:05:03 AM UTC, SVN revision 22289:

Fix assertion failure when loading pre-2.3 savegame with unit on allied
transport.

Fix by pepeto@gna.

See gna bug #19160.

(Browse SVN revision 22289)

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Fri 01 Feb 2013 01:35:43 PM UTC, comment #4:

The problem is with allied players, as jacob said. But, units are really all loaded before loading the "transported_by" field. The problem is that in "savegame.c", the code assume the cargo is transported by a unit of the same player. "savegame2.c" is ok. Patch attached.

(file #17090)

pepeto <pepeto>
Project Member
Sat 03 Mar 2012 11:21:28 PM UTC, comment #3:

The problem appears to be do with units on allied transporters.

When the assertion fires, id_unit=414 (Slovenian Musketeers) and id_trans=713 (Cambodian Transport). The Cambodians are after the Slovenians in the savefile.

I'm guessing it's checking transporter consistency after loading each player, rather than all of them (but I haven't looked closer).

It appeared with r20387, patch #2477.

It seems to be specific to savegame.c (not savegame2.c); if I load and re-save the game in 2.3.x, the resulting savefile doesn't trigger the assertion.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sat 10 Dec 2011 04:57:58 PM UTC, comment #2:

I didn't mean to imply that r20638 is the first version that behaves like this -- it just happens to be what I have checked out.

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.
Sat 10 Dec 2011 04:18:09 PM UTC, comment #1:

svn r20638 blongs to bug #18975. I will look into this!

Matthias Pfafferodt <syntron>
Project Member
Sat 10 Dec 2011 12:48:01 AM UTC, original submission:

Starting an S2_4 r20638 server with file #14676 (a S2_2 savegame) gives this assertion failure:

With -F, the backtrace:

Jacob Nevins <jtn>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pepeto (Updated the item)
  • -unavailable- added by syntron (Posted a comment)
  • -unavailable- added by jtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 06 Feb 2013 01:05:35 AM UTCjtnStatusNone=>Fixed
      Assigned toNone=>jtn
      Open/ClosedOpen=>Closed
      Operating SystemGNU/Linux=>Any
      Planned Release2.4.0=>2.4.0,2.5.0
    Fri 01 Feb 2013 01:35:43 PM UTCpepetoAttached File-=>Added load_savegame_transporter.diff, #17090
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup