steam-audio icon indicating copy to clipboard operation
steam-audio copied to clipboard

[UE4] Crackling with non-default settings?

Open mastercoms opened this issue 3 years ago • 6 comments

Hello, was testing out the spatialization settings and it seems like only nearest-neighbor is working properly, bilinear is causing horrible crackling.

mastercoms avatar Jul 15 '22 14:07 mastercoms

Hi @mastercoms - Thanks for reporting. I can't seem to repro this issue on our end. Can you provide a sample project where you are facing the issue.

achandak avatar Jul 21 '22 00:07 achandak

Hi, thanks, will try to find a minimal reproduction.

mastercoms avatar Jul 21 '22 02:07 mastercoms

Hi, I still haven't figured out a reproduction in a fresh project, but after upgrading to 4.3.0 from 4.1.1, and some more testing, it seems unrelated to any one setting.

mastercoms avatar Aug 02 '23 15:08 mastercoms

I'm feeling like it's something to do with CPU usage and buffer underrun, given that toggling certain settings may make audio processing faster or slower. I will keep investigating what could be the cause here.

mastercoms avatar Aug 03 '23 04:08 mastercoms

Inspired by #140, I looked at our Steam Audio settings and tried resetting everything to default. It seems to be fixed for now, but given that the issue doesn't seem to happen consistently (I'm sorry for struggling to pin down this issue!), it may resurface after broader testing.

RealTimeCPUCoresPercentage=50 -> RealTimeCPUCoresPercentage=5

EDIT: yep, someone found a stress test which degrades the audio quality again

mastercoms avatar Aug 06 '23 13:08 mastercoms

I found these in the logs when it happens:

[2023.08.06-14.15.06:277][ 35]LogAudioMixer: Display: Audio Buffer Underrun (starvation) detected.
[2023.08.06-14.15.06:924][ 60]LogStats: FPlatformStackWalk::StackWalkAndDump -  0.675 s
[2023.08.06-14.15.06:925][ 60]LogOutputDevice: Error: === Handled ensure: ===
[2023.08.06-14.15.06:926][ 60]LogOutputDevice: Error: 
[2023.08.06-14.15.06:926][ 60]LogOutputDevice: Error: Ensure condition failed: this->Array.Num() == InitialNum [File:C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\Core\Public\Containers/SparseArray.h] [Line: 940]
[2023.08.06-14.15.06:927][ 60]LogOutputDevice: Error: Container has changed during ranged-for iteration!
[2023.08.06-14.15.06:928][ 60]LogOutputDevice: Error: Stack: 
[2023.08.06-14.15.06:929][ 60]LogOutputDevice: Error: [Callstack] 0x00007ffddf0d93d9 UE4Editor-Engine.dll!`TSparseArray<TSetElement<UActorComponent *>,TSparseArrayAllocator<TSizedDefaultAllocator<32>,FDefaultBitArrayAllocator> >::TRangedForConstIterator::operator!='::`2'::<lambda_1>::operator()() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\Core\Public\Containers\SparseArray.h:940]
[2023.08.06-14.15.06:930][ 60]LogOutputDevice: Error: [Callstack] 0x00007ffddd9d07cc UE4Editor-Engine.dll!AActor::FindComponentByClass() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\Engine\Private\Actor.cpp:2976]
[2023.08.06-14.15.06:931][ 60]LogOutputDevice: Error: [Callstack] 0x00007ffdb6a0782b UE4Editor-SteamAudio.dll!SteamAudio::FSteamAudioOcclusionPlugin::ProcessAudio() [C:\ProjectBorealis\ue4\dev\Engine\Plugins\Runtime\Steam\SteamAudio\Source\SteamAudio\Private\SteamAudioOcclusion.cpp:214]
[2023.08.06-14.15.06:932][ 60]LogOutputDevice: Error: [Callstack] 0x00007ffe258a81af UE4Editor-AudioMixer.dll!Audio::FMixerSourceManager::ComputePluginAudio() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\AudioMixer\Private\AudioMixerSourceManager.cpp:2028]
[2023.08.06-14.15.06:933][ 60]LogOutputDevice: Error: [Callstack] 0x00007ffe258a9286 UE4Editor-AudioMixer.dll!Audio::FMixerSourceManager::ComputePostSourceEffectBufferForIdRange() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\AudioMixer\Private\AudioMixerSourceManager.cpp:2345]
[2023.08.06-14.15.06:935][ 60]LogOutputDevice: Error: [Callstack] 0x00007ffe258af4b0 UE4Editor-AudioMixer.dll!FAsyncTask<Audio::FMixerSourceManager::FAudioMixerSourceWorker>::DoWork() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:271]
[2023.08.06-14.15.06:936][ 60]LogOutputDevice: Error: [Callstack] 0x00007ffe258aeece UE4Editor-AudioMixer.dll!FAsyncTask<Audio::FMixerSourceManager::FAudioMixerSourceWorker>::DoThreadedWork() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:296]
[2023.08.06-14.15.06:937][ 60]LogOutputDevice: Error: [Callstack] 0x00007ffdf696ce08 UE4Editor-Core.dll!FQueuedThread::Run() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\Core\Private\HAL\ThreadingBase.cpp:1041]
[2023.08.06-14.15.06:937][ 60]LogOutputDevice: Error: [Callstack] 0x00007ffdf6e1dc79 UE4Editor-Core.dll!FRunnableThreadWin::Run() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]
[2023.08.06-14.15.06:938][ 60]LogOutputDevice: Error: [Callstack] 0x00007ffdf6e12c27 UE4Editor-Core.dll!FRunnableThreadWin::GuardedRun() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:35]
[2023.08.06-14.15.06:939][ 60]LogOutputDevice: Error: [Callstack] 0x00007ffe6fcf26ad KERNEL32.DLL!UnknownFunction []
[2023.08.06-14.15.06:940][ 60]LogOutputDevice: Error: [Callstack] 0x00007ffe709aaa68 ntdll.dll!UnknownFunction []
[2023.08.06-14.15.06:941][ 60]LogOutputDevice: Error: 
[2023.08.06-14.15.06:941][ 60]LogStats:                SubmitErrorReport -  0.000 s
[2023.08.06-14.15.09:019][129]LogStats:                    SendNewReport -  2.105 s
[2023.08.06-14.15.09:019][129]LogStats:             FDebug::EnsureFailed -  2.780 s
[2023.08.06-14.15.14:945][441]LogThreadingWindows: Error: Runnable thread ThreadPool #11 crashed.
[2023.08.06-14.15.14:945][441]LogWindows: Error: === Critical error: ===
[2023.08.06-14.15.14:945][441]LogWindows: Error: 
[2023.08.06-14.15.14:945][441]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000002b0000000f
[2023.08.06-14.15.14:945][441]LogWindows: Error: 
[2023.08.06-14.15.14:945][441]LogWindows: Error: [Callstack] 0x00007ffddd9d07fe UE4Editor-Engine.dll!AActor::FindComponentByClass() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\Engine\Private\Actor.cpp:2978]
[2023.08.06-14.15.14:945][441]LogWindows: Error: [Callstack] 0x00007ffdb6a07ec5 UE4Editor-SteamAudio.dll!SteamAudio::FSteamAudioReverbPlugin::ProcessSourceAudio() [C:\ProjectBorealis\ue4\dev\Engine\Plugins\Runtime\Steam\SteamAudio\Source\SteamAudio\Private\SteamAudioReverb.cpp:382]
[2023.08.06-14.15.14:945][441]LogWindows: Error: [Callstack] 0x00007ffe258a805d UE4Editor-AudioMixer.dll!Audio::FMixerSourceManager::ComputePluginAudio() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\AudioMixer\Private\AudioMixerSourceManager.cpp:1999]
[2023.08.06-14.15.14:945][441]LogWindows: Error: [Callstack] 0x00007ffe258a9286 UE4Editor-AudioMixer.dll!Audio::FMixerSourceManager::ComputePostSourceEffectBufferForIdRange() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\AudioMixer\Private\AudioMixerSourceManager.cpp:2345]
[2023.08.06-14.15.14:945][441]LogWindows: Error: [Callstack] 0x00007ffe258af4b0 UE4Editor-AudioMixer.dll!FAsyncTask<Audio::FMixerSourceManager::FAudioMixerSourceWorker>::DoWork() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:271]
[2023.08.06-14.15.14:945][441]LogWindows: Error: [Callstack] 0x00007ffe258aeece UE4Editor-AudioMixer.dll!FAsyncTask<Audio::FMixerSourceManager::FAudioMixerSourceWorker>::DoThreadedWork() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\Core\Public\Async\AsyncWork.h:296]
[2023.08.06-14.15.14:945][441]LogWindows: Error: [Callstack] 0x00007ffdf696ce08 UE4Editor-Core.dll!FQueuedThread::Run() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\Core\Private\HAL\ThreadingBase.cpp:1041]
[2023.08.06-14.15.14:945][441]LogWindows: Error: [Callstack] 0x00007ffdf6e1dc79 UE4Editor-Core.dll!FRunnableThreadWin::Run() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]
[2023.08.06-14.15.14:945][441]LogWindows: Error: [Callstack] 0x00007ffdf6e12c27 UE4Editor-Core.dll!FRunnableThreadWin::GuardedRun() [C:\ProjectBorealis\ue4\dev\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:35]
[2023.08.06-14.15.14:945][441]LogWindows: Error: [Callstack] 0x00007ffe6fcf26ad KERNEL32.DLL!UnknownFunction []
[2023.08.06-14.15.14:945][441]LogWindows: Error: [Callstack] 0x00007ffe709aaa68 ntdll.dll!UnknownFunction []
[2023.08.06-14.15.14:945][441]LogWindows: Error: 
[2023.08.06-14.15.14:945][441]LogWindows: Error: Crash in runnable thread ThreadPool #11
[2023.08.06-14.15.14:959][442]LogExit: Executing StaticShutdownAfterError
[2023.08.06-14.15.14:959][442]LogWindows: FPlatformMisc::RequestExit(1)
[2023.08.06-14.15.14:959][442]LogWindows: FPlatformMisc::RequestExitWithStatus(1, 3)
[2023.08.06-14.15.14:959][442]LogCore: Engine exit requested (reason: Win RequestExit)

Also sometimes this comes up too:

LogAudioMixer: Error: Command Queue has grown to 1178k bytes, containing 10963 cmds, last pump was 2600.663600ms ago.
LogAudioMixer: Error: Command Queue has grown to 2232k bytes, containing 20767 cmds, last pump was 5020.206900ms ago.

mastercoms avatar Aug 06 '23 14:08 mastercoms