Instanced Static Mesh Component warnings and errors when cooking content

After I upgraded from 4.18 to 4.22, I started getting these warnings when loading maps that have actors with InstancedStaticMeshComponents.

LogLinker: Warning: Unable to load PhysicsSerializer with outer InstancedStaticMeshComponent /Game/Props/MapBoundary/MapBoundary_Wall.MapBoundary_Wall_C:NODE_AddInstancedStaticMeshComponent-1 because its class does not exist

I ignored those warnings and everything seemed fine when I run PIE and Stand Alone, but when I tried cooking content for Windows I got this warning…

PackagingResults: Warning: Unable to load PhysicsSerializer with outer InstancedStaticMeshComponent /Game/Props/MapBoundary/MapBoundary_Wall.MapBoundary_Wall_C:NODE_AddInstancedStaticMeshComponent-1 because its class does not exist

…followed immediately by this crash:

UATHelper: Cooking (Windows):   LogWindows: Error: begin: stack for UAT
UATHelper: Cooking (Windows):   LogWindows: Error: === Critical error: ===
UATHelper: Cooking (Windows):   LogWindows: Error:
UATHelper: Cooking (Windows):   LogWindows: Error: Assertion failed: PerInstanceRenderData.IsValid() [File:C:\UnrealEngine\UnrealEngine\Engine\Source\Runtime\Engine\Private\InstancedStaticMesh.cpp] [Line: 1651]
UATHelper: Cooking (Windows):   LogWindows: Error:
UATHelper: Cooking (Windows):   LogWindows: Error:
UATHelper: Cooking (Windows):   LogWindows: Error:
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffce84da388 KERNELBASE.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffca2721ca7 UE4Editor-Core.dll!ReportAssert() [c:\unrealengine\unrealengine\engine\source\runtime\core\private\windows\windowsplatformcrashcontext.cpp:553]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffca2724457 UE4Editor-Core.dll!FWindowsErrorOutputDevice::Serialize() [c:\unrealengine\unrealengine\engine\source\runtime\core\private\windows\windowserroroutputdevice.cpp:79]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffca253ba8a UE4Editor-Core.dll!FOutputDevice::LogfImpl() [c:\unrealengine\unrealengine\engine\source\runtime\core\private\misc\outputdevice.cpp:71]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffca24c3c67 UE4Editor-Core.dll!FDebug::AssertFailed() [c:\unrealengine\unrealengine\engine\source\runtime\core\private\misc\assertionmacros.cpp:440]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffca24c42f9 UE4Editor-Core.dll!FDebug::CheckVerifyFailedImpl() [c:\unrealengine\unrealengine\engine\source\runtime\core\private\misc\assertionmacros.cpp:418]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffc80ddabc0 UE4Editor-Engine.dll!UInstancedStaticMeshComponent::SerializeRenderData() [c:\unrealengine\unrealengine\engine\source\runtime\engine\private\instancedstaticmesh.cpp:1651]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffc80dda759 UE4Editor-Engine.dll!UInstancedStaticMeshComponent::Serialize() [c:\unrealengine\unrealengine\engine\source\runtime\engine\private\instancedstaticmesh.cpp:1760]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffca409c315 UE4Editor-CoreUObject.dll!FArchiveSaveTagExports::ProcessTaggedObjects() [c:\unrealengine\unrealengine\engine\source\runtime\coreuobject\private\uobject\savepackage.cpp:1166]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffca40bb4e8 UE4Editor-CoreUObject.dll!FPackageExportTagger::TagPackageExports() [c:\unrealengine\unrealengine\engine\source\runtime\coreuobject\private\uobject\savepackage.cpp:2905]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffca40a3f55 UE4Editor-CoreUObject.dll!UPackage::Save() [c:\unrealengine\unrealengine\engine\source\runtime\coreuobject\private\uobject\savepackage.cpp:3813]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffc7f209ddb UE4Editor-UnrealEd.dll!UEditorEngine::Save() [c:\unrealengine\unrealengine\engine\source\editor\unrealed\private\editorengine.cpp:4344]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffc7f0db93c UE4Editor-UnrealEd.dll!UCookOnTheFlyServer::SaveCookedPackage() [c:\unrealengine\unrealengine\engine\source\editor\unrealed\private\cookontheflyserver.cpp:3994]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffc7f0ddb73 UE4Editor-UnrealEd.dll!UCookOnTheFlyServer::SaveCookedPackages() [c:\unrealengine\unrealengine\engine\source\editor\unrealed\private\cookontheflyserver.cpp:2896]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffc7f0e722f UE4Editor-UnrealEd.dll!UCookOnTheFlyServer::TickCookOnTheSide() [c:\unrealengine\unrealengine\engine\source\editor\unrealed\private\cookontheflyserver.cpp:2372]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffc7ef82395 UE4Editor-UnrealEd.dll!UCookCommandlet::CookByTheBook() [c:\unrealengine\unrealengine\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:882]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffc7efae844 UE4Editor-UnrealEd.dll!UCookCommandlet::Main() [c:\unrealengine\unrealengine\engine\source\editor\unrealed\private\commandlets\cookcommandlet.cpp:586]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ff6806ae402 UE4Editor-Cmd.exe!FEngineLoop::PreInit() [c:\unrealengine\unrealengine\engine\source\runtime\launch\private\launchengineloop.cpp:2706]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ff6806a5377 UE4Editor-Cmd.exe!GuardedMain() [c:\unrealengine\unrealengine\engine\source\runtime\launch\private\launch.cpp:129]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ff6806a55ca UE4Editor-Cmd.exe!GuardedMainWrapper() [c:\unrealengine\unrealengine\engine\source\runtime\launch\private\windows\launchwindows.cpp:145]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ff6806b316c UE4Editor-Cmd.exe!WinMain() [c:\unrealengine\unrealengine\engine\source\runtime\launch\private\windows\launchwindows.cpp:275]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ff6806b4cb6 UE4Editor-Cmd.exe!__scrt_common_main_seh() [d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffce9614034 KERNEL32.DLL!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error: [Callstack] 0x00007ffceb5d3691 ntdll.dll!UnknownFunction []
UATHelper: Cooking (Windows):   LogWindows: Error:
UATHelper: Cooking (Windows):   LogWindows: Error: end: stack for UAT

Here’s how I’m adding the Instanced Static Mesh in Construct function

280564-addismc.png

These are details when I add it to the world:

I tried deleting intermediate files, deleting/replacing the actors, etc, etc…nothing seems to work. Any ideas?

These warnings were related to my jump from 4.18 directly to 4.22. I just needed to resave the base blueprint AND all derived blueprints in order to nuke the warnings.

The error was actually related to some custom code on my end that was incompatible with new construction/initialization sequence for Instanced Static Meshes.