Crash when adding instances to HISM in construction script

In some rare situations we get an crash while editing blueprints in the editor. The construction script of the blueprint creates much HISM components with much instances.

The crash occurs in HiarachicalinstancedStaticMesh.cpp:1847. There ClusterTree is invalid. With some breakpoints I found that the ClusterTreePtr in UHierarchicalInstancedStaticMeshComponent::UpdateInstanceTreeBoundsInternal allways is valid but in UHierarchicalInstancedStaticMeshComponent::UpdateInstanceTreeBoundsInternal_RenderThread I get the error so I think this is a threading error.

I guess that the construction script adds many instances so that the ClusterTree is splittet to more than one clusters and is reallocated. But in this moment the render thread command is already queued and not flushed before reallocating the ClusterTree.

UE 4.11.2 Launcher Version

Hi user37337,

  • Does this occur in a clean, blank project with no additional content or is it limited to one project?
  • What steps can I take to reproduce this on my end?
  • Can you post your crash logs and callstack here? The crash logs can be found at \Unreal Projects\PROJECTNAME\saved\logs.
  • Are you using an IsValid check in your blueprint to ensure there are no NULL values being passed in the construction script?

Hi ,

I think it’s very hard to reproduce this case in a new project. We get this crash only with this very complex blueprint and only at some computers at some levels of our (very big) world. In the logs there is nothing to see about the crash. Currently I cannot reproduce the crash (on my computer this never happens). Maybe this crash can be fixed with my theoretically description. Maybe you get an crash report with a crash in UHierarchicalInstancedStaticMeshComponent::UpdateInstanceTreeBoundsInternal_RenderThread but the call stack is not very meaningful because it’s in the render thread and there is no pointer to the calling HISMC. You only get an invalid cluster tree and an old bounding box.

Do you have a sample project that I can take a look at?

Sorry, I think this is not possible. This blueprint has a lot of dependencies. Creating a sample project will be much work without the ability to reproduce the crash.

Unfortunately, without reproduction steps or a sample project, there isn’t much I will be able to do to recreate this error on my end. I am marking this as answered for tracking purposes. If you find a set of reproduction steps or are able to create a sample project where the crash is occurring, I’ll be happy to take another look and see if I can reproduce the error on my end.

Hi ,

in the Attachment you can find a Minidump of the crash. Maybe this helps a little bit.
I have some new Information about the crash: It occures much rarely when Realtime is deactivated and the Visual Debugger is attached.

Edit: Minidump is taken with UE 4.11.2 Launcher Version

[link text][1]
[1]: 94568-crash+hismc. (43.3 KB)

Did you find any specific steps that you take before the crash occurs?

It occurs, after changing any property of the blueprint. There are no other steps.