Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5508 closed defect (fixed)

UnitMotion waypoint OOS / hash mismatch in nonvisual replay mode

Reported by: elexis Owned by: wraitii
Priority: Release Blocker Milestone: Alpha 24
Component: Simulation Keywords: regression
Cc: Patch:

Description

Reproduce:

  • Start a match (I tested on mainland)
  • Run the replay of that match in non-visual replay mode
  • Notice that the initial hashes match, but at some point there is an OOS (hash mismatch)

Experienced with r22477.

Attachments (4)

commands.txt (18.0 KB ) - added by elexis 5 years ago.
Sample file
skirmish_replay_oos_dump.7z (261.6 KB ) - added by elexis 5 years ago.
Skirmish map with simstates on the affected turn, relating to above debugging
replays.7z (47.3 KB ) - added by wraitii 5 years ago.
logs.7z (297.6 KB ) - added by elexis 5 years ago.
replay+simstates of nani and FeldFeld who were OOS, nani was host, both windows users. r22482

Download all attachments as: .zip

Change History (9)

by elexis, 5 years ago

Attachment: commands.txt added

Sample file

comment:1 by elexis, 5 years ago

Summary: Hash mismatch in nonvisual replay modeUnitMotion waypoint OOS / hash mismatch in nonvisual replay mode

I ran the non-visual and visual replay with -ooslog, used a tool like diff or kdiff3 to compare the differences of the two and got this:

   UnitMotion:
     pass class: "default"
     ticket: 0
     ticket type: 0
     failed path computations: 0
     pretendLongPathIsCorrect: false
     target type: 1
     target entity: 0
     target pos x: 901.4413
     target pos y: 792.15854
     target min range: 10.0778
     target max range: -1
     speed multiplier: 1
     current speed: 0
     facePointAfterMove: false
     length: 1
     waypoint x: 904.9664
     waypoint z: 781.44558
-    length: 1
-    waypoint x: 902.55536
-    waypoint z: 790.55407
+    length: 2
+    waypoint x: 907.39534
+    waypoint z: 789.72835
+    waypoint x: 911.44057
+    waypoint z: 789.25013
   Vision:
   VisualActor:
     base actor: "fauna/sheep3.xml"
     r: 1
     g: 1
     b: 1
     anim name: "idle"

which reminds me of r22470 which involved undefined data, if I'm not mistaken there was another commit prior with UB.

by elexis, 5 years ago

Attachment: skirmish_replay_oos_dump.7z added

Skirmish map with simstates on the affected turn, relating to above debugging

comment:2 by wraitii, 5 years ago

Owner: set to wraitii

Thanks for the report, will try and fix tonight.

by wraitii, 5 years ago

Attachment: replays.7z added

comment:3 by wraitii, 5 years ago

Can you run the above replays on a clean 22478 and say if you get the same hashes?

by elexis, 5 years ago

Attachment: logs.7z added

replay+simstates of nani and FeldFeld who were OOS, nani was host, both windows users. r22482

comment:4 by wraitii, 5 years ago

Resolution: fixed
Status: newclosed

In 22483:

Fix undefined behaviour introduced in rP22473

rP22473 introduces undefined behaviour: for vertices that are part of non-AA squares, the value of "quadOutward" is undefined. This fixes that by again setting it to QUADRANT_ALL by default, as it was pre rP22473. This led to OOS.

Reviewed By: elexis

Fixes #5508

Differential Revision: https://code.wildfiregames.com/D2082

comment:5 by elexis, 5 years ago

Keywords: regression added
Note: See TracTickets for help on using tickets.