View Issue Details

IDProjectCategoryView StatusLast Update
0000273Spring engineGeneralpublic2006-11-02 14:23
Reportercolorblind Assigned Totvo  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Summary0000273: crash on Group AI deconstruction
DescriptionWhen clearing a groupAI that can be given orders (such as the Simple Formation or Central Build AIs), Spring crashes. When clearing a groupAI that cannot be given orders (such as the RadarAI or the MetalMaker AI), everything's fine.

To be clear: this concerns commands the user can give to the groupAI, and not about commands the groupAI gives to its units. That is, IAICallback->GiveOrder(unitid,c) isn't the issue, but rather

IGroupAICallback->UpdateIcons() and
CGroup->GetPossibleCommands()

As soon as the groupAI passes some possible commands to those functions, Spring will crash upon clearing (deconstructing) the groupAI.
Additional InformationI suspect is an GCC issue only, as the 0.72b1 release doesn't suffer from it.
This bug appears in CentralBuild, Simpleformation, and MexUpgrader AIs.
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

tvo

2006-11-02 11:36

reporter   ~0000421

I can still confirm this with current SVN (r2531).
It is release critical if we consider releasing mingw build.

tvo

2006-11-02 13:31

reporter   ~0000422

traced it down to just after the "delete group;" in CGroupHandler::RemoveGroup (when the crash happens on clicking clear group) or in CGroupHandler::~CGroupHandler (when exiting spring) (ExternalAI/GroupHandler.cpp). Put a log message at end of CGroup::~CGroup (ExternalAI/Group.cpp), and it is executed, put one just after the delete, and it isn't executed.

Also it's interesting to note that only clearing the *last* instance of the GroupAI triggers the crash. (If you make two groups with a GroupAI with commands, and clear one, everything is fine. Clear the second, crash.)

tvo

2006-11-02 14:23

reporter   ~0000423

fixed, see r2532

Issue History

Date Modified Username Field Change
2006-08-12 15:14 colorblind New Issue
2006-11-02 11:36 tvo Note Added: 0000421
2006-11-02 13:31 tvo Note Added: 0000422
2006-11-02 14:23 tvo Status new => assigned
2006-11-02 14:23 tvo Assigned To => tvo
2006-11-02 14:23 tvo Status assigned => resolved
2006-11-02 14:23 tvo Resolution open => fixed
2006-11-02 14:23 tvo Note Added: 0000423