kcat / openal-soft

OpenAL Soft is a software implementation of the OpenAL 3D audio API.
Other
2.18k stars 526 forks source link

Segfault in dhewm3 #225

Closed xorw closed 6 years ago

xorw commented 6 years ago

Hi,

commit 634b13a6305be44486f0b82b5d042cb4505ee2c7 seems to cause a segfault in https://github.com/dhewm/dhewm3.git, the game crashes while loading a map:

... ----- Warnings ----- during game/delta4... WARNING: Couldn't load sound 'guisounds.wav' using default WARNING: Couldn't load sound 'soiund/xian/pulse.wav' using default 2 warnings

Thread 6 "dhewm3" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffe8f6e700 (LWP 3774)] MixRow_SSE (OutBuffer=0x7fffd4052ed0, Gains=, data=, InChans=, InPos=, BufferSize=131) at /home/wwa/src/games/tools/openal_soft.git/Alc/mixer/mixer_sse.c:241 241 dry4 = _mm_add_ps(dry4, _mm_mul_ps(val4, gain4)); (gdb) bt

0 MixRow_SSE (OutBuffer=0x7fffd4052ed0, Gains=, data=, InChans=, InPos=, BufferSize=131)

at /home/wwa/src/games/tools/openal_soft.git/Alc/mixer/mixer_sse.c:241

1 0x00007ffff7f0cc77 in ALreverbState_process (NumChannels=, SamplesOut=, SamplesIn=, SamplesToDo=,

State=0x7fffd4052730) at /home/wwa/src/games/tools/openal_soft.git/Alc/effects/reverb.c:1448

2 ALreverbState_ALeffectState_process (obj=0x7fffd4052730, a=, b=, c=, d=)

at /home/wwa/src/games/tools/openal_soft.git/Alc/effects/reverb.c:331

3 0x00007ffff7eff949 in aluMixData (device=device@entry=0x55555901a070, OutBuffer=, NumSamples=)

at /home/wwa/src/games/tools/openal_soft.git/Alc/ALu.c:1781

4 0x00007ffff7f1d931 in ALCplaybackAlsa_mixerProc (ptr=ptr@entry=0x5555584af1c0) at /home/wwa/src/games/tools/openal_soft.git/Alc/backends/alsa.c:558

5 0x00007ffff7f21987 in althrd_starter (arg=) at /home/wwa/src/games/tools/openal_soft.git/common/threads.c:487

6 0x00007ffff723ef2a in start_thread (arg=0x7fffe8f6e700) at pthread_create.c:463

7 0x00007ffff6e39edf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

(gdb) kill

my system: Linux tetranode 4.18.7 #1 SMP Wed Sep 12 01:53:12 CEST 2018 x86_64 GNU/Linux 02:00.0 Audio device: Creative Labs EMU20k2 [Sound Blaster X-Fi Titanium Series] (rev 03)

kcat commented 6 years ago

Interesting. With my tests, the reverb per-loop update size wouldn't go below the defined 256 length using normal device parameters. I guess you have a really low sample rate set?

In either case, it should be fixed now with commit 99737469e2678a6169462c8488b6f6080c7857b6.

xorw commented 6 years ago

commit 9973746 seems to fix the problem.

about sample rate: if you mean the output sample rate - I let openal decide... pretty sure it defaults to 44100

alsoft.log

alsoftrc.txt