my HISM component crash all the time and for many reason, this happen if i add an instance or when i set the static mesh, also happen if i clean instances, it’s hard to understand which of this trigger the crash but they all have the same crash report:
This it’s a blocker for me and i have to come back on 4.19 (thanks god i have a backup of the project).
EDIT:
Step to reproduce:
Open a new C++ project
Create an Actor class
Add an Hierarchical Instanced Static Mesh Component
ATestActor::ATestActor()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don’t need it.
PrimaryActorTick.bCanEverTick = true;
HISMComp->ClearInstances();
for (int i = 0; i < 10; i++)
{
HISMComp->AddInstance(GetActorTransform() + FTransform(FRotator(0.f, 0.f 0.f), FVector(i * 50.f, 0.f, 0.f)));
}
}
Launch the editor and drop your actor in the level
If you are lucky and it’s not crashed yet try to set the component static mesh.
as i said sometime happen when you clean or add instances (80% of time if used in OnConstruction) or when you set the static mesh (100% both OnConstruction and BeginPlay in my test behaviour).
We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.
Also for Blueprints version of actor with HISMComponent I have another log
[2018.07.29-18.31.06:219][ 0]LogLinker: Warning: Unable to load PhysicsSerializer with outer HierarchicalInstancedStaticMeshComponent /Game/Environment/Procedural/BP_Proc_Base.BP_Proc_Base_C:HierarchicalInstancedStaticMesh_GEN_VARIABLE because its class does not exist
I was able to fix this by normalizing the transform rotation in the two places that it uses ToMatrixWithScale, we will test internally then PR if nothing is wrong.
Please remove the bug report from this post. It has nothing to do with it. Look at the crash log; Assertion failed: IsRotationNormalized() ; The crash is clearly shown to be different in the thread Assertion failed: (void)((∈Data[InstanceIndex]) + 1) <= (void*)(InstanceOriginDataPtr + CurrentSize) . I’ve fixed the one in the bug report but the one in the thread is much more severe and undecipherable but anyone who didn’t write it.
I made a forum thread here: Engine bug related to HISM / Foliage Spawners causing map/tile corruption - Engine Source & GitHub - Unreal Engine Forums
No, this bug report was sent to me from Epic after my bug submission,
Hello Yuri,
I have reproduced this issue and
logged a report for it here Unreal Engine Issues and Bug Tracker (UE-62282).
You can track the report’s status as
the issue is reviewed by our
development staff. Please let us know
if you have any other questions about
this issue, or would like to discuss
how you may be able to fix this
yourself if this is urgent for your
project.
also the crash log change from test to test here, there is more than one problem with HISM.
Regardless, the bug report is irrelevant to this thread. That ones an easy fix. Normalize the transform rotation.
The actual bug still is unreported and significantly more obscure.
Maybe reply and notify epic?
For the record, your reproduction steps never result in the crash in this thread once I fix the one in the PR. So there’s still no bug report for this one and no reproduction steps for it either.
Questioning if it’s even a bug. It only occurs when passing a non-normalized rotation, which rather makes sense when expecting a direction. Otherwise what would you expect to happen. Feel like it’s a huge distraction from the actual bug.
I was able to load the tile by updating the HISM code to master (4.22) and removing the checks, however the result is as the check suggests; the instanced meshes are corrupted. Know when your GPU overheats and you get strange vertex stretching? (See images in this thread) - it looks like the foliage is doing a similar thing. So basically the bug is vertex corruption in instanced static meshes, only with foliage (based on the few reports we have). The actual check failing is not a bug.
Unfortunately this means we basically hope Epic inadvertently fix the issue at some point. They might already have done so.