bugBos Wars - Bugs: bug #35623, On Linux, Local game suddenly...

 
 

bug #35623: On Linux, Local game suddenly starts lagging, can't load saved game

Submitted by:  Andy A <andya1973>
Submitted on:  Fri 24 Feb 2012 10:16:45 PM UTC  
 
Severity: 5 - BlockerItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: François Beerten <feb>Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Sat 22 Feb 2014 09:48:50 PM UTC, comment #5:

Fixed in the development version. Thank you for reporting this bug.

SlotUsage saves a list of units recently released (killed/destroyed/...). It is not related to unit-producing buildings as said in comment #4.

François Beerten <feb>
Project AdministratorIn charge of this item.
Fri 31 May 2013 11:55:48 PM UTC, comment #4:

Introduction: As far as I understand, SlotUsage assigns all units being build to unit-producing buildings, so that a savegame does not load with suddenly canceling all in-progress unit build orders.

Grep-ing the repository for "SlotUsage" leads me to believe that the following tasks need to be done:

1. Change the savegame file format (engine/unit/unit_manager.cpp) and increase the savegame version number. The new format needs to save
SlotUsage(MaxSlot, [{{Slot = Slot1, FreeCycle = Freecycle1}, ..}])
rather than the old, buggy
SlotUsage(MaxSlot, [{Slot = Slot1, FreeCycle = Freecycle1}, ..])
(all parameters after the first get saved inside a table).

2. SlotUsage (engine/unit/script_unit.cpp) needs to be adapted to handle a table as the second argument and process its entries the way it processed all arguments but the first.

3. Update documentation (doc/scripts/savegame.html).

4. Create a handler for old format savegames. Here is some pseudo code that might do the trick, if possible:

savegame_code = import(savegamefile)
for line in lines_that_contain(savegame_code, "SlotUsage")
tmp = savegame_code.replace_first_occurence("{", "{{")
fixed_savegame_code = tmp.replace_last_occurence("}", "}}")

execute(fixed_savegame_code)

In any case I recommend to never overwrite savegames while loading them. It would also be acceptable to not provide backwards-compatibility. Perhaps some decision on that havs been made in the past.

Unfortunately I have no C programming experience. Hopefully this summary is correct and will make it easier to get into the

Iwan Gabovitch <qubodup>
Sun 05 Aug 2012 07:22:07 PM UTC, comment #3:

I've noticed this both on the Linux version and on the Windows versions. Especially when using the 4on4 map. The lag can be repeatably triggered by using the nuclear missile silo. (it occurs at other times randomly) But, after a nuke hits, it triggers a massive slowdown that can take several minutes to recover from. I've seen this on boxes as small as P4 3.2G w/2G of RAM and on faster boxes (Phenom 9850 Quad-Core w/8G) It is not system related, but code related. Some race condition happens that causes the slow-down regardless of hardware resources available. I have also experienced this with the last stable release as well as with executables built from svn code. This slowdown bug has been around for several years. Hope this helps.

David <drankinatty>
Wed 07 Mar 2012 08:34:58 PM UTC, comment #2:

A game lagging is almost always a problem with the pathfinder trying to reach unreachable destinations.

The error message happens on the call to SlotUsage with 442 arguments. Lua allows only up to 250 or 256 arguments. This needs to be fixed in the next version. Either by using a table or a more efficient representation or both.

Thank you for the bug report.

François Beerten <feb>
Project AdministratorIn charge of this item.
Wed 07 Mar 2012 08:07:49 PM UTC, comment #1:

I faced the same issue (not being to load a saved game). I first wrote about it to bugzilla, so the description is here:
https://bugzilla.redhat.com/show_bug.cgi?id=771857
But then I was advised to write to this bugtracker.
I don't remember if I had lags before the game crash though (many time has passed since I stopped playing due to this bug).

Eugene Smirnoff <slidercrank>
Fri 24 Feb 2012 10:16:45 PM UTC, original submission:

Built on Linux, svn rev 10114

Roughly 45 minutes into the game, terrible lag. I saved the game and exited normally through the menus. Restarted boswars and tried to load the game, received the error message and was kicked back to the command prompt.

[quote]andy@debian:~/src/boswars/svn-cur$ ./boswars -d . -F
Bos Wars V2.6.0, (c) 1998-2010 by the Bos Wars and Stratagus <snip>
(http://www.boswars.org)
Compile options VORBIS THEORA

Bos Wars may
<snip>
damage that might arise from the use of this software.
Use it at your own risk.

[string "/home/andy/.boswars/save/game.sav.gz"]:16925: function or expression too complex near ','
[/quote]

I've attached the game.sav.gz file to this bug report. I built this using "./make.py release"

Linux debian 2.6.32-5-686 #1 SMP Mon Jan 16 16:04:25 UTC 2012 i686 GNU/Linux

Andy A <andya1973>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #25158:  game.sav.gz added by andya1973 (64kB - application/x-gzip)
file #25159:  preferences.lua added by andya1973 (410B - text/x-lua)
file #25160:  log_of_stratagus_0.log added by andya1973 (160kB - text/x-log)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by qubodup (Posted a comment)
  • -unavailable- added by drankinatty (Posted a comment)
  • -unavailable- added by feb (Posted a comment)
  • -unavailable- added by slidercrank (Posted a comment)
  • -unavailable- added by andya1973 (Submitted the item)
  • -unavailable- added by andya1973
  •  

    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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 22 Feb 2014 09:48:50 PM UTCfebStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Wed 07 Mar 2012 08:35:06 PM UTCfebSeverity4 - Important=>5 - Blocker
    Wed 07 Mar 2012 08:34:58 PM UTCfebSeverity3 - Normal=>4 - Important
      StatusNone=>Confirmed
      Assigned toNone=>feb
    Fri 24 Feb 2012 10:16:45 PM UTCandya1973Attached File-=>Added game.sav.gz, #25158
      Attached File-=>Added preferences.lua, #25159
      Attached File-=>Added log_of_stratagus_0.log, #25160
      Carbon-Copy-=>Added andya1973

    Back to the top


    Powered by Savane 3.1-cleanup