2021-03-06 16:12 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001903Spring engineGeneralpublic2010-05-18 01:32
Reporterhoijui 
Assigned ToKloot 
PrioritynormalSeveritymajorReproducibilityrandom
StatusresolvedResolutionfixed 
Product Version0.81.2+git 
Target VersionFixed in Version0.81.0.0+git 
Summary0001903: desyncs in AI games
DescriptionSo far, this only happened in AI games, and usually after some time (20min+) of gaming. It happens in nearly all test games/games with AIs.

A vague idea is, that it is Path-Finder state related, as the desync happened in rts/Sim/MoveTypes/GroundMoveType.cpp again.
As Tobi already noted, it is kind of impossible for a desync to happen between GroundMoveType.cpp 237 and 245, though the syncdebug session of Zydox shows it to happen there.
Steps To ReproduceThe usual test setup was:
2 allied human players vs 2 or 3 E323AI 3.19.1 (referenced in master)
BA 7.12, various maps
Additional Informationthis is with branch 0.81-branch-aifixes, but it happens in master too.

http://www.zydox.se/diff.log (diff of trace<X>.log files)
http://www.zydox.se/syncdebug-server.log
http://www.zydox.se/syncdebug-client.log

First back-trace (from syncdebug-server.log):

Server: chks: 25604 equal, 29692 not equal
Server: === Backtrace 1 ===
Server: #0 SyncedPrimitive [git{0.81-branch-aifixes}.mingw32.cmake{syncdebug}/rts/System/Sync/SyncedPrimitive.h:103]
Server: #1 SyncedFloat3 [git{0.81-branch-aifixes}.mingw32.cmake{syncdebug}/rts/System/Sync/SyncedFloat3.h:54]
Server: #2 ?? [git{0.81-branch-aifixes}.mingw32.cmake{syncdebug}/rts/Sim/MoveTypes/GroundMoveType.cpp:245]
Server: 0000003 ?? [git{0.81-branch-aifixes}.mingw32.cmake{syncdebug}/rts/Sim/Units/UnitHandler.cpp:281]
Server: 0000004 ?? [git{0.81-branch-aifixes}.mingw32.cmake{syncdebug}/rts/Game/Game.cpp:3504]
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0004859

Kloot (developer)

Last edited: 2010-04-29 12:16

If an AI uses the engine pathfinder directly via callbacks, then it isn't sync-safe because the pathfinder system caches estimate paths for a certain period, and those can then influence the future paths of units when they are given move orders. Which AI(s) were you playing against?

~0004860

hoijui (reporter)

Last edited: 2010-04-29 22:01

ahaaa!!
E323AI 3.19.1
yeah.. it must be that then.

thanks Kloot!

do you see a workaround?
eg... not creating path cache if the path was requested by an AI, and it is a multi-player game?

i'll check if it uses the engine pather ...

~0004861

hoijui (reporter)

Last edited: 2010-04-29 22:23

this is being used:
AI/Skirmish/E323AI/CPathfinder.cpp:
    float GetPathLength(float3 start, float3 end, int pathType)

AI/Skirmish/RAI/BuilderPlacement.cpp:
    int InitPath(float3 start, float3 end, int pathType);
    float3 GetNextWaypoint(int pathId);
    void FreePath(int pathId);

~0004919

hoijui (reporter)

should be fixed with this commit:
http://github.com/spring/spring/commit/ae47ebda12595ecad676c71a5654dec703cbb99a

testing would not hurth, of course ;-)

~0004924

Kloot (developer)

be my guest ;)
+Notes

-Issue History
Date Modified Username Field Change
2010-04-26 15:34 hoijui New Issue
2010-04-29 12:15 Kloot Note Added: 0004859
2010-04-29 12:16 Kloot Note Edited: 0004859
2010-04-29 12:16 Kloot Status new => feedback
2010-04-29 12:16 Kloot Note Edited: 0004859
2010-04-29 22:00 hoijui Note Added: 0004860
2010-04-29 22:01 hoijui Note Edited: 0004860
2010-04-29 22:19 hoijui Note Added: 0004861
2010-04-29 22:23 hoijui Note Edited: 0004861
2010-05-17 14:28 hoijui Note Added: 0004919
2010-05-18 01:32 Kloot Note Added: 0004924
2010-05-18 01:32 Kloot Status feedback => resolved
2010-05-18 01:32 Kloot Fixed in Version => 0.81.0.0+git
2010-05-18 01:32 Kloot Resolution open => fixed
2010-05-18 01:32 Kloot Assigned To => Kloot
+Issue History