Page MenuHomeWildfire Games

Fix OOS introduced by pathfinder threading preparation diff rP22902
ClosedPublic

Authored by wraitii on Sep 22 2019, 2:43 PM.

Details

Summary

As reported in #5604, there is an OOS on rejoin sometimes.
The cause is that paths are not serialised following rP22902 since they're deleted at the end of turn N (and computed), but messages are sent at the beginning of turn N+1. Rejoiners don't compute the paths, and don't send the messages.

To fix this, we need to change the architecture slightly. This is taken from D14 where this was (attempted) to be fixed - I actually didn't fix this quite correctly in D14.

Test Plan

Notice that #5604 now runs correctly on rejoin test

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

wraitii created this revision.Sep 22 2019, 2:43 PM

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

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/284/display/redirect

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

Linter detected issues:
Executing section Source...

source/simulation2/components/CCmpPathfinder_Common.h
|  34| #include·"graphics/Overlay.h"
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'template<...' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

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

Stan added a subscriber: Stan.Sep 22 2019, 3:56 PM
Stan added inline comments.
source/simulation2/components/CCmpPathfinder.cpp
823 ↗(On Diff #9912)

I think the in / in which is unecessary here :)

wraitii edited the summary of this revision. (Show Details)Sep 22 2019, 4:34 PM
This revision was not accepted when it landed; it landed in state Needs Review.Sep 23 2019, 8:38 AM
This revision was automatically updated to reflect the committed changes.