diasurgical / devilutionX

Diablo build for modern operating systems
Other
7.99k stars 781 forks source link

segfault on new game "Couldn't open ~/apps/games/diablo/assets/ui_art/menu.png" #3909

Closed DrItanium closed 2 years ago

DrItanium commented 2 years ago

Important information Operation System: Gentoo Linux amd64 Kernel: Linux durandal 5.10.61-gentoo-x86_64 #1 SMP Tue Oct 5 21:59:47 PDT 2021 x86_64 CPU: AMD Ryzen Threadripper 2970WX Compilation Style: devilutionX was built from source, downloaded devilutionx.mpq pre built from this repo DevilutionX Version: 1.3.0-e12ADF68 (Debug for getting the stack trace) DIABDAT.MPQ comes from the GOG Release extracted via a Wine installation of the game

Describe Entering a single player game causes a segfault to happen when the loading bar hits 50%

Here is the full log:

jwscoggins@durandal diablo$ ./devilutionx --verbose
VERBOSE: Paths:
    base: /home/jwscoggins/apps/games/diablo/
    pref: /home/jwscoggins/.local/share/diasurgical/devilution/
  config: /home/jwscoggins/.local/share/diasurgical/devilution/
  assets: /home/jwscoggins/apps/games/diablo/assets/
VERBOSE: MPQ search paths:
     1. '/home/jwscoggins/apps/games/diablo/'
     2. '/home/jwscoggins/.local/share/diasurgical/devilution/'
     3. '/usr/share/diasurgical/devilutionx/'
     4. '/usr/local/share/diasurgical/devilutionx/'
     5. ''
VERBOSE:   Found: devilutionx.mpq in /home/jwscoggins/.local/share/diasurgical/devilution/
VERBOSE: Missing: fonts.mpq
VERBOSE: Missing: .mpq
VERBOSE: Missing: DIABDAT.MPQ
VERBOSE:   Found: diabdat.mpq in /home/jwscoggins/.local/share/diasurgical/devilution/
VERBOSE: Missing: hellfire.mpq
VERBOSE: Missing: hfmonk.mpq
VERBOSE: Missing: hfbard.mpq
VERBOSE: Missing: hfbarb.mpq
VERBOSE: Missing: hfmusic.mpq
VERBOSE: Missing: hfvoice.mpq
DEBUG: Failed loading udev_device_get_action: /usr/lib64/libSDL2-2.0.so.0: undefined symbol: _udev_device_get_action
DEBUG: Using udev for joystick device discovery
INFO: OpenGL shaders: ENABLED
INFO: Created renderer: opengl
DEBUG: Couldn't open /home/jwscoggins/apps/games/diablo/assets/en.mo
DEBUG: Couldn't open /home/jwscoggins/apps/games/diablo/assets/en.gmo
DEBUG: Couldn't open /home/jwscoggins/apps/games/diablo/assets/ui_art/hero0.pcx
DEBUG: Couldn't open /home/jwscoggins/apps/games/diablo/assets/ui_art/hero1.pcx
DEBUG: Couldn't open /home/jwscoggins/apps/games/diablo/assets/ui_art/hero2.pcx
DEBUG: Couldn't open /home/jwscoggins/apps/games/diablo/assets/ui_art/hero3.pcx
DEBUG: Couldn't open /home/jwscoggins/apps/games/diablo/assets/ui_art/hero4.pcx
DEBUG: Couldn't open /home/jwscoggins/apps/games/diablo/assets/ui_art/hero5.pcx
DEBUG: Couldn't open /home/jwscoggins/apps/games/diablo/assets/ui_art/hero6.pcx
INFO: Removed file: /home/jwscoggins/.local/share/diasurgical/devilution/Diablo1ReadOnlyTest.foo
SDL initialized with sample format: S16LSB
VERBOSE: Aulib sampleRate=44100 channels=2 frameSize=940 format=0x8010
VERBOSE: SVid audio depth=16 channels=1 rate=22050
DEBUG: Unhandled SDL event: SDL_AUDIODEVICEADDED 0
DEBUG: Unhandled SDL event: SDL_AUDIODEVICEADDED 0
DEBUG: Unhandled SDL event: SDL_AUDIODEVICEADDED 1
DEBUG: Unhandled SDL event: SDL_AUDIODEVICEADDED 1
DEBUG: Unhandled SDL event: SDL_AUDIODEVICEADDED 2
DEBUG: Unhandled SDL event: SDL_WINDOWEVENT 10
DEBUG: Unhandled SDL event: SDL_KEYMAPCHANGED 0
DEBUG: Opening /home/jwscoggins/.local/share/diasurgical/devilution/single_0.sv
DEBUG: GetFileSize("/home/jwscoggins/.local/share/diasurgical/devilution/single_0.sv") = 75955
VERBOSE: new std::fstream("/home/jwscoggins/.local/share/diasurgical/devilution/single_0.sv", std::ios::binary | std::ios::in | std::ios::out)
VERBOSE: read(out, 104)
VERBOSE: read(out, 32768)
VERBOSE: read(out, 32768)
DEBUG: Closing /home/jwscoggins/.local/share/diasurgical/devilution/single_0.sv
DEBUG: Couldn't open /home/jwscoggins/apps/games/diablo/assets/ui_art/menu.png
AddressSanitizer:DEADLYSIGNAL
=================================================================
==12094==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000020 (pc 0x7fb4f1760dc0 bp 0x7ffe78517dd0 sp 0x7ffe78517da8 T0)
==12094==The signal is caused by a READ memory access.
==12094==Hint: address points to the zero page.
    #0 0x7fb4f1760dc0  (/usr/lib64/libSDL2-2.0.so.0+0x4bdc0)
    #1 0x5643dfa10bc5 in devilution::LoadPNG(char const*) /home/jwscoggins/dev/devilutionX/Source/utils/png.h:47
    #2 0x5643dfa02864 in devilution::VirtualMenuPanelRenderer::LoadArt(SDL_Renderer*) /home/jwscoggins/dev/devilutionX/Source/controls/touch/renderers.cpp:221
    #3 0x5643dfa02664 in devilution::VirtualGamepadRenderer::LoadArt(SDL_Renderer*) /home/jwscoggins/dev/devilutionX/Source/controls/touch/renderers.cpp:213
    #4 0x5643dfa0ea87 in devilution::InitVirtualGamepadGFX(SDL_Renderer*) /home/jwscoggins/dev/devilutionX/Source/controls/touch/renderers.cpp:527
    #5 0x5643dee444d8 in devilution::LoadGameLevel(bool, devilution::lvl_entry) /home/jwscoggins/dev/devilutionX/Source/diablo.cpp:1912
    #6 0x5643defb6865 in devilution::ShowProgress(devilution::interface_mode) /home/jwscoggins/dev/devilutionX/Source/interfac.cpp:259
    #7 0x5643dee2adcd in StartGame /home/jwscoggins/dev/devilutionX/Source/diablo.cpp:159
    #8 0x5643dee30181 in RunGameLoop /home/jwscoggins/dev/devilutionX/Source/diablo.cpp:691
    #9 0x5643dee42407 in devilution::StartGame(bool, bool) /home/jwscoggins/dev/devilutionX/Source/diablo.cpp:1601
    #10 0x5643df0e2577 in InitMenu /home/jwscoggins/dev/devilutionX/Source/menu.cpp:52
    #11 0x5643df0e25da in InitSinglePlayerMenu /home/jwscoggins/dev/devilutionX/Source/menu.cpp:62
    #12 0x5643df0e3117 in devilution::mainmenu_loop() /home/jwscoggins/dev/devilutionX/Source/menu.cpp:157
    #13 0x5643dee425bd in devilution::DiabloMain(int, char**) /home/jwscoggins/dev/devilutionX/Source/diablo.cpp:1639
    #14 0x5643ded7d865 in main /home/jwscoggins/dev/devilutionX/Source/main.cpp:44
    #15 0x7fb4f087a7fc in __libc_start_main (/lib64/libc.so.6+0x237fc)
    #16 0x5643ded7d749 in _start (/home/jwscoggins/apps/games/diablo/devilutionx+0x169e749)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/lib64/libSDL2-2.0.so.0+0x4bdc0) 
==12094==ABORTING

I fully acknowledge that I'm probably doing some dumb but I'm not sure what that is...

Let me know if you need any more information.

To Reproduce

  1. Start devilutionX
  2. Click Single Player
  3. Select a character and hit ok
  4. Select a difficulty and hit ok
  5. Crash will happen during load

Expected behavior A single player game starting up

Additional context I have tried the following filesystem layout combinations:

  1. The two mpq files (DIABDAT.MPQ and devilutionx.mpq) sit next to the devilutionx executable
  2. The two mpq files are located at $HOME/.local/diasurgical/devilutionx

I get the same error from the Release and Debug builds of the game

EDIT: updated to show the console with --verbose

glebm commented 2 years ago

downloaded devilutionx.mpq pre built from this repo

The prebuilt devilutionx.mpq for 1.3.0 is not compatible with master. If you install smpq, devilutionx.mpq will be built next to the binary.

DrItanium commented 2 years ago

Thank you. I figured it was something simple. I'll install that application and rerun the build