Page MenuHomeWildfire Games

Throw warnings when failing to dump the simstate in serializationtestmode
AbandonedPublic

Authored by elexis on Jun 13 2017, 8:21 PM.

Details

Reviewers
vladislavbelov
Summary

While debugging an OOS (#4596), I encountered a case where the binary state and hash was dumped, but not the textual state. We should have a warning in case this occurs.

Test Plan
  1. Apply this faulty patch
Index: source/simulation2/components/CCmpWaterManager.cpp
===================================================================
--- source/simulation2/components/CCmpWaterManager.cpp	(revision 19773)
+++ source/simulation2/components/CCmpWaterManager.cpp	(working copy)
@@ -66,7 +66,9 @@
 	{
 		Init(paramNode);
 
-		deserialize.NumberFixed_Unbounded("height", m_WaterHeight);
+		entity_pos_t waterHeight;
+		deserialize.NumberFixed_Unbounded("height", waterHeight);
+		SetWaterLevel(waterHeight);
 	}
 
 	virtual void HandleMessage(const CMessage& msg, bool UNUSED(global))
  1. Open atlas, create an extinct volcano map, save it as a scenario map.
  2. Change waterRiseStartTime to [0, 0] in extinct_volcano_triggers.js
  3. Start this scenario to produce a replay (only a second needed)
  4. pyrogenesis -rejointest=2 -mod=public -replay="..."

Event Timeline

elexis created this revision.Jun 13 2017, 8:21 PM
elexis edited the test plan for this revision. (Show Details)Jun 13 2017, 8:25 PM
Vulcan added a subscriber: Vulcan.Jun 13 2017, 9:08 PM

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!
Checking XML files...

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

Executing section Default...
Executing section Source...
Executing section JS...
Executing section XML GUI...
Executing section Python...
Executing section Perl...

http://jw:8080/job/phabricator_lint/194/ for more details.

vladislavbelov accepted this revision.Aug 11 2017, 12:56 AM
vladislavbelov added a subscriber: vladislavbelov.

It's better to have a warning in logs instead of silence.

This revision is now accepted and ready to land.Aug 11 2017, 12:56 AM

(I'm actually not sure about this patch anymore. I think it displays the warnings in some cases where it doesnt even intend to write the logs. I have to check again)

elexis abandoned this revision.Dec 12 2017, 8:39 PM