Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save files fail to load #1868

Closed
byorgey opened this issue May 27, 2024 · 2 comments · Fixed by #1870
Closed

Save files fail to load #1868

byorgey opened this issue May 27, 2024 · 2 comments · Fixed by #1870
Labels
Bug The observed behaviour is incorrect or unexpected. G-Scenarios An issue having to do with scenario design, the way scenarios are described and loaded, etc. S-Critical This is an issue that seriously affects playability or user experience.

Comments

@byorgey
Copy link
Member

byorgey commented May 27, 2024

Describe the bug
Save files generated by previous invocations of the swarm executable fail to parse with error messages like:

Error in $.status.contents[1][1].attemptmetrics.durationmetrics.elapsedticks: parsing Swarm.Game.Tick.TickNumber(TickNumber) failed, expected Object, but encountered Number

To Reproduce

  1. Run swarm and start a previously unplayed scenario.
  2. Quit swarm.
  3. Run swarm again and observe the parse error in Messages. Also observe that data about the previous run of the scenario is not present in the New Game menu.
@byorgey byorgey added Bug The observed behaviour is incorrect or unexpected. S-Critical This is an issue that seriously affects playability or user experience. G-Scenarios An issue having to do with scenario design, the way scenarios are described and loaded, etc. labels May 27, 2024
@byorgey
Copy link
Member Author

byorgey commented May 27, 2024

Probably caused by 82e8ac9#diff-a09b2fa530dabb25d3f5035842c9620d08d02213bc364acd7b271dbcba6cb600R20-R23 which modified the ToJSON instance for TickNumber to use unwrapUnaryRecords but didn't update the FromJSON instance to match.

@byorgey
Copy link
Member Author

byorgey commented May 27, 2024

More generally, we should add something to our CI that makes sure we can round-trip save files + achievement data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug The observed behaviour is incorrect or unexpected. G-Scenarios An issue having to do with scenario design, the way scenarios are described and loaded, etc. S-Critical This is an issue that seriously affects playability or user experience.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant