Opened 3 years ago

Closed 3 years ago

#12737 closed defect (fixed)

GUI: SIGSEGV when running ./scummvm with disabled translations on macOS

Reported by: dwatteau Owned by: criezy
Priority: normal Component: GUI
Version: Keywords: sigsegv, disabled translations
Cc: Game:

Description

This is on macOS Mojave 10.14.6 (with a Retina screen).

Building from Git with the following configure options:

./configure --disable-all-engines --enable-debug --disable-translation

and then just running ScummVM this way:

./scummvm

gives me an immediate "Segmentation fault: 11" error, unless I stop building with --disable-translation.

Of course, if I just run it this way, most .dat files won't be found, so I fall back to the builtin theme, translations won't be found, engines requiring dat files would fail, and so on. So it's not the good way to run it, but it works for most of my quick tests, and I think that it should at least handle this use-case in a more graceful way than a SIGSEGV, here (?).

git-bisect seems to relate this to commit 65e38680dda3d631b25f01498dbc0f6fc84186cf (where there is indeed a USE_TRANSLATION ifdef).

lldb backtrace is attached.

Attachments (2)

lldb_sigsegv_macos_disabled_translations.txt (3.6 KB ) - added by dwatteau 3 years ago.
lldb backtrace
scummvm_trac_12737_config_and_libs.txt (5.1 KB ) - added by dwatteau 3 years ago.
configure output and list of enabled libs (from Homebrew), if this matters

Download all attachments as: .zip

Change History (6)

by dwatteau, 3 years ago

lldb backtrace

by dwatteau, 3 years ago

configure output and list of enabled libs (from Homebrew), if this matters

comment:1 by digitall, 3 years ago

@dwatteau: This shouldn't really crash, but given your backtrace and the bisection you have indicated, it appears this is failing to parse the theme file and load any fonts, thus it crashes when it tries to size the first font when rendering the GUI.

I think this might be an issue with the scummvm configuration file, specifically the theme path which is probably defaulting to the standard installation location rather than the location of your local build tree.

You might want to check the theme path is set for the gui/themes directory of your development build folder: https://docs.scummvm.org/en/v2.2-docs/settings/paths.html?highlight=theme%20path

The keys are gui_theme and themepath in the scummvm configuration file used:
https://docs.scummvm.org/en/v2.2-docs/advanced_topics/configuration_file.html

comment:2 by digitall, 3 years ago

The point here is that running a local development build from git _usually_ works fine with the older installation configuration file, themes etc. but if the themes are updated, fonts added... then this can break if the theme and extra paths are not changed from the default to a specific path for the development git tree version.

comment:3 by criezy, 3 years ago

I can reproduce the issue. This is a regression from 65e38680d (GUI: Added XML theme setting for overriding the fonts depending on the selected language.).
It indeed fails to load any font, and I think I know what is wrong. I should have a fix for it soon.

comment:4 by criezy, 3 years ago

Owner: set to criezy
Resolution: fixed
Status: newclosed

Fixed in commit fe41c9bd7d.

Note: See TracTickets for help on using tickets.