Page MenuHomeWildfire Games

Fix AI error in ApplyEntitiesDelta()
ClosedPublic

Authored by Sandarac on Jul 22 2017, 7:59 AM.

Details

Summary

From https://wildfiregames.com/forum/index.php?/topic/22650-alpha-22-resourcesupplytype-is-undefined/

In some rare cases, the loop on events.TrainingFinished may include entities that have already been destroyed, and then pass undefined to setMetadata (there is already this check in the loops on f.e. ConstructionFinished and ChangedEntityTemplateInfo).

Test Plan

Read the code, run the commands.txt from the forum post to see that errors don't occur anymore.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 2625
Build 4457: Vulcan BuildJenkins
Build 4456: arc lint + arc unit

Event Timeline

Sandarac created this revision.Jul 22 2017, 7:59 AM
Owners added a subscriber: Restricted Owners Package.Jul 22 2017, 7:59 AM
Vulcan added a subscriber: Vulcan.Jul 22 2017, 8:46 AM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...

http://jw:8080/job/phabricator/1758/ for more details.

mimo accepted this revision.Aug 5 2017, 7:24 PM

nice catch

This revision is now accepted and ready to land.Aug 5 2017, 7:24 PM
This revision was automatically updated to reflect the committed changes.