Page MenuHomeWildfire Games

Unit motion - Check the return value of ComputeGoal and handle failure cases
ClosedPublic

Authored by wraitii on Jul 12 2019, 4:06 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP22458: Unit motion - Check the return value of ComputeGoal and handle failure cases
Trac Tickets
#5496
Summary

As reported by @Freagarach on #5496, there can be broken behaviour as UnitMotion::PathResult may call RequestLongPath with a garbage path goal when ComputeGoal fails.

This checks the return value everywhere and reacts accordingly in case of failure, to prevent such issues.

Test Plan

Notice that the commands.txt in 5496 no longer crash.

Diff Detail

Event Timeline

wraitii created this revision.Jul 12 2019, 4:06 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/36/display/redirect

wraitii updated this revision to Diff 8840.Jul 12 2019, 4:07 PM

Don't make this depend on D1907 so the replays can actually be run.

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/37/display/redirect

wraitii updated this revision to Diff 8844.Jul 12 2019, 4:54 PM

Should apply now.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/40/display/redirect

elexis added a subscriber: elexis.Jul 12 2019, 5:17 PM

The two replays don't crash anymore for me, but I didn't check whether this is a false positive (since the replays don't store hashes)

This revision was not accepted when it landed; it landed in state Needs Review.Jul 12 2019, 6:16 PM
This revision was automatically updated to reflect the committed changes.