Opened 7 years ago

Closed 7 years ago

#4598 closed defect (fixed)

OOS on rejoin - Summary Sequences / Percent Map Explored

Reported by: elexis Owned by: elexis
Priority: Release Blocker Milestone: Alpha 22
Component: UI & Simulation Keywords:
Cc: Imarok, bb, Vladislav, Itms Patch: Phab:D612 Phab:D630

Description (last modified by Imarok)

Reprodue:

  1. Start hosting a game on the random map anatolian plateau, tiny size, 1 player
  2. Rejoin as a late observer in a second window
  3. Wait at least 30 seconds

I could not reproduce this issue on any skirmish map (even the tiny polynesia) nor on a normal sized river archipelago map.

--- oos_dump.txt	2017-05-29 01:22:01.467302000 +0200
+++ oos_dump_1496013698_11248.txt	2017-05-29 01:22:01.475302000 +0200
@@ -15341,11 +15341,11 @@
     "percentMapExplored": [
       23,
       23,
       23,
       23,
-      23
+      22
     ],
     "teamPercentMapExplored": [
       22,
       22,
       22,

The teamscore differs too sometimes. These arrays are in the sequences object, so might or might not have something to do with Phab:D144. Couldn't find anything obvious in that commit though.

Someone could figure out which revision broke this with a quick git bisect (besides the compile times).

Change History (19)

comment:1 by Imarok, 7 years ago

r19517 doesn't cause it

Last edited 7 years ago by Imarok (previous) (diff)

comment:2 by elexis, 7 years ago

Could you reproduce the bug with a revision before then?

comment:3 by Imarok, 7 years ago

with current svn I could.

Wait, I forgot to set the correct map >_< Edit: actually the map settings were right :D

and r19617 seem to work correctly too.

Last edited 7 years ago by Imarok (previous) (diff)

comment:4 by Imarok, 7 years ago

With the steps to reproduce, r19687 produces an OOS, but r19686 doesn't

comment:5 by elexis, 7 years ago

It's definitely r19517 as I can reproduce it with that revision but not the one before.

The important part is to wait until g_UpdateSequenceInterval = 30 seconds gametime and having done the rejoin before.

There is still an open question for the function being called at that time in that commit on Phabricator. Might be unrelated though (more expecting some rounding error, though couldn't find any in the code).

Last edited 7 years ago by elexis (previous) (diff)

comment:6 by Imarok, 7 years ago

Description: modified (diff)

comment:7 by Imarok, 7 years ago

elexis thinks this is connected, so I just post this here to not forget about:

15:17 < elexis> also I got this one after being disconnected after finishing the loading screen before passing the "waiting for other clients to load" point

WARNING: JavaScript warning: gui/summary/counters.js line 47
reference to undefined property playerState.sequences.time
ERROR: JavaScript error: gui/summary/counters.js line 47
TypeError: playerState.sequences.time is undefined
  updateCountersPlayer@gui/summary/counters.js:47:6
  updatePanelData@gui/summary/summary.js:329:3
  selectPanel@gui/summary/summary.js:131:3
  init@gui/summary/summary.js:460:2
  leaveGame@gui/session/session.js:682:1
  __eventhandler181 (press)@disconnectedExitButton press:0:1
ERROR: GUI page 'page_summary.xml': Failed to call init() function
Last edited 7 years ago by elexis (previous) (diff)

comment:8 by Imarok, 7 years ago

The issue is already present in A21, it just doesn't lead to an OOS: http://i.imgur.com/crAgO3W.png

It's also strange, that teamPercentMapExplored is 22 and PercentMapExplored is 23 in the hosters metadata.

comment:9 by Imarok, 7 years ago

https://pastebin.com/zXKCpTVR fixes the OOS and the different team/player explored map

Last edited 7 years ago by Imarok (previous) (diff)

comment:10 by elexis, 7 years ago

Hmmm, #3399, #3378, #3321.

comment:11 by Imarok, 7 years ago

There is a bug in CCmpRangeManager: GetPercentMapExplored(1) results in 2786 explored tiles, while GetUnionPercentMapExplored([1]) results in 2696 explored tiles.

comment:12 by Imarok, 7 years ago

Quick fix will be the patch I proposed.

Deeper fix: fix the caching of m_ExploredVertices. (introduced in r13576)

comment:13 by Imarok, 7 years ago

Cc: Itms added

comment:14 by Imarok, 7 years ago

Didn't OOSed before my summary graphs commit, because only the properties of a component are serialized and the StatisticsTracker doesn't store percentMapExplored and teamPercentMapExplored but calculates them on demand. With my commit, those values are stored every 30 s in sequences and then also become serialized.

comment:15 by Imarok, 7 years ago

Patch: Phab:D612

comment:16 by Imarok, 7 years ago

refs #2012

comment:17 by Imarok, 7 years ago

I'd guess the caching is either broken since r16751 or since its implementation.

comment:18 by elexis, 7 years ago

Patch: Phab:D612Phab:D612 Phab:D630

comment:19 by elexis, 7 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 19790:

Fix a map exploration OOS on rejoin when starting with territory at the map boundaries.

rP9951 forgot to add a LosIsOffWorld check in ExploreTerritories (aka UpdateTerritoriesLos) and thus marked tiles outside of the world as explored.
rP13576 transformed the bug into a non-simulation desynchronization, causing rejoined players to see a different score,

as they excluded off-world tiles when filling the cache in ResetDerivedData upon rejoin.

rP19517 transformed the bug into an actual simulation OOS by serializing that map exploration percentage based on that cache.

Also tiles at the map border in square maps are not rendered as expected, so this commit hides refs #4267.

Differential Revision: https://code.wildfiregames.com/D630
Fixes #4598
Proofread by: Itms
Tested By: Imarok

Note: See TracTickets for help on using tickets.