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

[Runtime Issue]: Incomplete save files will crash the 'load game' menu #351

Closed
3 of 20 tasks
Lgt2x opened this issue May 15, 2024 · 1 comment · Fixed by #358
Closed
3 of 20 tasks

[Runtime Issue]: Incomplete save files will crash the 'load game' menu #351

Lgt2x opened this issue May 15, 2024 · 1 comment · Fixed by #358
Labels
bug Something isn't working

Comments

@Lgt2x
Copy link
Collaborator

Lgt2x commented May 15, 2024

Build Version

ad7c384

Operating System Environment

  • Microsoft Windows (32-bit)
  • Microsoft Windows (64-bit)
  • Mac OS X
  • Linux (specify distribution and version below)

CPU Environment

  • x86 (32-bit Intel/AMD)
  • x86_64 (64-bit Intel/AMD)
  • ARM (32-bit)
  • ARM64 (64-bit; sometimes called AArch64)
  • Other (RISC V, PPC...)

Game Modes Affected

  • Single player
  • Anarchy
  • Hyper-Anarchy
  • Robo-Anarchy
  • Team Anarchy
  • Capture the Flag
  • Bounty
  • Entropy
  • Hoard
  • Monsterball
  • Cooperative

Game Environment

No response

Description

Corrupted/Empty save files will make selecting the "load game" menu crash the game. Related to #350

Regression Status

No response

Steps to Reproduce

Assuming ~/Descent is the game directory,

touch ~/Descent/savegame/saveg001
Descent3 -setdir ~/Descent```
Launch the game, and select "Load game" menu to crash
@Lgt2x Lgt2x added the bug Something isn't working label May 15, 2024
@winterheart
Copy link
Collaborator

Crash is generated by incorrect handling of CFileReadBytes() exception in LoadGameDialog() (or, to be precise, no handling at all). Commenting out this throwing https://github.com/DescentDevelopers/Descent3/blob/main/cfile/cfile.cpp#L924 fixes crash, but I still cannot get it work with try .. catch block.

@winterheart winterheart mentioned this issue May 16, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants