RuntimeAudioImporter: some interesting bugs
i have three bugs for you.
i should preface by saying im using an ogg file for all this
so the first is a small one (but may be easy to fix). the audio will pop at the start when its played. basically just that. it doesnt matter the play time. its also not that loud.
the second is; on the first play of the audio, if i play the audio from any other value than 0, the editor will crash. if i play the audio (from 0) then stop or pause the audio, the audio will not play again. the editor wont crash, just nothing will happen.
Assertion failed: InWave->GetPrecacheState() == ESoundWavePrecacheState::Done [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/AudioMixer/Private/AudioMixerBuffer.cpp] [Line: 359]
UE4Editor_Core!AssertFailedImplV() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:104]
UE4Editor_Core!FDebug::CheckVerifyFailedImpl() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:461]
UE4Editor_AudioMixer!Audio::FMixerBuffer::CreateRealTimeBuffer() [D:\Build\++UE4\Sync\Engine\Source\Runtime\AudioMixer\Private\AudioMixerBuffer.cpp:359]
UE4Editor_AudioMixer!Audio::FMixerBuffer::Init() [D:\Build\++UE4\Sync\Engine\Source\Runtime\AudioMixer\Private\AudioMixerBuffer.cpp:279]
UE4Editor_AudioMixer!Audio::FMixerSource::PrepareForInitialization() [D:\Build\++UE4\Sync\Engine\Source\Runtime\AudioMixer\Private\AudioMixerSource.cpp:707]
UE4Editor_Engine!FAudioDevice::StartSources() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\AudioDevice.cpp:4086]
UE4Editor_Engine!FAudioDevice::Update() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\AudioDevice.cpp:4379]
UE4Editor_Engine!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(void),0> >::ExecuteTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:886]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:709]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:601]
UE4Editor_Engine!FAudioThread::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\AudioThread.cpp:203]
UE4Editor_Core!FRunnableThreadWin::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]
this is my setup for that.

the third is; if i compress the audio, the editor will sometimes crash (about 50/50) without me using the sound wav (ie, crash upon finishing compression). for all the tests iv left quality at 100. changing this doesnt seem to do anything, so iv left it where it is
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x000001cbbad40000
UE4Editor_RuntimeAudioImporter!VorbisTranscoder::Encode() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\AudioAnalysisTools\Source\RuntimeAudioImporter\Private\Transcoders\VorbisTranscoder.cpp:133]
UE4Editor_RuntimeAudioImporter!<lambda_98de2f37158bb32cb37169b01d7e2e50>::operator()() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\AudioAnalysisTools\Source\RuntimeAudioImporter\Private\RuntimeAudioImporterLibrary.cpp:262]
UE4Editor_Core!TGraphTask<FAsyncGraphTask>::ExecuteTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:886]
UE4Editor_Core!FTaskThreadAnyThread::ProcessTasks() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:1065]
UE4Editor_Core!FTaskThreadAnyThread::ProcessTasksUntilQuit() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:888]
UE4Editor_Core!FTaskThreadAnyThread::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:965]
UE4Editor_Core!FRunnableThreadWin::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]
if the editor doesnt crash upon loading, then it will crash upon trying to play. this used to be not the case, but im guessing an update change something and its causing havoc. even then, it previously would only work under certain conditions (i think compression buffer and fill PCM Buffer would work, but raw wave would not? cant remember. its been about a month)
here are some recent crashes. see if any of them tell you whats going on. heres my blueprint setup

just filling the compression buffer and nothing else
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x000001fc9cf00000
UE4Editor_RuntimeAudioImporter!VorbisTranscoder::Encode() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\AudioAnalysisTools\Source\RuntimeAudioImporter\Private\Transcoders\VorbisTranscoder.cpp:133]
UE4Editor_RuntimeAudioImporter!<lambda_98de2f37158bb32cb37169b01d7e2e50>::operator()() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\AudioAnalysisTools\Source\RuntimeAudioImporter\Private\RuntimeAudioImporterLibrary.cpp:262]
UE4Editor_Core!TGraphTask<FAsyncGraphTask>::ExecuteTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:886]
UE4Editor_Core!FTaskThreadAnyThread::ProcessTasks() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:1065]
UE4Editor_Core!FTaskThreadAnyThread::ProcessTasksUntilQuit() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:888]
UE4Editor_Core!FTaskThreadAnyThread::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:965]
UE4Editor_Core!FRunnableThreadWin::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]
just filling the PCM buffer and nothing else
Assertion failed: InWave->GetPrecacheState() == ESoundWavePrecacheState::Done [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/AudioMixer/Private/AudioMixerBuffer.cpp] [Line: 359]
UE4Editor_Core!AssertFailedImplV() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:104]
UE4Editor_Core!FDebug::CheckVerifyFailedImpl() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:461]
UE4Editor_AudioMixer!Audio::FMixerBuffer::CreateRealTimeBuffer() [D:\Build\++UE4\Sync\Engine\Source\Runtime\AudioMixer\Private\AudioMixerBuffer.cpp:359]
UE4Editor_AudioMixer!Audio::FMixerBuffer::Init() [D:\Build\++UE4\Sync\Engine\Source\Runtime\AudioMixer\Private\AudioMixerBuffer.cpp:279]
UE4Editor_AudioMixer!Audio::FMixerSource::PrepareForInitialization() [D:\Build\++UE4\Sync\Engine\Source\Runtime\AudioMixer\Private\AudioMixerSource.cpp:707]
UE4Editor_Engine!FAudioDevice::StartSources() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\AudioDevice.cpp:4086]
UE4Editor_Engine!FAudioDevice::Update() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\AudioDevice.cpp:4379]
UE4Editor_Engine!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(void),0> >::ExecuteTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:886]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:709]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:601]
UE4Editor_Engine!FAudioThread::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\AudioThread.cpp:203]
UE4Editor_Core!FRunnableThreadWin::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]
filling the RAWWAV Buffer and nothing else
Assertion failed: InWave->GetPrecacheState() == ESoundWavePrecacheState::Done [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/AudioMixer/Private/AudioMixerBuffer.cpp] [Line: 359]
UE4Editor_Core!AssertFailedImplV() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:104]
UE4Editor_Core!FDebug::CheckVerifyFailedImpl() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:461]
UE4Editor_AudioMixer!Audio::FMixerBuffer::CreateRealTimeBuffer() [D:\Build\++UE4\Sync\Engine\Source\Runtime\AudioMixer\Private\AudioMixerBuffer.cpp:359]
UE4Editor_AudioMixer!Audio::FMixerBuffer::Init() [D:\Build\++UE4\Sync\Engine\Source\Runtime\AudioMixer\Private\AudioMixerBuffer.cpp:279]
UE4Editor_AudioMixer!Audio::FMixerSource::PrepareForInitialization() [D:\Build\++UE4\Sync\Engine\Source\Runtime\AudioMixer\Private\AudioMixerSource.cpp:707]
UE4Editor_Engine!FAudioDevice::StartSources() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\AudioDevice.cpp:4086]
UE4Editor_Engine!FAudioDevice::Update() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\AudioDevice.cpp:4379]
UE4Editor_Engine!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(void),0> >::ExecuteTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:886]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:709]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:601]
UE4Editor_Engine!FAudioThread::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\AudioThread.cpp:203]
UE4Editor_Core!FRunnableThreadWin::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 26 (10 by maintainers)
Commits related to this issue
- Fixing some bugs specified in #17 — committed to gtreshchev/RuntimeAudioImporter by gtreshchev 2 years ago
- Fixing some bugs specified in #17 — committed to gtreshchev/RuntimeAudioImporter by gtreshchev 2 years ago
- Fixing some bugs specified in #17 — committed to gtreshchev/RuntimeAudioImporter by gtreshchev 2 years ago
I’m glad that improved memory management has fixed your issues. It is possible that earlier some memory pointers were mistakenly freed, but now they definitely should not be.
It looks like some improvements in memory management have affected Flac decoding. Should be fixed. As for that bug related to object creation and garbage collection, it seems to be due to one of the sound waves being created on a different thread than the game thread and at the time of the garbage collection. Should also be fixed.
i may not be able to respond for the next few days. im doing some land scaping (as an odd job) over the next 2-3 days and im completely wiped out when i get home.
in a few days ill see if i can recreate this issue on a fresh project, and if i can, ill send it your way. ill also give diffrent formats a go. i was using an ogg file for all of this, so it could be that wav or flac will work better.