Description

From licensee:

Hello! Our level streaming setup enables the bUseActorFolders on our levels. When moving the Actor into another folder via the Outline, the editor will crash on the next load

Assertion failed: FoundSet && FoundSet->GetActorFolders().Num() > 1 && FoundSet->GetActorFolders().Contains(Folder) [Link Removed] [Line: 2869] 

 

After debugging it, the property

UPROPERTY(Transient)

TMap<FString, FActorFolderSet> FolderLabelToActorFolders;

 

is not re-initialized with the level ActorFolders when loading the level, the FixupActorFolders function will assert because the list is empty. I fixed it by adding this to the ULevel::FixupActorFolders() function

ForEachActorFolder([this](UActorFolder* ActorFolder)

{

FActorFolderSet& Folders = FolderLabelToActorFolders.FindOrAdd(ActorFolder->GetLabel());

Folders.Add(ActorFolder);

return true;

}, /bSkipDeleted/ true);

Steps to Reproduce
  • Create a level (non-WP) and save it.
  • Enable "Use Actor Folder Objects" in World Settings.
  • Add an actor to the scene and create a folder in the world outliner.
  • Save.
  • Add another actor to the scene and then move it into the folder.
  • Save.
  • Open a different level and then reopen the level that has 
    "Use Actor Folder Objects" enabled.
Callstack
>	UnrealEditor-Engine.dll!ULevel::FixupActorFolders() Line 2894	C++
 	UnrealEditor-Engine.dll!ULevel::OnLevelLoaded() Line 2975	C++
 	UnrealEditor-Engine.dll!UWorld::InitWorld(const FWorldInitializationValues IVS) Line 1951	C++
 	UnrealEditor-UnrealEd.dll!UEditorEngine::Map_Load(const wchar_t * Str, FOutputDevice & Ar) Line 2793	C++
 	UnrealEditor-UnrealEd.dll!UEditorEngine::HandleMapCommand(const wchar_t * Str, FOutputDevice & Ar, UWorld * InWorld) Line 6298	C++
 	UnrealEditor-UnrealEd.dll!UEditorEngine::Exec_Editor(UWorld * InWorld, const wchar_t * Stream, FOutputDevice & Ar) Line 5759	C++
 	UnrealEditor-Core.dll!FExec::Exec(UWorld * InWorld, const wchar_t * Cmd, FOutputDevice & Ar) Line 15	C++
 	UnrealEditor-Engine.dll!UEngine::Exec(UWorld * InWorld, const wchar_t * Cmd, FOutputDevice & Ar) Line 4624	C++
 	UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Exec(UWorld * InWorld, const wchar_t * Stream, FOutputDevice & Ar) Line 662	C++
 	UnrealEditor-UnrealEd.dll!FEditorFileUtils::LoadMap(const FString & InFilename, bool LoadAsTemplate, const bool bShowProgress) Line 2901	C++
 	UnrealEditor-LevelEditor.dll!FLevelEditorActionCallbacks::OpenRecentFile(int RecentFileIndex) Line 319	C++
 	[Inline Frame] UnrealEditor-LevelEditor.dll!Invoke(void(*)(int) &) Line 47	C++
 	[Inline Frame] UnrealEditor-LevelEditor.dll!UE::Core::Private::Tuple::TTupleBase<TIntegerSequence<unsigned int,0>,int>::ApplyAfter(void(*)(int) &) Line 311	C++
 	UnrealEditor-LevelEditor.dll!TBaseStaticDelegateInstance<void __cdecl(void),FDefaultDelegateUserPolicy,int>::ExecuteIfSafe() Line 658	C++
 	UnrealEditor-Slate.dll!FUICommandList::ExecuteAction(const TSharedRef<FUICommandInfo const ,1> InUICommandInfo) Line 117	C++
 	UnrealEditor-Slate.dll!SMenuEntryBlock::OnClicked(bool bCheckBoxClicked) Line 1158	C++
 	UnrealEditor-Slate.dll!SMenuEntryBlock::OnMenuItemButtonClicked() Line 1118	C++
 	[Inline Frame] UnrealEditor-Slate.dll!Invoke(FReply(SMenuEntryBlock::*)()) Line 66	C++
 	[Inline Frame] UnrealEditor-Slate.dll!UE::Core::Private::Tuple::TTupleBase<TIntegerSequence<unsigned int>>::ApplyAfter(FReply(SMenuEntryBlock::*)() &) Line 311	C++
 	UnrealEditor-Slate.dll!TBaseSPMethodDelegateInstance<0,SMenuEntryBlock,1,FReply __cdecl(void),FDefaultDelegateUserPolicy>::Execute() Line 275	C++
 	[Inline Frame] UnrealEditor-Slate.dll!TDelegate<FReply __cdecl(void),FDefaultDelegateUserPolicy>::Execute() Line 632	C++
 	UnrealEditor-Slate.dll!SButton::ExecuteOnClick() Line 465	C++
 	UnrealEditor-Slate.dll!SButton::OnMouseButtonUp(const FGeometry & MyGeometry, const FPointerEvent & MouseEvent) Line 390	C++
 	UnrealEditor-Slate.dll!SMenuEntryButton::OnMouseButtonUp(const FGeometry & MyGeometry, const FPointerEvent & MouseEvent) Line 434	C++
 	[Inline Frame] UnrealEditor-Slate.dll!FSlateApplication::RoutePointerUpEvent::__l8::<lambda_2>::operator()(const FArrangedWidget &) Line 5134	C++
 	UnrealEditor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,`FSlateApplication::RoutePointerUpEvent'::`8'::<lambda_2>>(FSlateApplication * ThisApplication, FEventRouter::FToLeafmostPolicy RoutingPolicy, FPointerEvent EventCopy, const FSlateApplication::RoutePointerUpEvent::__l8::<lambda_2> & Lambda, ESlateDebuggingInputEvent DebuggingInputEvent) Line 427	C++
 	UnrealEditor-Slate.dll!FSlateApplication::RoutePointerUpEvent(const FWidgetPath & WidgetsUnderPointer, const FPointerEvent & PointerEvent) Line 5120	C++
 	UnrealEditor-Slate.dll!FSlateApplication::ProcessMouseButtonUpEvent(const FPointerEvent & MouseEvent) Line 5689	C++
 	UnrealEditor-Slate.dll!FSlateApplication::OnMouseUp(const EMouseButtons::Type Button, const UE::Math::TVector2<double> CursorPos) Line 5654	C++
 	UnrealEditor-ApplicationCore.dll!FWindowsApplication::ProcessDeferredMessage(const FDeferredWindowsMessage & DeferredMessage) Line 2219	C++
 	UnrealEditor-ApplicationCore.dll!FWindowsApplication::DeferMessage(TSharedPtr<FWindowsWindow,1> & NativeWindow, HWND__ * InHWnd, unsigned int InMessage, unsigned __int64 InWParam, __int64 InLParam, int MouseX, int MouseY, unsigned int RawInputFlags) Line 2726	C++
 	UnrealEditor-ApplicationCore.dll!FWindowsApplication::ProcessMessage(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 1895	C++
 	[Inline Frame] UnrealEditor-ApplicationCore.dll!WindowsApplication_WndProc(HWND__ *) Line 919	C++
 	UnrealEditor-ApplicationCore.dll!FWindowsApplication::AppWndProc(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 925	C++
 	user32.dll!UserCallWinProcCheckWow()	Unknown
 	user32.dll!DispatchMessageWorker()	Unknown
 	[Inline Frame] UnrealEditor-ApplicationCore.dll!WinPumpMessages() Line 113	C++
 	UnrealEditor-ApplicationCore.dll!FWindowsPlatformApplicationMisc::PumpMessages(bool bFromMainLoop) Line 142	C++
 	UnrealEditor.exe!FEngineLoop::Tick() Line 5736	C++
 	[Inline Frame] UnrealEditor.exe!EngineTick() Line 61	C++
 	UnrealEditor.exe!GuardedMain(const wchar_t * CmdLine) Line 188	C++
 	UnrealEditor.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 233	C++
 	UnrealEditor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 284	C++
 	[Inline Frame] UnrealEditor.exe!invoke_main() Line 102	C++
 	UnrealEditor.exe!__scrt_common_main_seh() Line 288	C++
 	kernel32.dll!BaseThreadInitThunk()	Unknown
 	ntdll.dll!RtlUserThreadStart()	Unknown

Have Comments or More Details?

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

0
Login to Vote

Fixed
Fix Commit24589806
Main Commit24589806
CreatedMar 7, 2023
ResolvedMar 10, 2023
UpdatedApr 29, 2023
View Jira Issue