If this post is wrongly tagged or in the wrong place then I apologize.
Unreal Engine 5.6 Source Build (just tried rebuilding the engine too, did not help)
Jetbrains Rider
Crash only (as far as I can tell) occurs when I compile my custom Chaos Wheeled Vehicle Movement Component BP. This can happen when I start a PIE session, or just plainly clicking the compile button. This crash is also not consistent. Sometimes it crashes, then it doesn’t. I try clicking it several more times and it will crash.
I am experiencing a persistent and recurring crash in the Unreal Engine 5.6 editor (source build) that appears to be related to the C++ hot-reload process. The crash specifically occurs when I hot-reload C++ code that modifies a UPROPERTY
array of a USTRUCT
that is being used in a Blueprint. The problem is a bug in the editor’s UI that gets triggered during the re-instancing of the Blueprint.
if (const auto VMC = GetChaosVehicleMovement(); VMC && TankData)
{
...
// sometimes would crash here, sometimes it wouldnt. Commenting out this line does not stop the crashing. neither does it when i try to manually copy each member variable. I have also made sure the references are not null. There is also a ton of other code in this same function that uses these two pointers before reaching here.
VMC->WheelSetups = TankData->TankWheelSetup.WheelSetups;
(TankData
is a DataAsset)
After further debugging, it was clear the problem was not my code, but an issue with the editor’s UI state. The crash stack trace shows the crash happens when the editor tries to destroy and rebuild Slate UI elements, specifically the ones in the Details Panel of my Blueprint. It seems that hot-reloading corrupts the editor’s temporary data, causing the UI to crash on the next operation.
I can temporarily fix the crash by closing the editor and deleting the project’s Saved
, Binaries
, and Intermediate
folders. However, the crash returns every time I perform a C++ hot-reload, making it an unfeasible workflow.
Crash Stack Trace
Here is the stack trace from the latest crash, which consistently points to Slate UI functions:
[Inlined] std::_Atomic_integral::fetch_add(const int, memory_order) atomic:1507
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseWeakReference() SharedPointerInternals.h:293
[Inlined] SharedPointerInternals::FWeakReferencer<1>::{dtor}() SharedPointerInternals.h:753
DestructItems<…>(FShapedGlyphEntry *, int) MemoryOps.h:103
[Inlined] TArray<FShapedGlyphEntry,TSizedDefaultAllocator<32> >::{dtor}() Array.h:968
FShapedGlyphSequence::~FShapedGlyphSequence() FontCache.cpp:295
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
TSparseArray::~TSparseArray<…>() SparseArray.h:85
[Inlined] TSet<TTuple<FCachedShapedTextKey,TSharedPtr<FShapedGlyphSequence const ,1> >,TDefaultMapHashableKeyFuncs<FCachedShapedTextKey,TSharedPtr<FShapedGlyphSequence const ,1>,0>,FDefaultSetAllocator>::{dtor}() Set.h:199
[Inlined] DestructItem(FShapedTextCache *) MemoryOps.h:76
SharedPointerInternals::TIntrusiveReferenceController::DestroyObject() SharedPointerInternals.h:424
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
DestructItems<…>(FTextLayout::FLineModel *, int) MemoryOps.h:108
[Inlined] TArray<FTextLayout::FLineModel,TSizedDefaultAllocator<32> >::{dtor}() Array.h:968
FTextLayout::~FTextLayout() TextLayout.cpp:2768
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
STextBlock::~STextBlock() STextBlock.cpp:120
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
FSlotBase::~FSlotBase() SlotBase.cpp:100
[Inlined] TDefaultDelete::operator()(SBoxPanel::FSlot *) UniquePtr.h:66
[Inlined] TUniquePtr<SBoxPanel::FSlot,TDefaultDelete<SBoxPanel::FSlot> >::{dtor}() UniquePtr.h:272
DestructItems<…>(TUniquePtr<…> *, int) MemoryOps.h:108
[Inlined] TArray<TUniquePtr<SBoxPanel::FSlot,TDefaultDelete<SBoxPanel::FSlot> >,TSizedDefaultAllocator<32> >::{dtor}() Array.h:968
SBoxPanel::~SBoxPanel() SBoxPanel.cpp:243
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
FSlotBase::~FSlotBase() SlotBase.cpp:100
SCompoundWidget::~SCompoundWidget() SCompoundWidget.cpp:89
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
FSlotBase::~FSlotBase() SlotBase.cpp:100
[Inlined] TDefaultDelete::operator()(SBoxPanel::FSlot *) UniquePtr.h:66
[Inlined] TUniquePtr<SBoxPanel::FSlot,TDefaultDelete<SBoxPanel::FSlot> >::{dtor}() UniquePtr.h:272
DestructItems<…>(TUniquePtr<…> *, int) MemoryOps.h:108
[Inlined] TArray<TUniquePtr<SBoxPanel::FSlot,TDefaultDelete<SBoxPanel::FSlot> >,TSizedDefaultAllocator<32> >::{dtor}() Array.h:968
SBoxPanel::~SBoxPanel() SBoxPanel.cpp:243
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
FSlotBase::~FSlotBase() SlotBase.cpp:100
[Inlined] TDefaultDelete::operator()(SBoxPanel::FSlot *) UniquePtr.h:66
[Inlined] TUniquePtr<SBoxPanel::FSlot,TDefaultDelete<SBoxPanel::FSlot> >::{dtor}() UniquePtr.h:272
DestructItems<…>(TUniquePtr<…> *, int) MemoryOps.h:108
[Inlined] TArray<TUniquePtr<SBoxPanel::FSlot,TDefaultDelete<SBoxPanel::FSlot> >,TSizedDefaultAllocator<32> >::{dtor}() Array.h:968
SBoxPanel::~SBoxPanel() SBoxPanel.cpp:243
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
FSlotBase::~FSlotBase() SlotBase.cpp:100
SCompoundWidget::~SCompoundWidget() SCompoundWidget.cpp:89
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
FSlotBase::~FSlotBase() SlotBase.cpp:100
[Inlined] TDefaultDelete::operator()(SBoxPanel::FSlot *) UniquePtr.h:66
[Inlined] TUniquePtr<SBoxPanel::FSlot,TDefaultDelete<SBoxPanel::FSlot> >::{dtor}() UniquePtr.h:272
DestructItems<…>(TUniquePtr<…> *, int) MemoryOps.h:108
[Inlined] TArray<TUniquePtr<SBoxPanel::FSlot,TDefaultDelete<SBoxPanel::FSlot> >,TSizedDefaultAllocator<32> >::{dtor}() Array.h:968
SBoxPanel::~SBoxPanel() SBoxPanel.cpp:243
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
FSlotBase::~FSlotBase() SlotBase.cpp:100
[Inlined] TDefaultDelete::operator()(SOverlay::FOverlaySlot *) UniquePtr.h:66
[Inlined] TUniquePtr<SOverlay::FOverlaySlot,TDefaultDelete<SOverlay::FOverlaySlot> >::{dtor}() UniquePtr.h:272
DestructItems<…>(TUniquePtr<…> *, int) MemoryOps.h:108
[Inlined] TArray<TUniquePtr<SOverlay::FOverlaySlot,TDefaultDelete<SOverlay::FOverlaySlot> >,TSizedDefaultAllocator<32> >::{dtor}() Array.h:968
SOverlay::~SOverlay() SOverlay.cpp:118
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
FSlotBase::~FSlotBase() SlotBase.cpp:100
SCompoundWidget::~SCompoundWidget() SCompoundWidget.cpp:89
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
FSlotBase::~FSlotBase() SlotBase.cpp:100
[Inlined] TDefaultDelete::operator()(SBoxPanel::FSlot *) UniquePtr.h:66
[Inlined] TUniquePtr<SBoxPanel::FSlot,TDefaultDelete<SBoxPanel::FSlot> >::{dtor}() UniquePtr.h:272
DestructItems<…>(TUniquePtr<…> *, int) MemoryOps.h:108
[Inlined] TArray<TUniquePtr<SBoxPanel::FSlot,TDefaultDelete<SBoxPanel::FSlot> >,TSizedDefaultAllocator<32> >::{dtor}() Array.h:968
SBoxPanel::~SBoxPanel() SBoxPanel.cpp:243
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
FSlotBase::~FSlotBase() SlotBase.cpp:100
[Inlined] TDefaultDelete::operator()(SOverlay::FOverlaySlot *) UniquePtr.h:66
[Inlined] TUniquePtr<SOverlay::FOverlaySlot,TDefaultDelete<SOverlay::FOverlaySlot> >::{dtor}() UniquePtr.h:272
DestructItems<…>(TUniquePtr<…> *, int) MemoryOps.h:108
[Inlined] TArray<TUniquePtr<SOverlay::FOverlaySlot,TDefaultDelete<SOverlay::FOverlaySlot> >,TSizedDefaultAllocator<32> >::{dtor}() Array.h:968
SOverlay::~SOverlay() SOverlay.cpp:118
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
FSlotBase::~FSlotBase() SlotBase.cpp:100
[Inlined] TDefaultDelete::operator()(SBoxPanel::FSlot *) UniquePtr.h:66
[Inlined] TUniquePtr<SBoxPanel::FSlot,TDefaultDelete<SBoxPanel::FSlot> >::{dtor}() UniquePtr.h:272
DestructItems<…>(TUniquePtr<…> *, int) MemoryOps.h:108
[Inlined] TArray<TUniquePtr<SBoxPanel::FSlot,TDefaultDelete<SBoxPanel::FSlot> >,TSizedDefaultAllocator<32> >::{dtor}() Array.h:968
SBoxPanel::~SBoxPanel() SBoxPanel.cpp:243
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
FSlotBase::~FSlotBase() SlotBase.cpp:100
[Inlined] TDefaultDelete::operator()(SNodePanel::SNode::FNodeSlot *) UniquePtr.h:66
[Inlined] TUniquePtr<SNodePanel::SNode::FNodeSlot,TDefaultDelete<SNodePanel::SNode::FNodeSlot> >::{dtor}() UniquePtr.h:272
DestructItems<…>(TUniquePtr<…> *, int) MemoryOps.h:108
[Inlined] TArray<TUniquePtr<SNodePanel::SNode::FNodeSlot,TDefaultDelete<SNodePanel::SNode::FNodeSlot> >,TSizedDefaultAllocator<32> >::{dtor}() Array.h:968
SNodePanel::SNode::~SNode() SharedPointerInternals.h:302
[Inlined] SharedPointerInternals::TReferenceControllerBase::ReleaseSharedReference() SharedPointerInternals.h:227
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:606
TSparseArray::Empty(int) SparseArray.h:401
[Inlined] TSet::ShouldRehash(int, int, EAllowShrinking) Set.h:1401
[Inlined] TSet::Empty(int) Set.h:324
[Inlined] TMapBase::Empty(int) Map.h:243
SNodePanel::RemoveAllNodes() SNodePanel.cpp:1293
SGraphPanel::PurgeVisualRepresentation() SGraphPanel.cpp:2364
SGraphPanel::OnGraphChanged(const FEdGraphEditAction &) SGraphPanel.cpp:2470
[Inlined] Invoke(void (SGraphPanel::*)(const FEdGraphEditAction &), SGraphPanel *&, const FEdGraphEditAction &) Invoke.h:66
[Inlined] UE::Core::Private::Tuple::TTupleBase::ApplyAfter(void (SGraphPanel::*&)(const FEdGraphEditAction &), SGraphPanel *&, const FEdGraphEditAction &) Tuple.h:320
TBaseSPMethodDelegateInstance::ExecuteIfSafe(const FEdGraphEditAction &) DelegateInstancesImpl.h:309
[Inlined] TMulticastDelegateBase::Broadcast(const FEdGraphEditAction &) MulticastDelegateBase.h:258
TMulticastDelegate::Broadcast(const FEdGraphEditAction &) DelegateSignatureImpl.inl:1080
UEdGraph::NotifyGraphChanged() EdGraph.cpp:284
FGraphEditorSummoner::OnTabRefreshed(TSharedPtr<…>) BlueprintEditorTabFactories.cpp:70
FDocumentTracker::RefreshAllTabs() WorkflowTabManager.cpp:903
FBlueprintEditor::RefreshEditors(Type) BlueprintEditor.cpp:1031
FBlueprintEditor::OnBlueprintChangedImpl(UBlueprint *, bool) BlueprintEditor.cpp:4094
[Inlined] Invoke(void (FBlueprintEditor::*)(UBlueprint *), FBlueprintEditor *&, UBlueprint *&&) Invoke.h:66
[Inlined] UE::Core::Private::Tuple::TTupleBase::ApplyAfter(void (FBlueprintEditor::*&)(UBlueprint *), FBlueprintEditor *&, UBlueprint *&&) Tuple.h:320
TBaseSPMethodDelegateInstance::ExecuteIfSafe(UBlueprint *) DelegateInstancesImpl.h:309
[Inlined] TMulticastDelegateBase::Broadcast(UBlueprint *) MulticastDelegateBase.h:258
TMulticastDelegate::Broadcast(UBlueprint *) DelegateSignatureImpl.inl:1080
[Inlined] UBlueprint::BroadcastChanged() Blueprint.h:657
FBlueprintCompilationManagerImpl::CompileSynchronouslyImpl(const FBPCompileRequest &) BlueprintCompilationManager.cpp:419
FKismetEditorUtilities::CompileBlueprint(UBlueprint *, EBlueprintCompileOptions, FCompilerResultsLog *) Kismet2.cpp:777
FBlueprintEditor::Compile() BlueprintEditor.cpp:4191
[Inlined] Invoke(void (FBlueprintEditor::*)(), FBlueprintEditor *&) Invoke.h:66
[Inlined] UE::Core::Private::Tuple::TTupleBase::ApplyAfter(void (FBlueprintEditor::*&)(), FBlueprintEditor *&) Tuple.h:320
TBaseSPMethodDelegateInstance::ExecuteIfSafe() DelegateInstancesImpl.h:309
[Inlined] TDelegate::ExecuteIfBound() DelegateSignatureImpl.inl:635
FUIAction::Execute() UIAction.h:139
FUICommandList::ExecuteAction(TSharedRef<…>) UICommandList.cpp:117
SToolBarButtonBlock::OnClicked() SToolBarButtonBlock.cpp:517
[Inlined] Invoke(FReply (SToolBarButtonBlock::*)(), SToolBarButtonBlock *&) Invoke.h:66
[Inlined] UE::Core::Private::Tuple::TTupleBase::ApplyAfter(FReply (SToolBarButtonBlock::*&)(), SToolBarButtonBlock *&) Tuple.h:320
TBaseSPMethodDelegateInstance::Execute() DelegateInstancesImpl.h:292
[Inlined] TDelegate::Execute() DelegateSignatureImpl.inl:614
SButton::ExecuteOnClick() SButton.cpp:495
SButton::OnMouseButtonUp(const FGeometry &, const FPointerEvent &) SButton.cpp:419
`FSlateApplication::RoutePointerUpEvent'::`8'::<lambda_2>::operator()(const FArrangedWidget &,const FPointerEvent &) SlateApplication.cpp:5367
FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,`FSlateApplication::RoutePointerUpEvent'::`8'::<lambda_2> >(FSlateApplication *,FToLeafmostPolicy,FPointerEvent,const <lambda_2> &,ESlateDebuggingInputEvent) SlateApplication.cpp:456
FSlateApplication::RoutePointerUpEvent(const FWidgetPath &, const FPointerEvent &) SlateApplication.cpp:5353
FSlateApplication::ProcessMouseButtonUpEvent(const FPointerEvent &) SlateApplication.cpp:5938
FSlateApplication::OnMouseUp(Type, TVector2<…>) SlateApplication.cpp:5894
FWindowsApplication::ProcessDeferredMessage(const FDeferredWindowsMessage &) WindowsApplication.cpp:3052
FWindowsApplication::DeferMessage(TSharedPtr<…> &, HWND__ *, unsigned int, unsigned long long, long long, int, int, unsigned int) WindowsApplication.cpp:3570
FWindowsApplication::ProcessMessage(HWND__ *, unsigned int, unsigned long long, long long) WindowsApplication.cpp:2725
[Inlined] WindowsApplication_WndProc(HWND__ *, unsigned int, unsigned long long, long long) WindowsApplication.cpp:1716
FWindowsApplication::AppWndProc(HWND__ *, unsigned int, unsigned long long, long long) WindowsApplication.cpp:1721
[Inlined] WinPumpMessages() WindowsPlatformApplicationMisc.cpp:116
FWindowsPlatformApplicationMisc::PumpMessages(bool) WindowsPlatformApplicationMisc.cpp:145
FEngineLoop::Tick() LaunchEngineLoop.cpp:5548
[Inlined] EngineTick() Launch.cpp:60
GuardedMain(const wchar_t *) Launch.cpp:189
LaunchWindowsStartup(HINSTANCE__ *, HINSTANCE__ *, char *, int, const wchar_t *) LaunchWindows.cpp:271
WinMain(HINSTANCE__ *, HINSTANCE__ *, char *, int) LaunchWindows.cpp:339
This stack trace confirms the crash happens when the UI for the Blueprint editor is being torn down and rebuilt. The only reliable workaround is to avoid hot-reloading entirely for these types of changes and instead close the editor and perform a full C++ build from my IDE. This crash also sometimes ends in random other locations as well. I remember sometimes it would crash in Malloc function, sometimes in TryRemalloc function, etc.
There are also no log files because the editor just crashes before it can finish the logging. I have tried