Strange crash in project (Not urgent)
Hi,
So everything works well within my test project. But when i move it over to my main project, i get a few crashes in the editor.
In suspecting this has something to do with a race condition. The crashes happen about 10 seconds after i end play in editor mode.
On debugging, here is where it crashes: I keep continuing to get the next few images.
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in UnrealEditor.exe. Exception thrown at 0x00007FF89C019FF3 (UnrealEditor-Core.dll) in UnrealEditor.exe: 0xC0000005: Access violation reading location 0x0000000000000001.
And then keeps cycling in the same area -
'''Exception thrown at 0x00007FF89C019FF3 (UnrealEditor-Core.dll) in UnrealEditor.exe: 0xC0000005: Access violation reading location 0x0000000000000001. Unhandled exception at 0x00007FF89C019FF3 (UnrealEditor-Core.dll) in UnrealEditor.exe: 0xC0000005: Access violation reading location 0x0000000000000001. Exception thrown at 0x00007FF89C019FF3 (UnrealEditor-Core.dll) in UnrealEditor.exe: 0xC0000005: Access violation reading location 0x0000000000000001. Unhandled exception at 0x00007FF89C019FF3 (UnrealEditor-Core.dll) in UnrealEditor.exe: 0xC0000005: Access violation reading location 0x0000000000000001. Exception thrown at 0x00007FF89C019FF3 (UnrealEditor-Core.dll) in UnrealEditor.exe: 0xC0000005: Access violation reading location 0x0000000000000001. Unhandled exception at 0x00007FF89C019FF3 (UnrealEditor-Core.dll) in UnrealEditor.exe: 0xC0000005: Access violation reading location 0x0000000000000001. Exception thrown at 0x00007FF89C019FF3 (UnrealEditor-Core.dll) in UnrealEditor.exe: 0xC0000005: Access violation reading location 0x0000000000000001. Unhandled exception at 0x00007FF89C019FF3 (UnrealEditor-Core.dll) in UnrealEditor.exe: 0xC0000005: Access violation reading location 0x0000000000000001. Exception thrown at 0x00007FF89C019FF3 (UnrealEditor-Core.dll) in UnrealEditor.exe: 0xC0000005: Access violation reading location 0x0000000000000001. Unhandled exception at 0x00007FF89C019FF3 (UnrealEditor-Core.dll) in UnrealEditor.exe: 0xC0000005: Access violation reading location 0x0000000000000001. Exception thrown at 0x00007FF89C019FF3 (UnrealEditor-Core.dll) in UnrealEditor.exe: 0xC0000005: Access violation reading location 0x0000000000000001. '''
This is after pressing continue a bunch of times.
Could you offer logs for more details? Any clues in the Call Stack?
@HereafterMills , we want to check if this issue has been resolved. Did you find the cause from the log file? Another hint from a common pitfall is that the Agora engine did not get properly disposed when the game stop playing. That would cause similar crashing issue in the Editor like you experience.
This still happens for me in my project but not in the example template. @icywind
You're probably correct about the cause, bit I'm not sure how to resolve it.
Fir now, iv disabled voice in the editor
@WinterPu Was trying to get the logs, but unreal doesnt write anything in the logs. Which is why i had to run it in debug mode to get the call stack
This still happens for me in my project but not in the example template. @icywind
You're probably correct about the cause, bit I'm not sure how to resolve it.
Fir now, iv disabled voice in the editor
Here are some code snippet copied from the examples:
void UAgoraVideoWidget::UnInitAgoraEngine()
{
if (RtcEngineProxy)
{
RtcEngineProxy->leaveChannel();
RtcEngineProxy->unregisterEventHandler(UserRtcEventHandler.Get());
RtcEngineProxy->release();
RtcEngineProxy = nullptr;
UBFL_Logger::Print(FString::Printf(TEXT("%s release agora engine"), *FString(FUNCTION_MACRO)), LogMsgViewPtr);
}
}
Call this when quitting the app. See if that works on your project?
I'm using the blueprint example though. Should I create c++ class and try this?
It is even easier for Blueprint. Here is a tutorial for a basic BP project and you can find the graph for the clean up in the "End Play" section.
This is what im currently doing. However, i am running this code in my game instance as follows:
This is a platform game instance where onApplicationWillTerminate is called anyway at shutdown.