2019-11-19 06:03 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000881Spring engineGeneralpublic2008-04-02 16:14
ReporterFlaamwing 
Assigned ToKloot 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000881: Crash with many nano's helping build units in factory
DescriptionAs the summary said, I created lots and lots of nano's which would help multiple factories build.
Additional InformationHere is the patch that should fix this problem.

--- BuilderCAI.cpp-revBASE.svn000.tmp.cpp Tue Apr 01 21:00:04 2008
+++ C:/Projects/Spring76b1/rts/Sim/Units/CommandAI/BuilderCAI.cpp Tue Apr 01 19:17:51 2008
@@ -349,6 +349,7 @@

if (OutOfImmobileRange(c)) {
FinishCommand();
+ return;
}

map<int, string>::iterator boi = buildOptions.find(c.id);


The problem in this case, was that c happened to be a reference pointer to the first command in the list. However FinishCommand removed the item from the list. Further down in this function, an attempt was made to use this command which was no longer valid. Specifically, it would crash when trying to repair as the command had 0 entries in params, and the assumption was made that there would be 1 or 3 and it was used accordingly. I judged that it was impossible to continue processing a command that was removed however, and put a return there. It solved the problem.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0002027

Kloot (developer)

applied in r5647, thank you :)
+Notes

-Issue History
Date Modified Username Field Change
2008-04-02 04:05 Flaamwing New Issue
2008-04-02 12:00 Kloot Status new => assigned
2008-04-02 12:00 Kloot Assigned To => Kloot
2008-04-02 16:14 Kloot Note Added: 0002027
2008-04-02 16:14 Kloot Status assigned => resolved
2008-04-02 16:14 Kloot Resolution open => fixed
+Issue History