EAV caused by Wwise
Nixdorfer opened this issue · 4 comments
Every time I try to start the mod preview, which is when I click the green play button, the game immediately crashes and displays the following message:
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION writing address 0x000000000000035d
UnrealEditor_AkAudio!FAkAudioDevice::RemoveDefaultListener() [...\Plugins\Wwise\Source\AkAudio\Private\AkAudioDevice.cpp:3956]
UnrealEditor_AkAudio!TBaseRawMethodDelegateInstance<0,FAkAudioDevice,void __cdecl(bool),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:476]
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll
I've tried adding to .../Config/Windows/WindowsEngine.ini
and writing:
[Audio]
AudioDeviceModuleName=
AudioMixerModuleName=
to fix this issue, but it didn't work. Restarting the computer also didn't help.
Then, I tried a somewhat "burying my head in the sand" approach by commenting out the faulty line in the file, specifically the statement in ...\Plugins\Wwise\Source\AkAudio\Private\AkAudioDevice.cpp
:
in_pListener->IsDefaultListener = true;
It sounds foolish, but I thought it might shift the problem elsewhere to provide more information. However, the error still stubbornly occurs at the same spot.
Additionally, an error stating 'File not Found' occurred in the Project Settings > Wwise > Integration Settings > Wwise Project Path, because it points to a file Testing.wproj
located in ../../Documents/WwiseProjects/Testing
. I'm unsure if this is causing the issue, as I have never used Wwise before.
After some exploration, I found a solution to this issue. The main problem was that Wwise did not check for null pointers, leading to an EAV error. This error was caused by three sections of code:
AkAudioDevice.cpp:3941in_pListener->IsDefaultListener = true;
AkAudioDevice.cpp:3956in_pListener->IsDefaultListener = true;
AkComponent.cpp:829Listener->Emitters.Remove(this);
are problematic. The solution is to add nullptr checks to these lines, like so:
if (in_pListener != nullptr) {
in_pListener->IsDefaultListener = true;
}
if (in_pListener != nullptr) {
in_pListener->IsDefaultListener = true;
}
for (auto Listener : Listeners) {
if (Listener != nullptr) {
Listener->Emitters.Remove(this);
}
}
Finally, to fix this issue, close the currently running project, delete the Binaries
, Intermediate
, and Saved
folders in the SDK directory, and recompile the cache.
after changed the code,it still have error AkAudioDevice.cpp:3959
after changed the code,it still have error AkAudioDevice.cpp:3959
What‘s ur error code, EAV?
Or provide us ur log.
谢谢,非常有效!