Opened 22 months ago
Closed 22 months ago
#14105 closed defect (fixed)
GRAPHICS: ScummVM crash when I activate Opengl for GUI
Reported by: | legluondunet | Owned by: | lephilousophe |
---|---|---|---|
Priority: | normal | Component: | Graphics |
Version: | Keywords: | ||
Cc: | Game: |
Description
Hello,
If I activate Opengl for ScummVM gui, it immediatly crashes.
I joind log.
My config:
OS: Manjaro 22.0.2 Sikaris
Kernel: x86_64 Linux 6.1.9-1-MANJARO
CPU: AMD Ryzen 9 5900HX with Radeon Graphics @ 16x 3.3GHz
GPU: AMD Radeon RX 6600M (navi23, LLVM 15.0.7, DRM 3.49, 6.1.9-1-MANJARO)
Video drivers: Mesa 22.3.4
Attachments (2)
Change History (15)
comment:1 by , 22 months ago
comment:4 by , 22 months ago
Hi,
Can you attach a log with the output from "./scummvm -d6" instead? This will give us more OpenGL information, which could be helpful.
Thank you.
comment:5 by , 22 months ago
Component: | --Unset-- → Graphics |
---|---|
Summary: | ScummVM crash when I activate Opengl for GUI → GRAPHICS: ScummVM crash when I activate Opengl for GUI |
by , 22 months ago
Attachment: | scummvm.log added |
---|
comment:7 by , 22 months ago
The log has no backtrace so it's difficult to say where it aborts.
Could you:
- add --enable-asan to your configure command? (This would help us to make sure everything is properly initialized)
- run ScummVM under GDB?
For GDB, run the command gdb ./scummvm
At the gdb prompt, type run -d6 --gfx-mode=opengl
.
When the program crash, gdb will give the invite back and here type bt
.
Copy everything in a log file.
Thanks.
comment:8 by , 22 months ago
without gdb:
./scummvm
WARNING: Couldn't initialize text to speech through speech-dispatcher!
=================================================================
==64455==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 126 byte(s) in 1 object(s) allocated from:
#0 0x7fdee5ebfa89 in interceptor_malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7fdee4294758 (/usr/lib/libc.so.6+0x7b758)
#2 0xc97d3080f7b540ff (<unknown module>)
Direct leak of 88 byte(s) in 1 object(s) allocated from:
#0 0x7fdee5ebfa89 in interceptor_malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7fdee3b3957b in pa_xmalloc (/usr/lib/libpulse.so.0+0x3657b)
Direct leak of 14 byte(s) in 1 object(s) allocated from:
#0 0x7fdee5e72faa in interceptor_strdup /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_interceptors.cpp:439
#1 0x7fdedbd941a5 (/usr/lib/dri/radeonsi_dri.so+0x7941a5)
SUMMARY: AddressSanitizer: 228 byte(s) leaked in 3 allocation(s).
comment:9 by , 22 months ago
Like you asked I compiled today's scummvm git using add --enable-asan to configure.
I joined you configure log and gdb log.
by , 22 months ago
Attachment: | scummvm logs.zip added |
---|
comment:10 by , 22 months ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → pending |
I managed to replicate the bug and fix it in ecea1d5c396f51617ec4c55ae80d30979575e583 for master and 14d47b8b2c0abe925881d297ba0c8915c7bd4015 for stable.
Can you confirm?
Anyway, you have a strange DPI value, it is really low.
I suspect that the EDID provided by your display screen is bogus.
This is the reason why you were the first to be hit by the bug.
comment:11 by , 22 months ago
I got a similar crash today while debugging on Windows 10 x64 with WSL2 (Ubuntu 20.04.5 LTS, kernel 5.10.16.3-microsoft-standard-WSL2).
My setup uses a "Windows X server" app (VcXsrv, version 1.20.14.0) to display the graphic windows launched from the WSL environment, and apparently it gets hit by the same bug.
It didn't crash as soon as I enabled OpenGL mode, but if I then clicked on "Global Options" button, it would crash.
From my side, I can confirm the issue fixed with lephilousophe's commit above.
Also, this is just for the record and anyone that might run into the same issue as me: since DPI was not reported correctly on my setup, I kept getting super small fonts in the ScummVM GUI and at first I had to manually set "gui_scale" from scummvm.ini (under ~/.config/scummvm/scummvm.ini) to something extreme like "600"). This would work, but as soon as I'd Ok anything under Global Options, it would again reset to one of the preset ScummVM values (which only go up to "150", as far as I can tell).
It turns out this was an issue with Windows high DPI scaling (or some such) and I resolved this by overriding Windows' High DPI Scaling, setting the scaling to be performed by "Application" for the "vcxsrv.exe" app (under Properties->Compatibility (Tab)->Change High DPI Settings").
For reference, this post helped me solved the scaling issue: https://sourceforge.net/p/vcxsrv/discussion/986201/thread/86c22a03/
comment:12 by , 22 months ago
I can confirm that you fixed this bug, nice work.
But like you said and like Antoniou confirmed, it seems there is an issue with ScummVM and gui scaling with OpenGL, not only on Windows, but on Linux too.
I will open a new bug for this issue.
Thank you for your help "le Philousophe" j'aime beaucoup ton pseudo, je le trouve rigolo
comment:13 by , 22 months ago
Status: | pending → closed |
---|
$ ./scummvm -d 2
Debuglevel (from command line): 2
WARNING: Couldn't initialize text to speech through speech-dispatcher!
Using SDL Video Driver "x11"
Using SDL Audio Driver "pulseaudio"
Output sample rate: 44100 Hz
Output buffer size: 1024 samples
Output channels: 2
HardwareInput with ID 'JOY_START' not known
HardwareInput with ID 'JOY_LEFT_STICK_Y-' not known
HardwareInput with ID 'JOY_LEFT_STICK_Y+' not known
HardwareInput with ID 'JOY_LEFT_STICK_X-' not known
HardwareInput with ID 'JOY_LEFT_STICK_X+' not known
HardwareInput with ID 'JOY_RIGHT_SHOULDER' not known
generateZipSet: Loaded pack file: gui-icons-20221010.dat
generateZipSet: Loaded pack file: gui-icons-20220802.dat
generateZipSet: Loaded pack file: gui-icons-20220602.dat
generateZipSet: Loaded pack file: gui-icons-20211112.dat
WARNING: generateZipSet: Could not find 'gui-icons.dat'!
HardwareInput with ID 'JOY_A' not known
HardwareInput with ID 'JOY_Y' not known
HardwareInput with ID 'JOY_UP' not known
HardwareInput with ID 'JOY_DOWN' not known
HardwareInput with ID 'JOY_LEFT' not known
HardwareInput with ID 'JOY_RIGHT' not known
HardwareInput with ID 'JOY_START' not known
HardwareInput with ID 'JOY_LEFT_STICK_Y-' not known
HardwareInput with ID 'JOY_LEFT_STICK_Y+' not known
HardwareInput with ID 'JOY_LEFT_STICK_X-' not known
HardwareInput with ID 'JOY_LEFT_STICK_X+' not known
HardwareInput with ID 'JOY_RIGHT_SHOULDER' not known
HardwareInput with ID 'JOY_A' not known
HardwareInput with ID 'JOY_Y' not known
HardwareInput with ID 'JOY_UP' not known
HardwareInput with ID 'JOY_DOWN' not known
HardwareInput with ID 'JOY_LEFT' not known
HardwareInput with ID 'JOY_RIGHT' not known
HardwareInput with ID 'JOY_START' not known
HardwareInput with ID 'JOY_LEFT_STICK_Y-' not known
HardwareInput with ID 'JOY_LEFT_STICK_Y+' not known
HardwareInput with ID 'JOY_LEFT_STICK_X-' not known
HardwareInput with ID 'JOY_LEFT_STICK_X+' not known
HardwareInput with ID 'JOY_RIGHT_SHOULDER' not known
HardwareInput with ID 'JOY_A' not known
HardwareInput with ID 'JOY_Y' not known
HardwareInput with ID 'JOY_UP' not known
HardwareInput with ID 'JOY_DOWN' not known
HardwareInput with ID 'JOY_LEFT' not known
HardwareInput with ID 'JOY_RIGHT' not known
switching to OpenGL graphics
WARNING: generateZipSet: Could not find 'shaders.dat'!
WARNING: generateZipSet: Could not find 'shaders.dat'!
WARNING: generateZipSet: Could not find 'shaders.dat'!
HardwareInput with ID 'JOY_START' not known
HardwareInput with ID 'JOY_LEFT_STICK_Y-' not known
HardwareInput with ID 'JOY_LEFT_STICK_Y+' not known
HardwareInput with ID 'JOY_LEFT_STICK_X-' not known
HardwareInput with ID 'JOY_LEFT_STICK_X+' not known
HardwareInput with ID 'JOY_RIGHT_SHOULDER' not known
HardwareInput with ID 'JOY_A' not known
HardwareInput with ID 'JOY_Y' not known
HardwareInput with ID 'JOY_UP' not known
HardwareInput with ID 'JOY_DOWN' not known
HardwareInput with ID 'JOY_LEFT' not known
HardwareInput with ID 'JOY_RIGHT' not known
scummvm: ./common/rect.h :160 : Common::Rect::Rect(int16, int16, int16, int16): l'assertion « isValidRect() » a échoué.
Abandon (core dumped)