Tracing Blueprint Function Crash Stack?

Hello,

I’ve got a rare crash that occurs in my game. However, as far as I can tell it only occurs in packaged games. My hunch is that it’s related to something getting junked by the garbage collector, and however it’s stored when run in PIE stops it from being garbage collected.

When I view the crash logs I can generally see where the crash begins, but the actual crash itself seems to occur in Blueprints.

Is there any way I could package the game in a way that’d give me more detailed information on which blueprint function/node is causing the crash?

The crash log:

[2023.02.07-23.24.28:420][183]LogWindows: Error: === Critical error: ===
[2023.02.07-23.24.28:420][183]LogWindows: Error: 
[2023.02.07-23.24.28:420][183]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000008
[2023.02.07-23.24.28:420][183]LogWindows: Error: 
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff7877273b4 MyGameProject.exe!UObject::ProcessContextOpcode() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff7877517a6 MyGameProject.exe!UObject::execSwitchValue() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff78774ff6c MyGameProject.exe!UObject::execSetArray() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff787729ab2 MyGameProject.exe!ProcessLocalScriptFunction() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff7876fe99a MyGameProject.exe!ProcessScriptFunction<void (__cdecl*)(UObject * __ptr64,FFrame & __ptr64,void * __ptr64)>() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff7877295f9 MyGameProject.exe!ProcessLocalFunction() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff787729ab2 MyGameProject.exe!ProcessLocalScriptFunction() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff787728f41 MyGameProject.exe!UObject::ProcessInternal() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff787501019 MyGameProject.exe!UFunction::Invoke() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff787728aa6 MyGameProject.exe!UObject::ProcessEvent() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff78621e3d0 MyGameProject.exe!UUINavWidget::UINavSetup() [C:\Projects\MyGameProject\trunk\Plugins\UINavigation\Source\UINavigation\Private\UINavWidget.cpp:404]
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff78621267a MyGameProject.exe!UUINavWidget::NativeConstruct() [C:\Projects\MyGameProject\trunk\Plugins\UINavigation\Source\UINavigation\Private\UINavWidget.cpp:70]
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff7896799e4 MyGameProject.exe!UWidget::TakeWidget_Private() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff7895eca79 MyGameProject.exe!UUserWidget::AddToScreen() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff78621a82c MyGameProject.exe!UUINavWidget::ReturnToParent() [C:\Projects\MyGameProject\trunk\Plugins\UINavigation\Source\UINavigation\Private\UINavWidget.cpp:2104]
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff787501019 MyGameProject.exe!UFunction::Invoke() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff787708965 MyGameProject.exe!UObject::CallFunction() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff787729ab2 MyGameProject.exe!ProcessLocalScriptFunction() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff7876fe99a MyGameProject.exe!ProcessScriptFunction<void (__cdecl*)(UObject * __ptr64,FFrame & __ptr64,void * __ptr64)>() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff7877295f9 MyGameProject.exe!ProcessLocalFunction() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff787729ab2 MyGameProject.exe!ProcessLocalScriptFunction() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff787728f41 MyGameProject.exe!UObject::ProcessInternal() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff787501019 MyGameProject.exe!UFunction::Invoke() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff787728aa6 MyGameProject.exe!UObject::ProcessEvent() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff786204e60 MyGameProject.exe!UUINavPCComponent::ExecuteActionByName() [C:\Projects\MyGameProject\trunk\Plugins\UINavigation\Source\UINavigation\Private\UINavPCComponent.cpp:856]
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff786214b37 MyGameProject.exe!UUINavPCComponent::OnActionReleased() [C:\Projects\MyGameProject\trunk\Plugins\UINavigation\Source\UINavigation\Private\UINavPCComponent.cpp:790]
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff786215b8c MyGameProject.exe!UUINavWidget::OnKeyReleased() [C:\Projects\MyGameProject\trunk\Plugins\UINavigation\Source\UINavigation\Private\UINavWidget.cpp:578]
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff786212fa2 MyGameProject.exe!UUINavWidget::NativeOnKeyUp() [C:\Projects\MyGameProject\trunk\Plugins\UINavigation\Source\UINavigation\Private\UINavWidget.cpp:471]
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff789637dff MyGameProject.exe!SObjectWidget::OnKeyUp() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff7879359e3 MyGameProject.exe!FLogTrace::OutputLogMessage<int,bool>() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff7879848e9 MyGameProject.exe!FSlateApplication::ProcessKeyUpEvent() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff787978e1a MyGameProject.exe!FSlateApplication::OnControllerButtonReleased() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff7878100b7 MyGameProject.exe!XInputInterface::SendControllerEvents() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff787804de4 MyGameProject.exe!FWindowsApplication::PollGameDeviceState() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff785dae3f0 MyGameProject.exe!FEngineLoop::Tick() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff785dc0fec MyGameProject.exe!GuardedMain() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff785dc10aa MyGameProject.exe!GuardedMainWrapper() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff785dd2340 MyGameProject.exe!WinMain() []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ff78b9f9e9e MyGameProject.exe!__scrt_common_main_seh() [d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ffbb06f7614 KERNEL32.DLL!UnknownFunction []
[2023.02.07-23.24.28:420][183]LogWindows: Error: [Callstack] 0x00007ffbb16026a1 ntdll.dll!UnknownFunction []
[2023.02.07-23.24.28:420][183]LogWindows: Error: 
[2023.02.07-23.24.28:430][183]LogExit: Executing StaticShutdownAfterError
[2023.02.07-23.24.28:439][183]LogWindows: FPlatformMisc::RequestExit(1)

Based on this, my assumption is that it’s occurring when I’m setting an array in blueprints – although not sure why that’d result in an access violation error. The object I’m setting arrays for is saved as a UPROPERTY, so it shouldn’t be getting garbage collected.

It’d be nice to see exactly what’s happening, if possible!

Thanks!

This is a complete guess on my part, but “unhandled exception” sounds like a widget issue to me. It’s the main blueprint type I think of that uses a bunch of “handled” terminology.

I think “unhandled exception” may just be a general term for “we hit an error that we don’t have a specific classification for,” but coincidentally it is happening in a widget, and I think I can narrow down what function it’s happening in based on the last C++ trace (UINavWidget.cpp:404 calls a blueprint implementable function).

The problem is that I’m not sure why it’s throwing an exception… The widget shouldn’t be getting garbage collected, and if it is indeed caused by me setting an array (as UObject::execSetArray() seems to imply), I’m not sure what about the process is casuing the error.

This doesn’t solve my question of tracing a blueprint function through a crash stack, but for anyone curious: the crash was caused by something getting garbage collected, albeit a different object than I initially thought.

I had saved a reference to an object in a subsystem, and was using its data to create an array of text in blueprints that I would then pass to a widget.

Turns out, I forgot to mark the object in the subsystem as UPROPERTY, so it’d get junked at random, causing the reference to be null when I was using its data to construct the array.

1 Like