Assertion failed: InSrcBufferData while playing imported sounds

I’m attempting to import some converted sound effects on Linux. Importing seems to work at first, however, when attempting to play said files (through the Editor or in-game) it immediately crashes.

[2018.07.13-20.55.30:311][596]LogCore: Error: appError called: Assertion failed: InSrcBufferData [File:/opt/unreal/Engine/Source/Runtime/Engine/Private/ADPCMAudioInfo.cpp] [Line: 76]       
[2018.07.13-20.55.30:328][596]LogCore: === Critical error: ===
Unhandled Exception: SIGSEGV: invalid attempt to write memory at address 0x0000000000000003
[2018.07.13-20.55.30:328][596]LogCore: Assertion failed: InSrcBufferData [File:/opt/unreal/Engine/Source/Runtime/Engine/Private/ADPCMAudioInfo.cpp] [Line: 76]
0x00007fb52db4e743 libUE4Editor-Core.so!FGenericPlatformMisc::RaiseException(unsigned int) [/opt/unreal/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformMisc.cpp:391]
0x00007fb52750a71a libUE4Editor-ApplicationCore.so!FUnixErrorOutputDevice::Serialize(wchar_t const*, ELogVerbosity::Type, FName const&) [/opt/unreal/Engine/Source/Runtime/ApplicationCore/Private/Unix/UnixErrorOutputDevice.cpp:57]
0x00007fb52dd2065f libUE4Editor-Core.so!FOutputDevice::LogfImpl(wchar_t const*, ...) [/opt/unreal/Engine/Source/Runtime/Core/Private/Misc/OutputDevice.cpp:70]
0x00007fb52dca26c5 libUE4Editor-Core.so!FDebug::AssertFailed(char const*, char const*, int, wchar_t const*, ...) [/opt/unreal/Engine/Source/Runtime/Core/Public/Misc/OutputDevice.h:216]
0x00007fb52a26f92f libUE4Editor-Engine.so!FADPCMAudioInfo::ReadCompressedInfo(unsigned char const*, unsigned int, FSoundQualityInfo*) [/opt/unreal/Engine/Source/Runtime/Engine/Private/ADPCMAudioInfo.cpp:76]
0x00007fb52a4af4b4 libUE4Editor-Engine.so!FAsyncAudioDecompressWorker::DoWork() [/opt/unreal/Engine/Source/Runtime/Engine/Private/AudioDecompress.cpp:628]
0x00007fb52a506ebe libUE4Editor-Engine.so!FAsyncTask<FAsyncAudioDecompressWorker>::DoWork() [/opt/unreal/Engine/Source/Runtime/Core/Public/Async/AsyncWork.h:263]
0x00007fb52a508117 libUE4Editor-Engine.so!FAsyncTask<FAsyncAudioDecompressWorker>::Start(bool, FQueuedThreadPool*) [/opt/unreal/Engine/Source/Runtime/Core/Public/Async/AsyncWork.h:252]
0x00007fb52a4d882b libUE4Editor-Engine.so!FAudioDevice::Precache(USoundWave*, bool, bool, bool) [/opt/unreal/Engine/Source/Runtime/Core/Public/Async/AsyncWork.h:396]
0x00007fb50fbf09d4 libUE4Editor-AudioMixer.so!Audio::FMixerBuffer::Init(FAudioDevice*, USoundWave*, bool) [/opt/unreal/Engine/Source/Runtime/AudioMixer/Private/AudioMixerBuffer.cpp:204]
0x00007fb50fc0c041 libUE4Editor-AudioMixer.so!Audio::FMixerSource::PrepareForInitialization(FWaveInstance*) [/opt/unreal/Engine/Source/Runtime/AudioMixer/Private/AudioMixerSource.cpp:347]
0x00007fb52a4cf10a libUE4Editor-Engine.so!FAudioDevice::StartSources(TArray<FWaveInstance*, FDefaultAllocator>&, int, bool) [/opt/unreal/Engine/Source/Runtime/Engine/Private/AudioDevice.cpp:3294]
0x00007fb52a4d099b libUE4Editor-Engine.so!FAudioDevice::Update(bool) [/opt/unreal/Engine/Source/Runtime/Engine/Private/AudioDevice.cpp:3531]
0x00007fb52a4dc435 libUE4Editor-Engine.so!FAudioDeviceManager::UpdateActiveAudioDevices(bool) [/opt/unreal/Engine/Source/Runtime/Engine/Private/AudioDeviceManager.cpp:313]
0x00007fb523d93d51 libUE4Editor-UnrealEd.so!UEditorEngine::Tick(float, bool) [/opt/unreal/Engine/Source/Editor/UnrealEd/Private/EditorEngine.cpp:1910]
0x00007fb524821926 libUE4Editor-UnrealEd.so!UUnrealEdEngine::Tick(float, bool) [/opt/unreal/Engine/Source/Editor/UnrealEd/Private/UnrealEdEngine.cpp:400]
0x000000000023bc4d UE4Editor!FEngineLoop::Tick() [/opt/unreal/Engine/Source/Runtime/Launch/Private/LaunchEngineLoop.cpp:3483]
0x0000000000243e93 UE4Editor!GuardedMain(wchar_t const*) [/opt/unreal/Engine/Source/Runtime/Launch/Private/Launch.cpp:62]
0x00007fb522b59fca libUE4Editor-UnixCommonStartup.so!CommonUnixMain(int, char**, int (*)(wchar_t const*)) [/opt/unreal/Engine/Source/Runtime/Unix/UnixCommonStartup/Private/UnixCommonStartup.cpp:241]
0x00007fb5225b606b libc.so.6!__libc_start_main(+0xea)
0x0000000000230029 UE4Editor!_start()

I’ve encountered a similar issue in a past version of the engine, there was a workaround however: if you save immediately after importing and then restart the editor, the sound file will play without crashing. Sadly this workaround doesn’t seem to work anymore.

  • 4.20 preview 5
  • Launch arguments: UE4Editor (…) -debug -ansimalloc (dropping -ansimalloc made no difference)
  • Project was initially from 4.19.2.
  • Sounds present in project play fine, but moving them (within the Editor) will also cause a crash!

Neither of these files will work:

  • wolf3d-pickup.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 44100 Hz
  • wolf3d-pickup.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz

Both were converted using ffmpeg

Perhaps it was issue of timing, but the release of 4.20 seems to have fixed this.