Download

Engine crash after creating landscape from importing height map on client travelling to the map

I encountered an engine crash every time, after importing heightmap to create a new landscape in my map, and during the client’s travelling to the modified map using C++, but the host client in the listening server works without any problem. The trace log is as follows:

Assertion failed: PIEInstanceID != INDEX_NONE [File:D:/build/++UE5/Sync/Engine/Source/Runtime/CoreUObject/Private/UObject/LazyObjectPtr.cpp] [Line: 104]

UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_Engine
UnrealEditor_Landscape
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

After I deleting the landscape been created, it works without any problem again. I found a workaround with switching the Default Server Map to the other map, then switch back to the modified map in Maps & Modes, but I have to do it every time the landscape is modified, so it’s quite tedious.

[Edit 1] I test my backup project in 4.26.2 to import the height map and it works without any problem BTW.

[Edit 2] After downloading the source code, then make the modification in the LazyObjectPtr.cpp at Line: 104 as follows:

Replace the original line:

check(PIEInstanceID != INDEX_NONE);

To:

if(PIEInstanceID == INDEX_NONE) {
PIEInstanceID = 1;
};

It temporarily fixed the engine crash, so I’m wondering whether when the editor starting, the previous maps specified in the Games & Modes section were reset to NONE? BTW, the heightmap was created using the TerreScruptor 2.0 software.