Description

Renaming an emitter's name in Timeline panel of Niagara editor causes an editor crash. This happens because FViewModelHierarchyOperation constructor is called with null InAnyModel ptr;

FViewModelHierarchyOperation::FViewModelHierarchyOperation(const TSharedPtr<FViewModel>& InAnyModel)
    : SharedData(InAnyModel->SharedData)

In this situation, the Track Model object hasn't received a valid shared data, so  FTrackModel::ForceUpdate() called from OnDeferredModifyFlush causes a crash. 

// This is called when renaming
void FTrackModel::OnDeferredModifyFlush()
{
	if (bNeedsUpdate)
	{
		ForceUpdate();
		bNeedsUpdate = false;
	}
}

void FTrackModel::ForceUpdate()
{
	// This constructor accesses nullpointer when a shared data is null
	FViewModelHierarchyOperation HierarchyOperation(GetSharedData());

The workaround is FViewModelHierarchyOperation() accepts null like this;

FViewModelHierarchyOperation::FViewModelHierarchyOperation(const TSharedPtr<FViewModel>& InAnyModel)
   : SharedData(InAnyModel ? InAnyModel->SharedData : nullptr) 

Or prevent calling ForceUpdate() from OnDeferredModifyFlush() when IsConstructed() returns false.

Steps to Reproduce
  1. Create a new Blank project.
  2. Add a new Niagara asset based on Fountain.
  3. Open the Niagara asset.
  4. Click "Timeline" panel in the bottom pane.
  5. Rename "Fountain" emitter in Timeline panel.
  6. Confirm a crash happens.

 

Callstack

 

Assertion failed: IsValid() [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 1113]
UnrealEditor_SequencerCore!UE::Sequencer::FViewModelHierarchyOperation::FViewModelHierarchyOperation() [D:\build\++UE5\Sync\Engine\Source\Editor\SequencerCore\Private\MVVM\ViewModels\ViewModelHierarchy.cpp:369]
UnrealEditor_Sequencer!UE::Sequencer::FTrackModel::ForceUpdate() [D:\build\++UE5\Sync\Engine\Source\Editor\Sequencer\Private\MVVM\ViewModels\TrackModel.cpp:145]
UnrealEditor_Sequencer!UE::Sequencer::FTrackModel::OnDeferredModifyFlush() [D:\build\++UE5\Sync\Engine\Source\Editor\Sequencer\Private\MVVM\ViewModels\TrackModel.cpp:139]
UnrealEditor_MovieScene!UE::MovieScene::SignalScopedSignedObjectModifyFlush() [D:\build\++UE5\Sync\Engine\Source\Runtime\MovieScene\Private\MovieSceneSignedObject.cpp:30]
UnrealEditor_MovieScene!UE::MovieScene::FScopedSignedObjectModifyDefer::~FScopedSignedObjectModifyDefer() [D:\build\++UE5\Sync\Engine\Source\Runtime\MovieScene\Private\MovieSceneSignedObject.cpp:51]
UnrealEditor_Sequencer!V::TBaseRawMethodDelegateInstance::ExecuteIfSafe() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:535]
UnrealEditor_UnrealEd!TMulticastDelegate<void __cdecl(FTransactionContext const & __ptr64,ETransactionStateEventType),FDefaultDelegateUserPolicy>::Broadcast() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:956]
UnrealEditor_UnrealEd!UTransBuffer::End() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorTransaction.cpp:1288]
UnrealEditor_UnrealEd!UEditorEngine::EndTransaction() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorServer.cpp:1110]
UnrealEditor_UnrealEd!FScopedTransaction::~FScopedTransaction() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\ScopedTransaction.cpp:35]
UnrealEditor_Sequencer!UE::Sequencer::FTrackModel::Rename() [D:\build\++UE5\Sync\Engine\Source\Editor\Sequencer\Private\MVVM\ViewModels\TrackModel.cpp:389]
UnrealEditor_SequencerCore!UE::Sequencer::SOutlinerItemViewBase::OnNodeLabelTextCommitted() [D:\build\++UE5\Sync\Engine\Source\Editor\SequencerCore\Private\MVVM\Views\SOutlinerItemViewBase.cpp:287]
UnrealEditor_SequencerCore!V::TBaseSPMethodDelegateInstance::ExecuteIfSafe() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:298]
UnrealEditor_Slate!TDelegate<void __cdecl(FText const & __ptr64,ETextCommit::Type),FDefaultDelegateUserPolicy>::ExecuteIfBound<void,0>() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:570]
UnrealEditor_Slate!SInlineEditableTextBlock::OnTextBoxCommitted() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Widgets\Text\SInlineEditableTextBlock.cpp:339]
UnrealEditor_Slate!TBaseSPMethodDelegateInstance<0,SInlineEditableTextBlock,1,void __cdecl(FText const &,enum ETextCommit::Type),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:298]
UnrealEditor_Slate!TDelegate<void __cdecl(FText const & __ptr64,ETextCommit::Type),FDefaultDelegateUserPolicy>::ExecuteIfBound<void,0>() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:570]
UnrealEditor_Slate!SEditableTextBox::OnEditableTextCommitted() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Widgets\Input\SEditableTextBox.cpp:533]
UnrealEditor_Slate!V::TBaseSPMethodDelegateInstance::ExecuteIfSafe() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:298]
UnrealEditor_Slate!SEditableText::OnTextCommitted() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Widgets\Input\SEditableText.cpp:648]
UnrealEditor_Slate!FSlateEditableTextLayout::HandleCarriageReturn() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Widgets\Text\SlateEditableTextLayout.cpp:1660]
UnrealEditor_Slate!FSlateEditableTextLayout::HandleKeyDown() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Widgets\Text\SlateEditableTextLayout.cpp:1102]
UnrealEditor_Slate!SEditableText::OnKeyDown() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Widgets\Input\SEditableText.cpp:242]
UnrealEditor_Slate!FEventRouter::Route<FReply,FEventRouter::FBubblePolicy,FKeyEvent,`FSlateApplication::ProcessKeyDownEvent'::`22'::<lambda_2> >() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:447]
UnrealEditor_Slate!FSlateApplication::ProcessKeyDownEvent() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:4785]
UnrealEditor_Slate!FSlateApplication::OnKeyDown() [D:\build\++UE5\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:4696]
UnrealEditor_ApplicationCore!FWindowsApplication::ProcessDeferredMessage() [D:\build\++UE5\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:2078]
UnrealEditor_ApplicationCore!FWindowsApplication::DeferMessage() [D:\build\++UE5\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:2750]
UnrealEditor_ApplicationCore!FWindowsApplication::ProcessMessage() [D:\build\++UE5\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:1919]
UnrealEditor_ApplicationCore!FWindowsApplication::AppWndProc() [D:\build\++UE5\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:929]
user32
user32
UnrealEditor_ApplicationCore!FWindowsPlatformApplicationMisc::PumpMessages() [D:\build\++UE5\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsPlatformApplicationMisc.cpp:145]
UnrealEditor!FEngineLoop::Tick() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5850]
UnrealEditor!GuardedMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:180]
UnrealEditor!GuardedMainWrapper() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:118]
UnrealEditor!LaunchWindowsStartup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:258]
UnrealEditor!WinMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:298]
UnrealEditor!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-218237 in the post.

0
Login to Vote

Fixed
ComponentUE - Anim - Sequencer
Affects Versions5.4
Target Fix5.5
Fix Commit35190705
CreatedJun 18, 2024
ResolvedJul 30, 2024
UpdatedAug 5, 2024
View Jira Issue