glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] For information: engine structure


From: Stéphane Magnenat
Subject: Re: [glob2-devel] For information: engine structure
Date: Thu, 15 Jan 2009 08:51:19 +0100
User-agent: KMail/1.11.0 (Linux/2.6.27-11-generic; KDE/4.1.96; x86_64; ; )

On Thursday 15 January 2009 00:23:21 Leo Wandersleb wrote:
> Stéphane Magnenat wrote:
> > I have added a new list in Building: unitsHarvesting. It lists the units
> > that are taking resources from this building. Currently, this is supposed
> > to correctly implement the markets. It is in beta4-rc and we'll merge it
> > in default with other changes from beta4-rc.
>
> The map at http://test.leowandersleb.de/glob2/integrityCrash.game.tar.gz
> fails with this assertion
> for (std::list<Unit *>::iterator  it=unitsHarvesting.begin();
> it!=unitsHarvesting.end(); ++it)
> {
>       assert(*it);
>       assert((*it)->targetBuilding==this);//<----
> }
>
> (checked for this bug in 411f53fbb28b which is prior to my changes in unit
> conversion code and it crashed due to changes in savegame format. after
> hacking this (        int fu = stream->readUint8("cannotConvertTimer");) it
> crashed with the integrity check of above. no idea if the integrity broke
> earlier already.)

Well, this means that there is still a bug somewhere with the markets. The 
problem is that I was blind-fixing the markets, that is, modifying their 
behaviours without the complete understanding of the core engine state machine 
in mind. I did it by drawing parallels with other code, such as unit 
allocation. So there might be some places that I forget to look in. In 
particular, this assert means that at some point a unit changed its target 
building while it was not "unsubscribe from harvesting" in the building. I 
think that the best way to solve this problem is to look in Unit.cpp where 
targetBuilding gets re-assigned.

> also there is a slight gui bug. the download progress bar is shown in the
> host screen but totally wrong and overlapping.

Ok. The text was overlapping and I put the progress bar at the same place. By 
wrong, do you mean that the progress info is not correct? Do you have an easy 
procedure to show this bar? Or do you have a screenshot?

Thank you, have a nice day,

Steph

-- 
http://stephane.magnenat.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]