On Thursday 12 April 2007 01:37:48 Kai Antweiler wrote: > I tried to produce the building repair crash bug in the latest > glob2 version before Bradleys first commit on 2007-03-24, > but I haven't had success so far. > The commitline of the patch is: > "Fixed Nicowar dig out code bug. Fixed new unit allocation system bug. > Added new hidden forbbidden zone, which acts exactly like forbidden zone > except that it can not be seen or changed by the user. Units that are > spinning on the spot (they are trapped or other units are blocking their > path) put hidden forbidden zone on themselves, which automatically diverts > other units, and breaks up the clogged pathway. Hidden forbidden zones are > also placed on buildings that are being upgraded, the area arround them is > restricted so that units don't walk arround in the space that the building > needs to upgrade." > > > > After that patch I have succeeded. > But this patch is also one of the patches which introduced inconsistence > in the game file handling, so I can't be sure that the bug was introduced > with it. > > This patch also introduced the function: > void Building::removeForbiddenZoneFromUpgradeArea(void) > > Here is the "src/Building.cpp" part of the patch: > http://cvs.savannah.nongnu.org/viewcvs/glob2/glob2/src/Building.cpp?r1=1.71 >4&r2=1.715 > > Which I remember to be in the traceback of the bug.
I think the game state is already buggy when this function is called. > Unfortunately the patch is big. > > Hey, I have commented out the bodies of > "void Building::removeForbiddenZoneFromUpgradeArea(void)" and > "void Building::addForbiddenZoneToUpgradeArea(void)" in my recent > local cvs HEAD and the game didn't crash. > > And I checked this again. Without the comments it crashes. Those functions call the one that triggers the assert. But the problem, as far as I've traced it, is that a level 1 building site is in repair mode, which is forbidden, because it does not have a previous building and thus the assert is triggered because previous building lookup returns -1. Steph -- http://nct.ysagoon.com _______________________________________________ glob2-devel mailing list [EMAIL PROTECTED] http://lists.nongnu.org/mailman/listinfo/glob2-devel
