Crash: NumActiveAudioDevices == 0

For the past couple of days i’ve been getting this crash a lot while playing (only when playing not when developing). I’ve looked through the forums but couldn’t find anything on it, and i have no idea what the problem is. This it the crash report, thanks anyone for the help :).

Assertion failed: NumActiveAudioDevices == 0 [File:C:\Software\EpicGames\UE421\UnrealEngine-release\Engine\Source\Runtime\Engine\Private\AudioDeviceManager.cpp] [Line: 513]

UE4Editor_Core!FDebug::AssertFailed() [c:\software\epicgames\ue421\unrealengine-release\engine\source\runtime\core\private\misc\assertionmacros.cpp:417]
UE4Editor_Engine!FAudioDeviceManager::ShutdownAllAudioDevices() [c:\software\epicgames\ue421\unrealengine-release\engine\source\runtime\engine\private\audiodevicemanager.cpp:514]
UE4Editor_Engine!UEngine::ShutdownAudioDeviceManager() [c:\software\epicgames\ue421\unrealengine-release\engine\source\runtime\engine\private\unrealengine.cpp:1635]
UE4Editor!FEngineLoop::Exit() [c:\software\epicgames\ue421\unrealengine-release\engine\source\runtime\launch\private\launchengineloop.cpp:3163]
UE4Editor!GuardedMain() [c:\software\epicgames\ue421\unrealengine-release\engine\source\runtime\launch\private\launch.cpp:185]
UE4Editor!GuardedMainWrapper() [c:\software\epicgames\ue421\unrealengine-release\engine\source\runtime\launch\private\windows\launchwindows.cpp:145]
UE4Editor!WinMain() [c:\software\epicgames\ue421\unrealengine-release\engine\source\runtime\launch\private\windows\launchwindows.cpp:276]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll

Assert Failed means that desired cosition failed, it hapens on ShutdownAllAudioDevices() which is obviously attempted to shut down audio system. The failed condition hints that UE4 failed to shut down the audio device objects as it raports there some active once.

You need to explain situation more, what kind of project is it, you do any C++ stuff? you involve any audio on C++ side? When crash exactly happens? the call stack suggest engine shutdown, is it you shuting it down? Also what is you specs (aspecially audio) and system?

I do have a lot of C++ stuff, It’s multiplayer, so i’m using dedicated server with multiple clients. But i haven’t done anything in audio, and no i’m not shutting down anything, it just crashes while i’m playing. Not entirely sure what kinda specs you want. Processor i7-4790 CPU, GPU NVIDIA GeForce GTX 1080, and i’m just using the monitor and/or headphones for sound?

So you use master branch?

I have the git hub repo, the only source code changes i’ve made are in the Gameplay Ability plugin.

But it’s forked from master?

No. It’s just a zip of the 4.21

yes, but if you got it from github you got it from specific branch, if it’s main page that means it release branch. If thats the case i dont really know

Hmmm can you give full log? maybe there more hints before crash. Not to mention, something is closing UE4 that causing this crash

I ended up changing a lot of old code and it fixed itself, i probably had something somewhere that was breaking it but i don’t know what it was. Thanks for your help tho.