CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.29k stars 4.12k forks source link

Numerous json errors referring to "recurring" after commit 776ab0423cb8d6b61453482d12f275abc72f78ff #52153

Closed redcrate closed 2 years ago

redcrate commented 2 years ago

Describe the bug

Numerous json errors (hundreds?) on load after commit 776ab0423cb8d6b61453482d12f275abc72f78ff

All follow a similar pattern:

 DEBUG    : (json-error)
Json error: <unknown source file>:31:27,417: Invalid or misplaced field name "recurring" in JSON data

ed":false}]}},{"typeid":"mag_firstaid","bday":154800,"owner":"solo_Peggy Metzger"}],"last_target_pos":null,"destination_point":null,"faction_warnings":[],"camps":[],"queued_effect_on_conditions":[{"time":155010,"eoc":"bio_leaky","recurring":t
                                                                                                                                                                                                                                                 ^
                                                                                                                                                                                                                                                  rue},{"time":156506,"eoc":"bio_itchy","recurring":true},{"time":156784,"eoc":"bio_glowy","recurring":true},{"time":157566,"eoc":"bio_trip","recurring":true},{"time":157982,"eoc":"bio_drain","recurring":true},{"time":159290,"eoc":"bio_sleepy

 FUNCTION : void JsonObject::report_unvisited() const
 FILE     : src/json.cpp
 LINE     : 123
 VERSION  : 208638b

 DEBUG    : (json-error)
Json error: <unknown source file>:31:27,468: Invalid or misplaced field name "recurring" in JSON data

0,"owner":"solo_Peggy Metzger"}],"last_target_pos":null,"destination_point":null,"faction_warnings":[],"camps":[],"queued_effect_on_conditions":[{"time":155010,"eoc":"bio_leaky","recurring":true},{"time":156506,"eoc":"bio_itchy","recurring":t
                                                                                                                                                                                                                                                 ^
                                                                                                                                                                                                                                                  rue},{"time":156784,"eoc":"bio_glowy","recurring":true},{"time":157566,"eoc":"bio_trip","recurring":true},{"time":157982,"eoc":"bio_drain","recurring":true},{"time":159290,"eoc":"bio_sleepy","recurring":true},{"time":159717,"eoc":"bio_noise

 FUNCTION : void JsonObject::report_unvisited() const
 FILE     : src/json.cpp
 LINE     : 123
 VERSION  : 208638b

 DEBUG    : (json-error)
Json error: <unknown source file>:31:27,519: Invalid or misplaced field name "recurring" in JSON data

null,"destination_point":null,"faction_warnings":[],"camps":[],"queued_effect_on_conditions":[{"time":155010,"eoc":"bio_leaky","recurring":true},{"time":156506,"eoc":"bio_itchy","recurring":true},{"time":156784,"eoc":"bio_glowy","recurring":t
                                                                                                                                                                                                                                                 ^
                                                                                                                                                                                                                                                  rue},{"time":157566,"eoc":"bio_trip","recurring":true},{"time":157982,"eoc":"bio_drain","recurring":true},{"time":159290,"eoc":"bio_sleepy","recurring":true},{"time":159717,"eoc":"bio_noise","recurring":true},{"time":164748,"eoc":"bio_shake

 FUNCTION : void JsonObject::report_unvisited() const
 FILE     : src/json.cpp
 LINE     : 123
 VERSION  : 208638b
 DEBUG    : (json-error)
Json error: <unknown source file>:31:27,569: Invalid or misplaced field name "recurring" in JSON data

],"camps":[],"queued_effect_on_conditions":[{"time":155010,"eoc":"bio_leaky","recurring":true},{"time":156506,"eoc":"bio_itchy","recurring":true},{"time":156784,"eoc":"bio_glowy","recurring":true},{"time":157566,"eoc":"bio_trip","recurring":t
                                                                                                                                                                                                                                                 ^
                                                                                                                                                                                                                                                  rue},{"time":157982,"eoc":"bio_drain","recurring":true},{"time":159290,"eoc":"bio_sleepy","recurring":true},{"time":159717,"eoc":"bio_noise","recurring":true},{"time":164748,"eoc":"bio_shakes","recurring":true},{"time":167195,"eoc":"bio_spa

 FUNCTION : void JsonObject::report_unvisited() const
 FILE     : src/json.cpp
 LINE     : 123
 VERSION  : 208638b

 DEBUG    : (json-error)
Json error: <unknown source file>:31:27,620: Invalid or misplaced field name "recurring" in JSON data

:155010,"eoc":"bio_leaky","recurring":true},{"time":156506,"eoc":"bio_itchy","recurring":true},{"time":156784,"eoc":"bio_glowy","recurring":true},{"time":157566,"eoc":"bio_trip","recurring":true},{"time":157982,"eoc":"bio_drain","recurring":t
                                                                                                                                                                                                                                                 ^
                                                                                                                                                                                                                                                  rue},{"time":159290,"eoc":"bio_sleepy","recurring":true},{"time":159717,"eoc":"bio_noise","recurring":true},{"time":164748,"eoc":"bio_shakes","recurring":true},{"time":167195,"eoc":"bio_spasm","recurring":true}],"inactive_eocs":[],"marked_f

 FUNCTION : void JsonObject::report_unvisited() const
 FILE     : src/json.cpp
 LINE     : 123
 VERSION  : 208638b
 DEBUG    : (json-error)
Json error: <unknown source file>:31:27,672: Invalid or misplaced field name "recurring" in JSON data

156506,"eoc":"bio_itchy","recurring":true},{"time":156784,"eoc":"bio_glowy","recurring":true},{"time":157566,"eoc":"bio_trip","recurring":true},{"time":157982,"eoc":"bio_drain","recurring":true},{"time":159290,"eoc":"bio_sleepy","recurring":t
                                                                                                                                                                                                                                                 ^
                                                                                                                                                                                                                                                  rue},{"time":159717,"eoc":"bio_noise","recurring":true},{"time":164748,"eoc":"bio_shakes","recurring":true},{"time":167195,"eoc":"bio_spasm","recurring":true}],"inactive_eocs":[],"marked_for_death":false,"dead":false,"patience":0,"myclass":

 FUNCTION : void JsonObject::report_unvisited() const
 FILE     : src/json.cpp
 LINE     : 123
 VERSION  : 208638b

Steps To Reproduce

Have a save before commit with "recurring" eoc's Load save with latest version

Expected behavior

Game to properly handle no longer present "recurring" eoc field in save files.

Screenshots

No response

Versions and configuration

Additional context

Saving and reloading with current version appears to remove the json errors and overwrite recurring property.

ZhilkinSerg commented 2 years ago

This is not worth fixing. Nothing really breaks and there are won't be any error when loading savegame from latest stable version.

atealein commented 2 years ago

I observed the same thing, but the error appeared only in the first load after updating the version (which is always a time to expect such warnings/errors). Following that, the game updated correctly the eocs and the next load didn't have this "recurring" error.

P.S. As a player on experimental that runs a long game, these errors happen occasionally when new update changed the structure of the different objects. Sometimes you might even have to manually go and fix your .sav file to remove the old references and replace with the new ones. In the case for this error this was at least not needed.