Debian Buster, RPi1/256Mb, armv7, HEAD (https://github.com/diasurgical/devilutionX/commit/09bd5f0bd88b07464fa55f76be5f74e284798cb0)
Set resolution via raspi-config
$ tvservice -s
state 0xa [HDMI CEA (4) RGB lim 16:9], 1280x720 @ 60.00Hz, progressive
Start in CLI mode not X!
On first start I get this crash: https://gist.github.com/licaon-kter/9e56ef45610330306f37edc60cf6001f
_It appears to work in the next start, but that warrants another issue as there's no image (the game works since there's sound and buttons react to the mouse moving)._
FYI works fine if RPi resolution is setup as 640x480 via raspi-config
Try to disable upscaling, I know the RPi's GPU driver isn't the most stable one.
@licaon-kter could you post your ini settings?
That's the fun part, crashes when there's no INI (yet)
I'll have to retry with an INI that's missing resolution.
See OP: "first start" aka no ini vs "next start" aka default ini
Ok could you try with the latest code, there a crash fix that might be related.
Nope
GNU gdb (Raspbian 8.2.1-2) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./devilutionx...done.
(gdb) r
Starting program: /home/pi/d1/devilutionx
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0xb5946f70 (LWP 1673)]
[New Thread 0xb5145f70 (LWP 1674)]
[New Thread 0xb4944f70 (LWP 1675)]
[New Thread 0xb3ffef70 (LWP 1676)]
[New Thread 0xb37fdf70 (LWP 1677)]
[New Thread 0xb2ffcf70 (LWP 1678)]
[New Thread 0x93370f70 (LWP 1679)]
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
[Thread 0x93370f70 (LWP 1679) exited]
[New Thread 0xb6fb2f70 (LWP 1681)]
INFO: Unhandled SDL event: SDL_AUDIODEVICEADDED 0
INFO: Unhandled SDL event: SDL_AUDIODEVICEADDED 1
[Detaching after fork from child process 1682]
INFO: No message system available
INFO: SDL Error
INFO: Failed to link shader program
The error occurred at: SourceX/dx.cpp line 281
Thread 1 "devilutionx" received signal SIGSEGV, Segmentation fault.
0xb6f15c5c in Mix_HaltChannel ()
from /usr/lib/arm-linux-gnueabihf/libSDL2_mixer-2.0.so.0
(gdb) bt
#0 0xb6f15c5c in Mix_HaltChannel ()
from /usr/lib/arm-linux-gnueabihf/libSDL2_mixer-2.0.so.0
#1 0xb6f15cac in Mix_HaltChannel ()
from /usr/lib/arm-linux-gnueabihf/libSDL2_mixer-2.0.so.0
#2 0x000c0e0c in dvl::sound_stop ()
at /home/pi/devilutionX/Source/effects.cpp:1162
#3 0x000c0ec8 in dvl::effects_cleanup_sfx ()
at /home/pi/devilutionX/Source/effects.cpp:1187
#4 0x00091af4 in dvl::diablo_deinit ()
at /home/pi/devilutionX/Source/diablo.cpp:319
#5 0x00091bb8 in dvl::diablo_quit (exitStatus=1)
at /home/pi/devilutionX/Source/diablo.cpp:336
#6 0x0007d708 in dvl::app_fatal (pszFmt=0x0)
at /home/pi/devilutionX/Source/appfat.cpp:36
#7 0x0007d934 in dvl::ErrDlg (title=0x1efb90 "SDL Error",
error=0xb6f04d14 "No message system available",
log_file_path=0x1efb80 "SourceX/dx.cpp", log_line_nr=281)
at /home/pi/devilutionX/Source/appfat.cpp:114
#8 0x00017914 in dvl::RenderPresent () at /home/pi/devilutionX/SourceX/dx.cpp:281
#9 0x0004c92c in dvl::LoadBackgroundArt (pszFile=0x2137c0 "ui_art\\black.pcx")
at /home/pi/devilutionX/SourceX/DiabloUI/diabloui.cpp:594
#10 0x00050e28 in dvl::(anonymous namespace)::Init (text=0x1efb90 "SDL Error",
caption=0xbeffe808 "Failed to link shader program\n\nThe error occurred at: Sou
rceX/dx.cpp line 281", error=true, renderBehind=false)
at /home/pi/devilutionX/SourceX/DiabloUI/dialogs.cpp:187
#11 0x00051314 in dvl::UiOkDialog (text=0x1efb90 "SDL Error",
caption=0xbeffe808 "Failed to link shader program\n\nThe error occurred at: Sou
rceX/dx.cpp line 281", error=true,
renderBehind=std::vector of length 0, capacity 0)
at /home/pi/devilutionX/SourceX/DiabloUI/dialogs.cpp:286
#12 0x00051450 in dvl::UiErrorOkDialog (text=0x1efb90 "SDL Error",
caption=0xbeffe808 "Failed to link shader program\n\nThe error occurred at: Sou
rceX/dx.cpp line 281", error=true)
at /home/pi/devilutionX/SourceX/DiabloUI/dialogs.cpp:299
#13 0x0007d92c in dvl::ErrDlg (title=0x1efb90 "SDL Error",
error=0xb6f04d14 "No message system available",
log_file_path=0x1efb80 "SourceX/dx.cpp", log_line_nr=281)
at /home/pi/devilutionX/Source/appfat.cpp:113
#14 0x00017914 in dvl::RenderPresent () at /home/pi/devilutionX/SourceX/dx.cpp:281
#15 0x000298dc in dvl::SVidPlayContinue ()
at /home/pi/devilutionX/SourceX/storm/storm.cpp:795
#16 0x00149670 in dvl::play_movie (pszMovie=0x217114 "gendata\\logo.smk",
user_can_close=1) at /home/pi/devilutionX/Source/movie.cpp:48
#17 0x00091a74 in dvl::diablo_splash ()
at /home/pi/devilutionX/Source/diablo.cpp:306
#18 0x00091be8 in dvl::DiabloMain (argc=1, argv=0xbefff224)
at /home/pi/devilutionX/Source/diablo.cpp:344
#19 0x0005e044 in main (argc=1, argv=0xbefff224)
at /home/pi/devilutionX/SourceX/main.cpp:28
(gdb)
INFO: Failed to link shader program
Ok this is definatly the driver failing to setup OpenGL. Please disable upscaling and try again.
Right, that makes it not crash.
Ok, sorry but I'm going to close the issue as the fault is with the system being used not with the game it self.
Switching back to state 0xa [HDMI CEA (1) RGB full 4:3], 640x480 @ 60.00Hz, progressive again, no error.
What do you mean by system? Are shaders resolution dependant?
The game works fine on other systems at 1280x720, so it's a problem with your system not being able to run the game at that resolution. Maybe the GPU doesn't have enough memory, but it could also be other issues with the GPU driver.
"Failed to link shader program" is related to GPU driver. It's possible that it doesn't allocate enough memory when running without X. One thing is sure, it is very much out of our control.
There are others getting the same error with other application on RPi https://www.raspberrypi.org/forums/viewtopic.php?t=157193
At 640x480 it doesn't need to upscale so this could be why you do not get the error at that resolution.
Right, so bumping the memory split to 64Mb for GPU and now everything works. Thanks
Most helpful comment
Right, so bumping the memory split to 64Mb for GPU and now everything works. Thanks