Crash reported through UDN. With ZenLoader enabled, deleting a level instance and triggering Undo causes a crash in
ULandscapeComponent::PostEditUndo()
The user has provided an example project that can reproduce the issue.
They also suggested a possible engine fix in LoadPackageInternal() by moving this section:
#if WITH_EDITOR // In the editor loading cannot be part of a transaction as it cannot be undone, and may result in recording half-loaded objects. So we suppress any active transaction while in this stack, and set the editor loading flag TGuardValue<ITransaction*> SuppressTransaction(GUndo, nullptr); TGuardValueAccessors<bool> IsEditorLoadingPackage(UE::GetIsEditorLoadingPackage, UE::SetIsEditorLoadingPackage, GIsEditor || UE::GetIsEditorLoadingPackage()); #endif
upward so that the active transaction is suppressed while executing this code block that's entered when ZenLoader is enabled:
FUObjectThreadContext& ThreadContext = FUObjectThreadContext::Get();
if (ShouldAlwaysLoadPackageAsync(PackagePath))
{
...
}
Without this change, async loading requests can be flushed causing synchronous loads that enter the transaction buffer.
This ticket is created to evaluate the user's fix or otherwise address the ZenLoader / Landscape crash. Making the issue public so that other users running into similar crashes can find this on the issue tracker.
Steps to Reproduce (in provided example project)
Repro steps:
1. In MAP_MainLevel, pin LI_CubeLevel causing it to load in
2. Delete LI_CubeLevel
3. Undo delete operation
Note: The only config change from the blank project config file I made was enabling the Zen loader by adding the following to DefaultEngine.ini:
[/Script/Engine.EditorStreamingSettings]
s.ZenLoaderEnabled=True
> UnrealEditor-CoreUObject.dll!FWeakObjectPtr::Get() Line 88 C++
[Inline Frame] UnrealEditor-Landscape.dll!TWeakObjectPtr<ALandscape,FWeakObjectPtr>::Get() Line 125 C++
UnrealEditor-Landscape.dll!ULandscapeInfo::IsRegistered(const ALandscapeProxy * Proxy) Line 5565 C++
UnrealEditor-Landscape.dll!ULandscapeComponent::PostEditUndo() Line 971 C++
UnrealEditor-UnrealEd.dll!FTransaction::Apply() Line 959 C++
UnrealEditor-UnrealEd.dll!UTransBuffer::Undo(bool bCanRedo) Line 1625 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::UndoTransaction(bool bCanRedo) Line 1301 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::Exec_Transaction(const wchar_t * Str, FOutputDevice & Ar) Line 5271 C++
UnrealEditor-UnrealEd.dll!UEditorEngine::Exec_Editor(UWorld * InWorld, const wchar_t * Stream, FOutputDevice & Ar) Line 5671 C++
UnrealEditor-Core.dll!FExec::Exec(UWorld * InWorld, const wchar_t * Cmd, FOutputDevice & Ar) Line 18 C++
UnrealEditor-Engine.dll!UEngine::Exec(UWorld * InWorld, const wchar_t * Cmd, FOutputDevice & Ar) Line 4759 C++
UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Exec(UWorld * InWorld, const wchar_t * Stream, FOutputDevice & Ar) Line 662 C++
------- Part of callstack stripped ------
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-223475 in the post.
0 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 5.4, 5.5 |
Target Fix | 5.5.1 |
Created | Sep 5, 2024 |
---|---|
Updated | Nov 22, 2024 |