bugFreeciv - Bugs: bug #21327, Savegame with player researching...

 
 
Show feedback again

bug #21327: Savegame with player researching already-known tech causes trouble

Submitted by:  Jamie Troini <nimrod>
Submitted on:  Wed Dec 4 16:34:05 2013  
 
Category: clientSeverity: 2 - Minor
Priority: 5 - NormalStatus: Fixed
Assigned to: pepeto <pepeto>Open/Closed: Closed
Release: 2.4.1Operating System: Any
Planned Release: 2.4.4, 2.5.0, 2.6.0Contains string changes: None

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)

Tue Sep 2 07:07:34 2014, SVN revision 26179:

Check whether the researching technology and technologic goal are legal
when loading a savegame. In case they weren't, set them to A_UNSET after
broadcasting an error message.

Reported by Jamie Troini
Analysis by Jacob Nevins

See gna bug #21327

(Browse SVN revision 26179)

pepeto <pepeto>
Project MemberIn charge of this item.
Tue Sep 2 07:07:30 2014, SVN revision 26178:

Check whether the researching technology and technologic goal are legal
when loading a savegame. In case they weren't, set them to A_UNSET after
broadcasting an error message.

Reported by Jamie Troini
Analysis by Jacob Nevins

See gna bug #21327

(Browse SVN revision 26178)

pepeto <pepeto>
Project MemberIn charge of this item.
Tue Sep 2 07:07:25 2014, SVN revision 26177:

Check whether the researching technology and technologic goal are legal
when loading a savegame. In case they weren't, set them to A_UNSET after
broadcasting an error message.

Reported by Jamie Troini
Analysis by Jacob Nevins

See gna bug #21327

(Browse SVN revision 26177)

pepeto <pepeto>
Project MemberIn charge of this item.
Sun Aug 31 17:13:38 2014, comment #6:

Fix attached: error message + repairing

(file #21966, file #21967, file #21968)

pepeto <pepeto>
Project MemberIn charge of this item.
Sat Dec 7 10:56:20 2013, comment #5:

> Anyhow, much of the work was done using the built-in Editor.
> However, some repetitive tasks such as copying techs for a large
> number of nations was much easier to accomplish by editing the
> sav game file offline using a text editor.

Right, that explains how a savegame ended up with this inconsistency.
(Experimenting with the editor suggests that it can't cause this situation.)

We could make savegame loading robust about this sort of thing (or at least bomb out with a clearer error message).

Jacob Nevins <jtn>
Project Administrator
Thu Dec 5 21:14:26 2013, comment #4:

Good news!

That did the trick. Re-edited the save file and removed inconsistencies pertaining to researching techs that are already discovered. Saved the file.

Re-loaded the sav file in the client, and voila! It worked. No more error messages, and the game runs smoothly.

Thanks Jacob! You guys are the bmomb :)

Jamie Troini <nimrod>
Thu Dec 5 15:00:41 2013, comment #3:

Hi Jacob,

Thanks for looking into this issue. It's actually my 2nd scenario (first one being a WW1 recreation used in GT07) and funny enough, it's actually much simpler than the previous one!

Yes the techs are on purpose. The finishing touches haven't been put in place yet (like Scenario description, Game Year, etc..), because I wanted to test play it a bit before submitting it to Davide Baldini for production.

This particular scenario will attempt to recreate the Colonizing efforts of the Europeans. The game year will be set to around 1450 AD. Players will take over a given "advanced" nation (such as the British), while the AI will control all the "aboriginal" nations which are already established on the various continents (America, Africa & Oceania). Eurasia is completely removed from the map.

Anyhow, much of the work was done using the built-in Editor. However, some repetitive tasks such as copying techs for a large number of nations was much easier to accomplish by editing the sav game file offline using a text editor.

I'll open up the sav file and verify all the research goals to eliminate the Masonry inconsistency. Hopefully that should resolve the problem. I'll report my results here.

Thanks again! - Nimmy.

Jamie Troini <nimrod>
Thu Dec 5 01:16:20 2013, comment #2:

Looking at the first assertion failure with gdb, I think the problem is that in the savefile, the British are shown as researching Masonry when they already have it. The assertion failure occurs in found_new_tech().

Lots of players have highly advanced tech despite it being T0; I assume this is part of the scenario. Did you grant various players their techs in the editor, or some other way?

I'm wondering if we need to change research goal when granting techs in the editor (and handle this in old savefiles).

Jacob Nevins <jtn>
Project Administrator
Thu Dec 5 00:37:23 2013, comment #1:

Reproduced (although for me, the server dies with a segfault after emitting all those assertion failures).

Jacob Nevins <jtn>
Project Administrator
Wed Dec 4 16:34:05 2013, original submission:

Hello Freeciv Folks!

I am currently working a custom-built scenario for a freeciv game to be played on GreatTurn.org (GT08...go live in Jan. 2014).

Most of the work is nearly complete, however when I try to test the scenario I receive the following error message after initiating a turn change (clicking the "turn done" button):

"Please report this message at http://gna.org/projects/freeciv/
[11:06:48] in found_new_tech() [../../../../server/techtools.c::281]: assertion 'tech_found == (200-2) || (vap && player_invention_state(plr, tech_found) != TECH_KNOWN)'"

This message is displayed over 100 times in the chat window. Not only that, but the game seems to freeze. The state of the nation that I'm controlling shows up as "Done", however the turn cycle never increments up from turn 0 to turn 1. It just sits there, oddly enough.

I've attached a save for your review. Sadly, the client crashes when I try to save after the error messages are displayed. So the file is a manual save just prior to turn change. Just load up the save file and try to cycle a turn, you'll generate the errors every time ;)

Please advise! I'd hate to have to start over from scratch... map editing is pretty tedious, although it's a lot better than it used to be :)

Cheers!

Nimmy

Jamie Troini <nimrod>

 

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

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Digest:
   patch dependencies.

 

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

    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.

     

    Error: not logged in

     

     

    Follow 16 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Sep 2 07:07:48 2014pepetoStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Sun Aug 31 17:13:38 2014pepetoAttached File-=>Added trunk_savegame_load_research_check.patch, #21966
      Attached File-=>Added S2_5_savegame_load_research_check.patch, #21967
      Attached File-=>Added S2_4_savegame_load_research_check.patch, #21968
      StatusConfirmed=>Ready For Test
      Operating SystemMicrosoft Windows=>Any
      Planned Release=>2.4.4, 2.5.0, 2.6.0
    Thu Aug 28 18:17:53 2014pepetoAssigned toNone=>pepeto
    Sat Dec 7 10:56:43 2013jtnSummarySavegame with player researched already-known tech causes trouble=>Savegame with player researching already-known tech causes trouble
    Sat Dec 7 10:56:20 2013jtnSeverity4 - Important=>2 - Minor
      SummaryAssertion Error in Scenario design=>Savegame with player researched already-known tech causes trouble
    Thu Dec 5 17:23:47 2013davide_at_debianCarbon-Copy-=>Added -unavailable-
    Thu Dec 5 00:37:23 2013jtnStatusNone=>Confirmed
    Wed Dec 4 16:34:05 2013nimrodAttached File-=>Added freeciv-T0000-Y-4000-manual.sav.bz2, #19418
      Carbon-Copy-=>Added -unavailable-
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup