4.17 severe 'Mesh Killer' bug

This bug erases all the mesh data if mesh is used as instance in Hierarchical Instanced Static Mesh Component. Mesh data is completely removed after editor restart.
Repro steps:

  1. Create a blueprint, place it in scene and in Construction Script add ‘Add Hierarchical Instanced Static Mesh Component’, then add at least one instance to it via ‘Add Instance World Space’.
  2. In the ‘Add Hierarchical Instanced Static Mesh Component’ node, select any Static Mesh. Then compile the blueprint.
  3. Restart the editor. The previously selected static mesh will be erased, with empty thumbnail and data like ‘Vertices: 0’, Size: 0 Kb’, etc.

This bug deletes all the static mesh data, along with all LOD setup, etc. There is no way to somehow restore the ‘erased’ mesh other than re-importing it again.

Hi Slavq,

I followed your repro steps but I couldn’t get the same results. On project restart, the static mesh is still selected and displays properly for me.

Is this also happening in a new project as well?


Yes, it happens in a new, empty project, I can reproduce it every time - is a simple demo project: [DEMO PROJECT][1]

In the MeshDestroyer blueprint, change the Static Mesh of the Add Hierarchical Instanced Static Mesh Component node to e.g. StaticMesh2 mesh, compile the blueprint and save all (ctrl+shift+s). Close the project, then open it again - the StaticMesh2 mesh will have empty thumbnail, all mesh data erased:


I had this bug when I migrated a Blueprint with HISM from a 4.16 project into a 4.17 one. It migrated, but on the 4.17 side it had meshes with 0 verts. And it only seemed to happen with the meshes that used LODs. The ones without were intact.

I have also reproduced this bug several times on a new project.
Also, you do not have to connect to Hierarchical Instanced Static Mesh Component, for mesh, to be gone (.uasset is not changed though). It just has to be set, as long as one (HISMC) is connected.
Also if I delete all Hierarchical Instanced Static Mesh Components I get meshes back (after restart of editor).

Also to add, normal Instanced Static Mesh Components can’t use “PerInstanceRandom” (in material) if they are added by “New Instance” command NOT in Construction Script.

I have the same issue. Happened quite randomly.

I also have this issue. I’ve had this bug in the preview release Regression: Starting level in PIE corrupts static mesh properties - Asset Creation - Unreal Engine Forums but I thought it was fixed by saving the mesh before starting. As it turns out this fix is only working temporarily.

It seems that an issue has been created: Unreal Engine Issues and Bug Tracker (UE-48228) “Instanced Static Mesh components that are part of a Blueprint aren’t visible in Standalone Game” (these are the symptoms of this bug).

Slavq, thanks for the project and steps. I was able to reproduce this using them and created JIRA UE-48309. Our developers will be investigating further.

Exactly same issue , on Mac version.
I’ve lost all the static meshes used as Hierarchical Instanced Static Mesh on blueprints.

I go back to 4.16 for me.

Same , I was able to trace StaticMesh->RenderData->LODResources is an empty array, and I got a ton of “Failed to generate distance field data due to missing LODResource for LOD 0.” log message

I’m tracing the root cause of the issue.

Currently I think GetStaticMesh()->ConditionalPostLoad(); is called too soon by UHierarchicalInstancedStaticMeshComponent because the UStaticMeshObject has flags: RF_Public | RF_Standalone | RF_Transactional | RF_NeedLoad | RF_NeedPostLoad | RF_NeedPostLoadSubobjects | RF_WasLoaded (537611)

So ConditionalPostLoad consume RF_NeedPostLoad before RF_NeedLoad was consumed, leading in out of order loading (mesh data aren’t loaded yet)

And the check: check(!GEventDrivenLoaderEnabled || !HasAnyFlags(RF_NeedLoad)); seam to be silent about this

It was introduced by commit : https://github.com/EpicGames/UnrealEngine/commit/70d3bd4b726884ccd6fe348fa45f11252aa99e04

Change 3491717 by Michael.Dupuis

#jira UE-35083:
The component is now the owner of the PerInstanceRenderData instead of the proxy
Add an Update path to only update specified instances range
Always call BuildTreeIfOutdated so we have a standard code path to make sure static mesh are fully loaded before trying to build the tree
Moved the Instance Buffer aysnc to the base class, as it's not related to UHierarchicalInstancedStaticMeshComponent
Expose a new property to decide if we require dynamic instance buffer


Sorry for the issue, it will be fixed in 4.18 version, unfortunately as the fix imply changing public header files.

The release notes of 4.17.1 say the bug was fixed in the hotfix: 4.17.1 Hotfix Released - Announcements - Unreal Engine Forums
Are the release notes incorrect?

No they are correct, a fix was made that fix this particular bug, but the others willl still be there. So in 4.18 an actual proper fix was made. So you can either get 4.17.1 to have this fix or wait for 4.17.2 to have the full fix regarding static mesh instancing issues.

The issue is still in 4.17.1

There are many problems with instances.
My editor crashes very often when I add/move instance meshes.
In 4.16 There are no such problems…

Is there any chance that there will be a hotfix in the coming days / weeks?
It’s impossible to work, but i already upgrade to 4.17 and have many changes in it ((

Can you provide some callstack of the crash you’re getting?


is an example of minimal project which reproduces crash on Hierarchical Instanced Static Meshes in 4.17.1:
There is a callstack and everything in the description.