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

Crash on start when SCALING_FACTOR option is 2 or 4 #38049

Closed
drfloob opened this issue Feb 15, 2020 · 2 comments · Fixed by #38053
Closed

Crash on start when SCALING_FACTOR option is 2 or 4 #38049

drfloob opened this issue Feb 15, 2020 · 2 comments · Fixed by #38053
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes.

Comments

@drfloob
Copy link
Contributor

drfloob commented Feb 15, 2020

The game crashes on start when SCALING_FACTOR option is 2 or 4.

Steps To Reproduce

  1. Start the game
  2. Set scaling factor to 2 or 4 in the Graphics Options menu
  3. Quit and Restart the game.

Or alternatively set SCALING_FACTOR=2 in ~/.cataclysm-dda/config/options.json

Versions and configuration

Game was built from source with commit 01d82b3 (2020.02.15). Ubuntu 18.04
Game version according to the main menu: Cataclysm DDA version 0.D-12288-g01d82b3dfd
Graphics version: Tiles
No Mods.

Crash and Debug logs attached
cataclysm-crash-20200115_12288-g01d82b3dfd.tar.gz

@drfloob
Copy link
Contributor Author

drfloob commented Feb 15, 2020

From the debug log attached above, the crux of the issue is:

src/options.cpp:613 [int options_manager::cOpt::value_as() const] DISPLAY tried to get integer value from option of type string_select

Also from my config:

{ "info": "Sets which video display will be used to show the game. Requires restart.", "default": "Default: 0 - Values: 0", "name": "DISPLAY", "value": "0" },

Somehow, treating this JSON "int" as an integer is causing the problem.

@drfloob
Copy link
Contributor Author

drfloob commented Feb 16, 2020

It's due to this change 5 days ago: #37548 . The DISPLAY setting conceptually went from being an int to a string. I'll add a patch to get it working again, but it seems wrong that this option is both a string and an int, it should probably just be an int.

drfloob added a commit to drfloob/Cataclysm-DDA that referenced this issue Feb 16, 2020
@Night-Pryanik Night-Pryanik added the <Crash / Freeze> Fatal bug that results in hangs or crashes. label Feb 16, 2020
ZhilkinSerg added a commit that referenced this issue Feb 16, 2020
Fixes #38049: Crash on start when SCALING_FACTOR option is 2 or 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants