Crash in 4.17.2 with instanced static meshes (Unknown RHI vertex element type 0)
Hello, I am using some simple C++ code for creating runtime instanced static mesh components.
and this is how I add an instance again during runtime - commenting this out stops the crash (even if the component is created)
I guess that this is common stuff. Now the crash happens in Windows\D3D11RHI\Private\D3D11VertexDeclaration.cpp, line 54 ("Unknown RHI vertex element type 0")
I tried switching my mesh just in case my materials were a problem - but it still happens everytime.
I would appreciate any help, even a workaround, since my game is broken atm..
Thanks in advance
Hello! I'm having the same problem. Found a workaround, just call the following functions right after the call to RegisterComponent:
It seems the InstanceRenderData is not created before RHI initialization in some cases, leading to vertex declaration referencing NULL vertex buffers.
answered Sep 26 '17 at 01:58 AM
As mentioned in another post here (https://answers.unrealengine.com/questions/709902/crash-when-adding-an-instance-with-instanced-stati.html) this issue does occur in 4.17.2 but has been fixed internally and will be included with an update to the engine.
answered Sep 26 '17 at 07:12 PM
This is currently fixed in 4.18, so you can have the fix in the next preview.
answered Sep 29 '17 at 04:02 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here