Page MenuHomeWildfire Games

Add missing Hexify to the OOS dialog
ClosedPublic

Authored by elexis on May 11 2017, 1:46 AM.

Details

Summary

As reported by causative, in case of OOS, the dialog shows the player is OOS, even if the hash matches.
This is because D105 forgot to call Hexify on expectedHash.

Test Plan

Start a game in one instance. Change a serialized property like Max Health of a template like template_structure_civic_civil_centre.xml and rejoin in a second instance.

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

elexis created this revision.May 11 2017, 1:46 AM
Vulcan added a subscriber: Vulcan.May 11 2017, 6:35 AM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/1134/ for more details.

leper accepted this revision.May 12 2017, 2:12 AM
This revision is now accepted and ready to land.May 12 2017, 2:12 AM

Sorry for the bug, thanks for the review.

source/network/NetClientTurnManager.cpp
108 ↗(On Diff #1836)

(I wondered whether we should have this disabled debug_printf on each turn if it got OOS at some point and whether it shouldn't also print the computed hash. But since we have a LOGERROR for the unique one and since all the other ones are noisy as hell, this one should be too.
Hence we can't make those 2 Hexify calls more symmetrical, right above each other)

Notice the previous code didn't have an Hexify call either, but contrary to JS, C++ was smart enough to convert automatically:

expectedHash:"9\f\x87\xDF\xCA\xAA\xEE\xDD\xCAK\xDA\x87\x99\xF3w\x90", hash:"390c87dfcaaaeeddca4bda8799f37790"

This revision was automatically updated to reflect the committed changes.
elexis retitled this revision from Fix OOS dialog to Add missing Hexify to the OOS dialog.May 12 2017, 10:50 AM