#4279 closed defect (fixed)
OOS on rejoin - vision range techs not taken into account
Reported by: | elexis | Owned by: | elexis |
---|---|---|---|
Priority: | Release Blocker | Milestone: | Alpha 21 |
Component: | UI & Simulation | Keywords: | |
Cc: | Patch: |
Description
In this svn r18830 game on a skirmish map, someone rejoined and triggered an OOS which is reproducible with the rejointest. The simstate differs in the vision range part (80m vs 88m) vision range and different dirty visibilities.
The vision range difference must come from the tower range upgrade. Notice some OOS issue with the range techs was already fixed in r16401.
Attachments (8)
Change History (15)
by , 8 years ago
Attachment: | oos_Dizaka.7z added |
---|
comment:2 by , 8 years ago
- the blue player (me) researched the tower range tech
- a CC of the green player (Cesar) was destroyed
- thus 3 towers changed ownership to gaia
- one tower was captured by me, the other 2 were captured by Cesar and then by me again
- the vision range of these three towers differs in the simstate
- can't reproduce it by repeating these steps
by , 8 years ago
Attachment: | oos_caledonian.7z.001 added |
---|
by , 8 years ago
Attachment: | oos_caledonian.7z.002 added |
---|
by , 8 years ago
Attachment: | oos_caledonian.7z.003 added |
---|
by , 8 years ago
Attachment: | visualreplay+savegame_v1.patch added |
---|
Loads a savegame from a given binary serialized simstate (with a fix for cinematic manager to work with non-visual rejointest simstates), then visually replays the given commands.txt on that savegame.
comment:3 by , 8 years ago
Summary: | OOS on rejoin - different tower vision range → OOS on rejoin - vision range techs not taken into account |
---|
- The OOS on the caledonian maedows game occured with r18830.
- The skirmish map derived from the random map looks identical for the first 10-30min, but somehow it is incorrect as the replay with that map shows siole won by wonder victory, while in the original game all wonders were removed until the game ended.
- The map is very slow to work with (much slower than the other upload, as we have to wait for turn 8504 also)
- By applying attachment:visualreplay+savegame_v1.patch and passing `-load="/path/to/state.before.a" -replay-visual="/path/to/commands_replayme.txt" one can insta load the scene at the affected turn
- The rejointest yields a failure, where the vision range of some entities affected by techs differs between host and rejoined client; for example an advanced heliot skirmisher, outposts, but weirdly also a tower foundation with 8m (tech affected) vision range! All of the entities I've checked were owned by gaia.
@@ -478549,11 +478549,11 @@ flags: 1 scripted visibility: 0 key: 48297 x: 186.74796 z: 217.469 - vision: 0 + vision: 8 visibilities: 2863311530 size: 6 retain in fog: 1 owner: 0 in world: 1 @@ -482366,11 +482366,11 @@ flags: 1 scripted visibility: 0 key: 49070 x: 43.74256 z: 1080.32483 - vision: 0 + vision: 8 visibilities: 2863311530 size: 5 retain in fog: 1 owner: 0 in world: 1
by , 8 years ago
Attachment: | update_vision_on_ownershipchange_v1.patch added |
---|
No clue whether that works, since I can't reproduce the error without the rejointest yet.
comment:4 by , 8 years ago
Tower foundations with 8m vision range: #4283 are not related to the OOS because, but a separate bug. (CCmpVision
doesn't distinguish between foundations and finished constructions (like f.e. the Armour
component does). Since the Identity
and Vision
component is copied by the TemplateManager
, the tower range tech tech affects the vision of the foundation).
by , 8 years ago
Attachment: | vision_range_tooltip.diff added |
---|
Shows the vision range in the selection details, revealing the bug on ownership change.
comment:6 by , 8 years ago
dont forget to update tests for the tooltip (even if we don t display it in game it s nice to have it in the dev overlay) edit: ah i didn t notice it was only for debugging!
comment:7 by , 8 years ago
Method:
- By adding
printfs
to all calls that changem_Range
, I found that on the OOS turn of the first replay, the vision range is changed to a different value for the rejoined client by anMT_ValueModification
. - That message was sent by another player having finished the research of the the persian archery range upgrade on that turn.
- Because the message is broadcasted and because the vision component doesn't check whether it was affected by the query at all, the vision range of the tower/outpost is reloaded when the other vision range upgrade is finished.
Reproduce:
- Build Outpost and Tower with player 1
- Research the vision range tech at the Outpost
- Build Outpost with player 2
- Use the "wololo" cheat to capture the tower with player 1
Result: Player 1 owns the tower, but the vision range didn't change and is at 80m despite the player having researched the tech (seen with vision_range_tooltip.diff).
- Rejoin with another client.
The client will see the upgraded vision range (120m) while the non-rejoined client still has the old vision range (80m). No OOS is triggered yet, because the Vision
component isn't serialized and because the RangeManager
still uses the old data which is identical to both clients.
- Research another vision range affecting tech, f.e. the tower range tech. This one will trigger the range manager to update and cause an OOS.
r18394 introduced a vision range upgrade of the tower r13400 introduced the outpost tower vision which yields the same OOS in another reproduction