Cataclysm-dda: Bad save json error when loading newly started game.

Created on 4 Oct 2020  路  1Comment  路  Source: CleverRaven/Cataclysm-DDA

Describe the bug

Loading a game doesn't work with "Bad save json" error.

This problem has persisted since build 11033. That is, build 11032 and older does not exhibit this issue on my system.

Due to the severity of this bug and the fact that I see no mention of it anywhere, I'm inclined to think this is some platform specific issue. In any case, I'm running stock Ubuntu 18.04 LTS.

Steps To Reproduce

  1. Download experimental build. In this specific case build 11061, the latest as of this bug report.
  2. Extract to fresh folder with no modifications and default configuration.
  3. Start a game with Play Now.
  4. Save and quit.
  5. Loading always fails with the same error.

Expected behavior

No error when loading.

Versions and configuration

  • OS: Linux

    • OS Version: Distributor ID: Ubuntu; Description: Ubuntu 18.04.4 LTS; Release: 18.04; Codename: bionic;

  • Game Version: 0.E-6496-gef5a06d [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food]
    ]

Additional context

This is the salient part of the error log:

12:22:46.755 ERROR : src/savegame.cpp:242 [void game::unserialize(std::istream&)] Bad save json
Json error: :15:20: invalid utf8 sequence

"om_x": 0,
"om_y": 0,
"grscent": "0 17芒4
^
24",
"typescent": "",
"active_monsters": [ { "moves": 165, "pain": 0, "effects": { }, "damage_over_time_map": [ ], "values": { }, "blocks_left": 1, "dodges_left": 1, "num_blocks_bonus": 0, "num_dodges_bonus": 0, "armor_bash_bonus": 0

The error is always the same: Two numbers written correctly after "grscent", the invalid utf8 sequence, followed by further numbers if I walked around a bit.


Show full error log


12:21:40.280 : Starting log.
12:21:40.280 INFO : Cataclysm DDA version 0.E-6496-gef5a06d
12:21:40.280 INFO : [main] C locale set to REDACTED
12:21:40.280 INFO : [main] C++ locale set to REDACTED
12:21:40.280 INFO : SDL version used during compile is 2.0.4
12:21:40.280 INFO : SDL version used during linking and in runtime is 2.0.8
12:21:40.384 INFO : Number of render drivers on your system: 3
12:21:40.384 INFO : Render driver: 0/opengl
12:21:40.384 INFO : Render driver: 1/opengles2
12:21:40.384 INFO : Render driver: 2/software
12:21:40.387 INFO : [options] C locale set to REDACTED
12:21:40.436 INFO : Active renderer: 2/software
12:21:40.446 INFO : USE_COLOR_MODULATED_TEXTURES is set to 0
12:21:40.599 WARNING : opendir [./mods/] failed with "No such file or directory".
12:22:13.796 WARNING : opendir [./save/Bemis/mods] failed with "No such file or directory".
12:22:19.901 ERROR SDL : (error message will follow backtrace)
./cataclysm-tiles(_Z21debug_write_backtraceRSo+0x38) [0xb9e6e5]
./cataclysm-tiles(_Z8DebugLog10DebugLevel10DebugClass+0x18d) [0xb9f329]
./cataclysm-tiles(_ZN14tileset_loader4loadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb+0xdca) [0xab440e]
./cataclysm-tiles(_ZN10cata_tiles12load_tilesetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb+0x13d) [0xab49a9]
./cataclysm-tiles(_Z12load_tilesetv+0x5f) [0x122e1ae]
./cataclysm-tiles(_ZN17DynamicDataLoader20finalize_loaded_dataER10loading_ui+0x6f1) [0xcf3d63]
./cataclysm-tiles(_ZN4game19load_world_modfilesER10loading_ui+0x489) [0xc7114b]
./cataclysm-tiles(_ZN4game5setupEv+0xad) [0xc884db]
./cataclysm-tiles(_ZN9main_menu17new_character_tabEv+0xb93) [0xe70157]
./cataclysm-tiles(_ZN9main_menu14opening_screenEv+0xbf3) [0xe733d1]
./cataclysm-tiles(main+0x17ea) [0x8f1a50]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f2dde3e1b97]
./cataclysm-tiles(_start+0x29) [0x9a37a9]

Attempting to repeat stack trace using debug symbols芒聙艩
debug_write_backtrace(std::ostream&)
??:?
DebugLog(DebugLevel, DebugClass)
??:?
tileset_loader::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)
??:?
cata_tiles::load_tileset(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool)
??:?
load_tileset()
??:?
DynamicDataLoader::finalize_loaded_data(loading_ui&)
??:?
game::load_world_modfiles(loading_ui&)
??:?
game::setup()
??:?
main_menu::new_character_tab()
??:?
main_menu::opening_screen()
??:?
main
??:?
__libc_start_main
/build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:344
_start
??:?

Backtrace emission took 1 seconds.
(continued from above) ERROR : src/cata_tiles.cpp:629: The tileset you're using has no 'unknown' tile defined!
12:22:20.454 INFO : Loaded tileset: UltimateCataclysm
12:22:41.878 WARNING : opendir [./save/Bemis/mods] failed with "No such file or directory".
12:22:46.065 INFO : Loaded tileset: UltimateCataclysm
12:22:46.755 ERROR : src/savegame.cpp:242 [void game::unserialize(std::istream&)] Bad save json
Json error: :15:20: invalid utf8 sequence

"om_x": 0,
"om_y": 0,
"grscent": "0 17芒4
^
24",
"typescent": "",
"active_monsters": [ { "moves": 165, "pain": 0, "effects": { }, "damage_over_time_map": [ ], "values": { }, "blocks_left": 1, "dodges_left": 1, "num_blocks_bonus": 0, "num_dodges_bonus": 0, "armor_bash_bonus": 0

12:23:09.436 ERROR : src/creature.cpp:1581 [const bodypart* Creature::get_part(const bodypart_id&) const] Could not find bodypart leg_l in Darrell 'Fingers' Gilmore's body
... snip further similar errors ...

<Bug> Fields / Furniture / Terrain / Traps

Most helpful comment

I think the string is supposed to be "0 17424", which means 17424 zero scent values in a 132 * 132 map chunk. I guess it might be some locale specific thing because the invalid utf-8 sequence happens to be at the place where a thousands separator would be expected.

>All comments

I think the string is supposed to be "0 17424", which means 17424 zero scent values in a 132 * 132 map chunk. I guess it might be some locale specific thing because the invalid utf-8 sequence happens to be at the place where a thousands separator would be expected.

Was this page helpful?
0 / 5 - 0 ratings