diasurgical/devilutionX

[Issue Report]: crash on startup custscene

ildar opened this issue · 6 comments

Operating System

Linux x64

DevilutionX version

1.5.2

Describe

Selfbuilt program
Segfaults right after the message:

DEBUG: Cannot open stream: null rwops.
ERROR: Aulib::Stream::open (from SVidPlayBegin): Cannot open stream: null rwops.
DEBUG: Cannot open stream: null rwops.
ERROR: Aulib::Stream::open (from SVidPlayBegin): Cannot open stream: null rwops.
Ошибка сегментирования

To Reproduce

no ini file, just start the program. After Blizz vid it crashes.

Expected Behavior

No response

Additional context

setting Diablo Intro=0 helps. Can play with no problem. But later the Lazarus quest cutscene crashes the game.
Backtrace:

Thread 15 "SDLAudioP2" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffc3fff6c0 (LWP 1988069)]
0x00007ffff7edf3ad in Aulib::Decoder::decode (this=0x5555568c17b0, buf=0x7fffbc0039f0, len=1300, callAgain=@0x7fffc3ff69ff: false)
    at /usr/src/debug/devilutionX-1.5.2/3rdParty/SDL_audiolib/src/Decoder.cpp:174
174	    if (this->getChannels() == 1 and Aulib::channelCount() == 2) {
(gdb) bt
#0  0x00007ffff7edf3ad in Aulib::Decoder::decode (this=0x5555568c17b0, buf=0x7fffbc0039f0, len=1300, callAgain=@0x7fffc3ff69ff: false)
    at /usr/src/debug/devilutionX-1.5.2/3rdParty/SDL_audiolib/src/Decoder.cpp:174
#1  0x00007ffff7edfba8 in Aulib::Stream_priv::fSdlCallbackImpl (outLen=<optimized out>, out=0x7fffc4000040 "")
    at /usr/src/debug/devilutionX-1.5.2/3rdParty/SDL_audiolib/src/stream_p.cpp:156
#2  sdlCallback (out=0x7fffc4000040 "", outLen=<optimized out>) at /usr/src/debug/devilutionX-1.5.2/3rdParty/SDL_audiolib/src/aulib.cpp:25

This looks like an issue with playing the audio. Can you check what the size and MD5 sum of your diabdat.mpq is, maybe it is damaged?

To me, it looks like you are using a newer build of SDL_audiolib than the one we support. Blaming the error in their codebase points to a commit in Feb 2023.
https://github.com/realnc/SDL_audiolib/blame/master/src/Stream.cpp#L59-L62
realnc/SDL_audiolib@b2df2df

The commit we reference is cc1bb6af8d4cf5e200259072bde1edd1c8c5137e from Jul 2022.

URL https://github.com/realnc/SDL_audiolib/archive/cc1bb6af8d4cf5e200259072bde1edd1c8c5137e.tar.gz

realnc/SDL_audiolib@cc1bb6a

And our version doesn't raise the error in your issue report.
https://github.com/realnc/SDL_audiolib/blob/cc1bb6af8d4cf5e200259072bde1edd1c8c5137e/src/Stream.cpp#L51

That said, we might want to consider submitting a report to SDL_audiolib, unless we plan on never upgrading.

I think we have a tendency to upgrade things...