qrrk / Catapult

A cross-platform launcher for Cataclysm: DDA and BN
MIT License
391 stars 63 forks source link

Game crashes after updating beyond https://github.com/CleverRaven/Cataclysm-DDA/pull/72708 #151

Open XtraButtery opened 7 months ago

XtraButtery commented 7 months ago

/dda/game0/data/json/ui/fatigue.json has been depreciated in favour of /dda/game0/data/json/ui/sleepiness.json having a fatigue.json file will cause the game to crash with the following error message when creating a new character:

DEBUG    : Error: Invalid enum string 'fatigue' for 'widget_var'
 FUNCTION : bool main_menu::new_character_tab()
 FILE     : src/main_menu.cpp
 LINE     : 1013
 VERSION  : cdda-experimental-2024-04-11-1603 9819962

A similar error message displays when loading a character. Manually deleting fatigue.json resolves the issue entirely.

Catapult launcher does not detect or delete depreciated files which may cause future errors.

qrrk commented 7 months ago

IIRC how updating currently works, there should be no way for a json from an earlier version to end up in there... Does it reproduce if you repeat the steps? What happens if you do a new install of just this build?

AriaMoradi commented 7 months ago

The file was renamed(not deprecated) in https://github.com/CleverRaven/Cataclysm-DDA/pull/72708/files you shoudn't have it if you update your game normally, have you touched or edited any game files (from game0 directory) by any means? Do you have any mods that interact with fatigue json? if so those mods will break your game.

XtraButtery commented 7 months ago

I had the Kenan Modpack downloaded through Catapult Launcher and nothing else installed, so I don't believe there are any additional mods that should be causing the issue.

I'm also running Catapult on Linux which may be related.

Something I should also have perhaps noted is that rolling back (i.e., installing a version prior to the pull/release) also caused the same issue where "sleepiness.json" was retained causing the same crash.

XtraButtery commented 7 months ago

Additional information that may be useful: I'm running Arch Linux (actually endeavourOS but the difference is negligible), using catapult from the AUR package, and I've got the Kenan modpack. As part of my tests I deleted all mods, both manually and through catapult in two separate tests, neither of which resolved the issue so I don't think it's a mod issue based on that, but perhaps further testing could confirm otherwise. Given the affected/offending file was stored in /game0/ and not /userdata/ that would point to a Catapult issue rather than a mod issue.

Below are the in-game error messages:

image image

As mentioned deleting dda/game0/data/json/ui/fatigue.json manually resolved the error. Discussions with developers and staff in the official CDDA Discord confirmed that this file should not have been present in the game, and as it is no longer packaged/bundled with the game that this was not an issue with CDDA.

My guess is that this is a Linux issue, or possible an issue with the AUR version, and that for whatever reason Catapult is unable to remove files.

Doing a couple of additional tests I think that this is the most likely outcome given the following error message when updating earlier today:

[error] Failed to remove directory /opt/catapult-bin/dda/game0. Error code: 1.