Crash Audio 4.10

Hi all !

I’m so bored, i got a crash from no where…

What i’m doing ?

send packet to my server

get the reply from it

switch on other server

start thread with std::thread

Initialize my hud with main thread

got crash when hover a button because it may play a sound.

here is my log:

[2016.02.08-20.19.28:187][427]LogWindows:Error: === Critical error: ===
Fatal error!

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x2b87bd68

ntdll.dll
kernel32.dll
XAudio2_7.dll
XAudio2_7.dll
XAudio2_7.dll
XAudio2_7.dll
XAudio2_7.dll
XAudio2_7.dll
XAudio2_7.dll
XAudio2_7.dll
XAudio2_7.dll
UE4Editor-XAudio2.dll!FXAudio2SoundSource::CreateSource() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\windows\xaudio2\private\xaudio2source.cpp:419]
UE4Editor-XAudio2.dll!FXAudio2SoundSource::Init() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\windows\xaudio2\private\xaudio2source.cpp:461]
UE4Editor-Engine.dll!FAudioDevice::StartSources() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\engine\private\audiodevice.cpp:1863]
UE4Editor-Engine.dll!FAudioDevice::Update() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\engine\private\audiodevice.cpp:1941]
UE4Editor-Engine.dll!UGameEngine::Tick() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\engine\private\gameengine.cpp:1007]
UE4Editor.exe!FEngineLoop::Tick() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\launch\private\launchengineloop.cpp:2427]
UE4Editor.exe!GuardedMain() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor.exe!GuardedMainWrapper() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor.exe!WinMain() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor.exe!__tmainCRTStartup() [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]
kernel32.dll
ntdll.dll
ntdll.dll


[2016.02.08-20.19.28:187][427]LogExit: Executing StaticShutdownAfterError
[2016.02.08-20.19.28:195][427]LogPhysics:Warning: PHYSX: ..\..\PhysX\src\NpScene.cpp (2946) 8 : PxScene::unlockWrite() called without matching call to PxScene::lockWrite(), behaviour will be undefined.
[2016.02.08-20.19.28:195][427]LogPhysics:Warning: PHYSX: ..\..\PhysX\src\NpScene.cpp (2946) 8 : PxScene::unlockWrite() called without matching call to PxScene::lockWrite(), behaviour will be undefined.
[2016.02.08-20.19.28:195][427]LogWindows: FPlatformMisc::RequestExit(1)
[2016.02.08-20.19.28:195][427]Log file closed, 02/08/16 21:19:28

An other one:

MachineId:FD616A54471B6AB5E4F619BFB0F3204E
EpicAccountId:a4ca690085cd4a9d97d5fcbbbb776b65

Access violation - code c0000005 (first/second chance not available)

""

ntdll
kernel32
XAudio2_7
XAudio2_7
XAudio2_7
XAudio2_7
XAudio2_7
XAudio2_7
XAudio2_7
XAudio2_7
XAudio2_7
UE4Editor_XAudio2
UE4Editor_XAudio2
UE4Editor_Engine!FAudioDevice::StartSources() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\engine\private\audiodevice.cpp:1863]
UE4Editor_Engine!FAudioDevice::Update() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\engine\private\audiodevice.cpp:1941]
UE4Editor_Engine!UGameEngine::Tick() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\engine\private\gameengine.cpp:1007]
UE4Editor!FEngineLoop::Tick() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\launch\private\launchengineloop.cpp:2427]
UE4Editor!GuardedMain() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\unreal projects\hackslash\engine\unrealengine\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]

Just tried to use unreal thread it’s doing the same…

here is my code:

uint32 FUdpListener::Run()
{
	//Initial wait before starting
	FPlatformProcess::Sleep(0.03);

	//While not told to stop this thread 
	//		and not yet finished finding Prime Numbers
	while (senderSock->runnable != false)
	{
		CNtlPacket* ptr = (CNtlPacket*)senderSock->m_pNetwork->PeekPacket(senderSock->sock);
		if (ptr != NULL)
		{
			UE_LOG(LogInit, Log, TEXT("Recv data"));
			senderSock->m_recvQueue.PushPacket(new CNtlPacket(ptr->GetPacketData(), ptr->GetUsedSize()));
			FGraphEventRef Task = FFunctionGraphTask::CreateAndDispatchWhenReady([&]()
			{
				HackAndSlash::instance->QueuePacket(senderSock->m_recvQueue.PopPacket());
				HackAndSlash::instance->MyTick();
			}, TStatId(), NULL, ENamedThreads::GameThread);
			senderSock->m_pNetwork->PopPacket(senderSock->sock);
			ptr = NULL;
		}
	}
	UE_LOG(LogInit, Log, TEXT("loop done"));
	return 0;
}

this is the only thing my thread is doing…

Okay i fixed it…

Nothing to see with sound libs, i create a packet on a different thread witch i delete so the at the moment to delete the packet the game crashed, but i don’t know why the sound libs crash…

Anyway fixed.