Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

Unknown "snippets_read" ID leads to crash on opening faction window

Open MrDraMaster opened this issue 3 years ago • 1 comments

Describe the bug

Opening the "View Factions" window crashes the game if there's an unknown ID in the "snippets_read" array of the save.

Steps to reproduce

  1. load a save with an unknown ID in the "snippets_read" array (like "debug" for reproduction)
  2. open the "View Factions" window (with # or via the Enter-menu)
  3. game crashes

Expected behavior

I'd expect an exception about an unknown snippet ID, like you get for unknown items, and not a hard crash.

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: MINGW/CYGWIN/MSYS2 on unknown Windows version
  • Game Version: 5dee013 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], No Fungal Growth [no_fungal_growth], Bionic Professions [package_bionic_professions], Blaze Industries [blazeindustries], Magiclysm [magiclysm], Mythical Martial Arts [MMA], SpeedyDex [speedydex], Stats Through Kills [stats_through_kills], Stats Through Skills [StatsThroughSkills], Tamable Wildlife [Tamable_Wildlife] ]

Additional context

I stumbled on this after I removed a mod (My Sweet Cataclysm), so I'm unsure whether this can happen in "normal" play.

crash.log debug.log

MrDraMaster avatar Sep 14 '22 22:09 MrDraMaster

/confirm Here's a world where it can be reproduced (manually remove the mod to cause the crash): 000TEST.zip

The only snippet in My Sweet Cataclysm is the flier. Removing mods is something we should expect power users to do, so it shouldn't crash.

sethsimon avatar Sep 21 '22 14:09 sethsimon

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

github-actions[bot] avatar Mar 04 '23 04:03 github-actions[bot]

We do not in fact support removing or adding mods, but input sanitization is fine to add nonetheless.

kevingranade avatar Mar 22 '23 15:03 kevingranade