Description

The crash can be worked around by modifying FFoliageISMActor::Serialize as following code :

void FFoliageISMActor::Serialize(FArchive& Ar)
{
#if WITH_EDITORONLY_DATA
    if (!Ar.IsCooking()) // add this if statement
    {
        Ar << Guid;
        ClientHandle.Serialize(Ar);
        Ar << ISMDefinition;
        Ar << ActorClass;
    }
#endif
}
 
Steps to Reproduce
  1. Create a blueprint based on Actor
  2. Add static mesh component and static mesh to the blueprint
  3. Create a Actor Foliage asset
  4. Open the asset
  5. Assign the created blueprint to the actor foliage asset
  6. Turn Static Mesh Only on
  7. Save and close foliage actor window
  8. Create a level with Basic template
  9. Enter foliage mode
  10. Add the actor foliage asset to the foliage panel
  11. Paint (note : Need changing Floor Actor mobility to Static)
  12. Save the level
  13. Open project settings
  14. Set GameDefaultMap and EditorStartMap to the created level
  15. Create Package for Windows 
  16. Run the package

The packaged game crushes with following error message :

ObjectSerializationError: /Game/P_ISMActorFoliage (0x560D969E43985BE3) /Game/P_ISMActorFoliage (0x560D969E43985BE3) - InstancedFoliageActor /Game/P_ISMActorFoliage.P_ISMActorFoliage:PersistentLevel.InstancedFoliageActor_0: Bad import index 373652847/67.
Callstack

LogWindows: Error: [Callstack] 0x00007ff63ed2f202 UnrealGame.exe!FExportArchive::HandleBadImportIndex() [D:\dev\UnrealEngine-5.3.1\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading2.cpp:1709]
LogWindows: Error: [Callstack] 0x00007ff63ed1652b UnrealGame.exe!FExportArchive::operator<<() [D:\dev\UnrealEngine-5.3.1\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading2.cpp:1758]
LogWindows: Error: [Callstack] 0x00007ff63ed02d40 UnrealGame.exe!FArchiveUObject::SerializeObjectPtr() [D:\dev\UnrealEngine-5.3.1\Engine\Source\Runtime\CoreUObject\Private\Serialization\ArchiveUObject.cpp:90]
LogWindows: Error: [Callstack] 0x00007ff6429a3961 UnrealGame.exe!operator<<<TSetElement<TTuple<TObjectPtr<UFoliageType>,TUniqueObj<FFoliageInfo> > >,TSparseArrayAllocator<TSizedDefaultAllocator<32>,FDefaultBitArrayAllocator> >() [D:\dev\UnrealEngine-5.3.1\Engine\Source\Runtime\Core\Public\Containers\SparseArray.h:1496]
LogWindows: Error: [Callstack] 0x00007ff6429a9bac UnrealGame.exe!TSetPrivateFriend::Serialize<TTuple<TObjectPtr<UFoliageType>,TUniqueObj<FFoliageInfo> >,TDefaultMapHashableKeyFuncs<TObjectPtr<UFoliageType>,TUniqueObj<FFoliageInfo>,0>,FDefaultSetAllocator>() [D:\dev\UnrealEngine-5.3.1\Engine\Source\Runtime\Core\Public\Containers\Set.h:2201]
LogWindows: Error: [Callstack] 0x00007ff6429c279c UnrealGame.exe!AInstancedFoliageActor::Serialize() [D:\dev\UnrealEngine-5.3.1\Engine\Source\Runtime\Foliage\Private\InstancedFoliage.cpp:4390]
LogWindows: Error: [Callstack] 0x00007ff63ed24096 UnrealGame.exe!FAsyncPackage2::EventDrivenSerializeExport() [D:\dev\UnrealEngine-5.3.1\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading2.cpp:6370]
LogWindows: Error: [Callstack] 0x00007ff63ed26d82 UnrealGame.exe!FAsyncPackage2::Event_ProcessExportBundle() [D:\dev\UnrealEngine-5.3.1\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading2.cpp:5796]
LogWindows: Error: [Callstack] 0x00007ff63ed27a5d UnrealGame.exe!FEventLoadNode2::Execute() [D:\dev\UnrealEngine-5.3.1\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading2.cpp:4312]
LogWindows: Error: [Callstack] 0x00007ff63ed2805b UnrealGame.exe!FAsyncLoadEventQueue2::ExecuteSyncLoadEvents() [D:\dev\UnrealEngine-5.3.1\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading2.cpp:4500]
LogWindows: Error: [Callstack] 0x00007ff63ed41f06 UnrealGame.exe!FAsyncLoadingThread2::Run() [D:\dev\UnrealEngine-5.3.1\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading2.cpp:7662]
LogWindows: Error: [Callstack] 0x00007ff63e9c4132 UnrealGame.exe!FRunnableThreadWin::Run() [D:\dev\UnrealEngine-5.3.1\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:149]
LogWindows: Error: [Callstack] 0x00007ff63e9b7f47 UnrealGame.exe!FRunnableThreadWin::GuardedRun() [D:\dev\UnrealEngine-5.3.1\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:79]
LogWindows: Error: [Callstack] 0x00007ff849b77344 KERNEL32.DLL!UnknownFunction []

Have Comments or More Details?

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

1
Login to Vote

Unresolved
ComponentUE - World Creation - Worldbuilding Tools
Affects Versions5.3
Target Fix5.5
CreatedNov 24, 2023
UpdatedFeb 13, 2024