bugGlobulation 2 - Bugs: bug #18637, default worker counts are...

 
 

bug #18637: default worker counts are misinterpretated for savegames

Submitted by:  Leo Wandersleb <giszmo>
Submitted on:  Sat 30 Dec 2006 03:21:41 AM UTC  
 
Severity: 5 - BlockerStatus: Confirmed
Assigned to: NoneOpen/Closed: Closed
Release: NoneOperating System: None

Add a New Comment(Rich 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 09 Jan 2007 10:25:25 PM UTC, comment #7:

Although the remembered unit counts are not remembered in the savegame, aplying the default values works at least locally.
i suggest to not close this bug before it is tested on the net with differing default values.

Leo Wandersleb <giszmo>
Project Member
Sun 31 Dec 2006 11:40:59 AM UTC, comment #6:

There is something ugly here. There is non settings information stored in Settings::tempUnit and Settings::tempUnitFuture that should be stored to Game instead. Settings::tempUnitFuture is used to set Building::maxUnitWorkingFuture upon launchConstruction() or constructor. A simple cleaner solution would be to pass to launchConstruction the two parameter from the OrderConstruction and not store anything temporary in Settings.

The bug was created by maxUnitWorkingFuture being non initialized when the building is constructed from a stream. I've fixed this by assigning it to one. Please test and close the bug if it works. Please also tell me if you agree I remove those stupid temp variables from settings.

Stephane Magnenat <nct>
Project Administrator
Sun 31 Dec 2006 06:37:19 AM UTC, comment #5:

The variable in question is maxUnitWorkingFuture within building.cpp. This is the variable that decides how many units will be assigned to the building after construction is complete. The savegame system will need to be modified to save this variable to prevent the bugs that occur when a game is saved during construction.

Kevin Clement <donkyhotay>
Project Member
Sat 30 Dec 2006 02:05:49 PM UTC, comment #4:

as games still do crash regularly because of net code instability it is essential to be able to load the auto save game. as this doesn't work i rated up the severity to "blocker".

Leo Wandersleb <giszmo>
Project Member
Sat 30 Dec 2006 10:29:10 AM UTC, comment #3:

This is probably a case of non-initialized variable. I've tried to trace it in the source code. It looks like OrderModifyBuilding should contain the faulty variable. But there is several creation point to this structure and I don't know which one has a problem. We should test this bug using valgrind, but I do not have time now.

Stephane Magnenat <nct>
Project Administrator
Sat 30 Dec 2006 03:45:08 AM UTC, comment #2:

save a game with inns under construction

load it

glob2: Game.cpp:1553: void Game::drawPointBar(int, int, Game::BarOrientation, int, int, Uint8, Uint8, Uint8, int): Assertion `maxLength<65536' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 47298326083840 (LWP 5681)]
0x00002b047e1a707b in raise () from /lib/libc.so.6
(gdb) bt
#0 0x00002b047e1a707b in raise () from /lib/libc.so.6
#1 0x00002b047e1a884e in abort () from /lib/libc.so.6
#2 0x00002b047e1a0af4 in __assert_fail () from /lib/libc.so.6
#3 0x00000000004b317d in Game::drawPointBar ()
#4 0x00000000004b80e7 in Game::drawMap ()
#5 0x00000000004dbec8 in GameGUI::drawAll ()
#6 0x00000000004ae215 in Engine::run ()
#7 0x00000000004ec88a in Glob2::run ()
#8 0x00000000004ecea9 in main ()

Leo Wandersleb <giszmo>
Project Member
Sat 30 Dec 2006 03:40:31 AM UTC, comment #1:

maybe the following has to do with the same topic:

glob2: Game.cpp:1553: void Game::drawPointBar(int, int, Game::BarOrientation, int, int, Uint8, Uint8, Uint8, int): Assertion `maxLength<65536' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 47412574726400 (LWP 5587)]
0x00002b1f17da607b in raise () from /lib/libc.so.6
(gdb)
(gdb) bt
#0 0x00002b1f17da607b in raise () from /lib/libc.so.6
#1 0x00002b1f17da784e in abort () from /lib/libc.so.6
#2 0x00002b1f17d9faf4 in __assert_fail () from /lib/libc.so.6
#3 0x00000000004b317d in Game::drawPointBar ()
#4 0x00000000004b80e7 in Game::drawMap ()
#5 0x00000000004dbec8 in GameGUI::drawAll ()
#6 0x00000000004ae215 in Engine::run ()
#7 0x00000000004ec88a in Glob2::run ()
#8 0x00000000004ecea9 in main ()
(

Leo Wandersleb <giszmo>
Project Member
Sat 30 Dec 2006 03:21:41 AM UTC, original submission:

if a (pre .21??) savegame is loaded where a tower or inn is under construction the count of workers to maintain the building is misinterpretated. in the example
http://www.leowandersleb.de/sonstiges/AdjustAllianceCrash.map
93 globs get assigned to maintain the inn. changing this count leads to
glob2: Game.cpp:290: void Game::executeOrder(Order*, int): Assertion `omb->numberRequested <= 20' failed.

Maybe a workaround would be to clip "int" to [0..20] and comment out the assertion.

Leo Wandersleb <giszmo>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #11625:  manyAssignedOnes.jpg added by giszmo (64KiB - image/jpeg)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by genixpro (Updated the item)
  • -unavailable- added by donkyhotay (Posted a comment)
  • -unavailable- added by nct (Posted a comment)
  • -unavailable- added by giszmo (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
    Fri 27 Jul 2007 04:12:36 AM UTCgenixproOpen/ClosedOpen=>Closed
    Tue 09 Jan 2007 10:31:07 PM UTCgiszmoDependencies-=>bugs #18738 is dependent
    Sun 31 Dec 2006 06:37:19 AM UTCdonkyhotayStatusNone=>Confirmed
    Sat 30 Dec 2006 02:05:49 PM UTCgiszmoSeverity3 - Normal=>5 - Blocker
    Sat 30 Dec 2006 03:45:08 AM UTCgiszmoSummarydefault worker counts are misinterpretated for pre-.21 savegames=>default worker counts are misinterpretated for savegames
    Sat 30 Dec 2006 03:21:41 AM UTCgiszmoAttached File-=>Added manyAssignedOnes.jpg, #11625

    Back to the top


    Powered by Savane 3.1-cleanup1