4.18.2 - Crash with Instanced Static Mesh Component

Crash when any blueprint that inherits from Instanced Static Mesh Component has any instances in its default values. To reproduce:

  1. Start a new project in Unreal 4.18.2 (other versions may also work)

  2. Create a new Blueprint component that inherits from Instanced Static Mesh Component

  3. In this new blueprint, assign a mesh.

  4. Add an instance of the mesh in the default value of the Instances array

  5. Compile, save, then close and reopen the project.

5.5) Ensure that the tab for the blueprint is docked to the main window.

  1. Open the blueprint again, and hit compile. Observe editor crash.

*If no crash occurs, repeat steps 4-6. On one of my tests, it only crashed every other time.

BONUS CRASH

  1. Reopen the project and blueprint once more.

  2. Under rendering, set Visible to false.

  3. Compile. Observe that the editor no longer crashes.

  4. Save, then close and reopen the project.

  5. Compile once more, and observe that the editor crashes again, although at a different place in the call stack.

Hello, I have attempted to reproduce this from the steps you provided but I was not able to get the crash. Was there any other small step that may have been missed? Also if available you could provide a small sample project that is having the crash for me to look at. Thank you.

I am going to mark this as answered for now due to no response. If you are still having problems please feel free to comment with more information. Thank you.

Hello, sorry. I was out for the holidays. That being said, there are no additional steps and I did this in a clean install of 4.18.2. I’m going to try to repro this on a second computer and will post that project tonight or tomorrow, with logs.

Some additional info I remember while debugging is that it looks like some serialized data mismatch which causes an attempt to dereference a null pointer in UInstancedStaticMeshComponent::CreateSceneProxy(). It seems that PerInstanceSMData is non-null, but PerInstanceRenderData is null (when it shouldn’t be). PerInstanceRenderData is never checked for validity, so it seems the function makes the assumption that it always has the same amount of data as PerInstanceSMData. I believe the bonus crash comes from the fact that CreateSceneProxy is only called when IsVisible is true, so it hits null data elsewhere instead.

That is no problem at all, I hope your holidays were great. Please let me know how your testing goes with the second computer and the sample project will be greatly appreciated. Thank you.

All right so I’ve just reproduced this on a clean install on a different machine. It seems there is an additional step, which comes right after step 5 above. Ensure that the tab is docked to the main window. If the editor does not crash, repeat steps 4-6 again. In this new project, it seems to only crash every other time. I’ve updated the original post with this new info as step 5.5

Additionally, regardless of if the engine crashes or not, all default values in the Instances array will be cleared upon closing and reopening the Editor. It’s default values cannot be properly set and saved, and sometimes results in a crash.

Below is a link for the project and a crash dump. Let me know if this helps you reproduce the issue!

Hey Dachora, after some testing I found that this is fixed in the latest internal build of the engine. Please be on the lookout in the future for an update and that should fix your problem. Thank you.