If NewObject is used to create an instanced static mesh component at runtime, populating the component with AddInstance causes the editor to crash.
Regression:
Yes - repro steps provided did not crash in 4.17.1 (CL 3586342)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = test)
class UInstancedStaticMeshComponent* ISMC;
ISMC = NewObject<UInstancedStaticMeshComponent>(this, TEXT("Something")); ISMC->AttachToComponent(RootComponent, FAttachmentTransformRules::SnapToTargetIncludingScale); ISMC->RegisterComponent(); FTransform Rando = FTransform::Identity; ISMC->AddInstance(Rando);
Result:
Editor crashes with provided callstack
Expected:
PIE runs and component is created
LoginId:7156c35640f86204e61b8383f45dee17 EpicAccountId:c807849e05a0413d99e379f2802cae9c Fatal error: [File:D:\Build\++UE4+Release-4.17+Compile\Sync\Engine\Source\Runtime\Windows\D3D11RHI\Private\D3D11VertexDeclaration.cpp] [Line: 49] Unknown RHI vertex element type 0 UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:349] UE4Editor_D3D11RHI!FD3D11VertexDeclarationKey::FD3D11VertexDeclarationKey() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\windows\d3d11rhi\private\d3d11vertexdeclaration.cpp:53] UE4Editor_D3D11RHI!FD3D11DynamicRHI::RHICreateVertexDeclaration() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\windows\d3d11rhi\private\d3d11vertexdeclaration.cpp:97] UE4Editor_RHI!FDynamicRHI::CreateVertexDeclaration_RenderThread() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\rhi\private\rhicommandlist.cpp:1972] UE4Editor_RHI!FRHICommandListImmediate::CreateVertexDeclaration() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\rhi\public\rhicommandlist.h:2626] UE4Editor_ShaderCore!RHICreateVertexDeclaration() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\rhi\public\rhicommandlist.h:3503] UE4Editor_ShaderCore!FVertexFactory::InitDeclaration() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\shadercore\private\vertexfactory.cpp:301] UE4Editor_Engine!FInstancedStaticMeshVertexFactory::InitRHI() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\engine\private\instancedstaticmesh.cpp:465] UE4Editor_RenderCore!FRenderResource::InitResource() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\rendercore\private\renderresource.cpp:33] UE4Editor_RenderCore!TGraphTask<`BeginInitResource'::`2'::EURCMacro_InitCommand>::ExecuteTask() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\public\async\taskgraphinterfaces.h:784] UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:650] UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\async\taskgraph.cpp:559] UE4Editor_RenderCore!RenderingThreadMain() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\rendercore\private\renderingthread.cpp:325] UE4Editor_RenderCore!FRenderingThread::Run() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\rendercore\private\renderingthread.cpp:459] UE4Editor_Core!FRunnableThreadWin::Run() [d:\build\++ue4+release-4.17+compile\sync\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:76]
Delay nodes occasionally don't fire the "Completed" output in a nativized build
I am not able to find world outliner how to enable it?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
An error occurred while trying to generate project files !?
Installer 4.10 failed with error code R-1603
How can i modify the param name in EQS node
How does Character rotate in the current position in the blueprint?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-50348 in the post.