x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Editor crashes with specific set of instances in StaticMeshComponent ("trying to invert a NIL matrix")

Hello, this crash happens with 4.11.2 on Windows 7 x64.

I have a custom actor with a UInstancedStaticMeshComponent attached to a USphereComponent as root. As Mesh I use "/Engine/BasicShapes/Sphere". When I add a special combination of instances to this UInstancedStaticMeshComponent the editor crashes with the following error:

 [2016.05.19-14.54.56:196][ 93]LogEditor: Attempting to add actor of class 'CrashingActor' to level at -180.00,-310.00,20.00
 Ensure condition failed: false [File:d:\buildfarm\buildmachine_++ue4+release-4.11\engine\source\runtime\core\public\math\UnrealMatrix.h] [Line: 266] 
 FMatrix::InverseFast(), trying to invert a NIL matrix, this results in NaNs! Use Inverse() instead.
 UE4Editor.exe has triggered a breakpoint.

Asking google lead me to the following Bug report which lacked a reproducible example: https://answers.unrealengine.com/questions/329760/crash-because-of-nan-dynamic-shadows-related.html

I have created a test project which crashes always on my machine. It just includes a custom class "CrashingActor". Trying to place an instance of that class in a level using the editor leads to a crash with the above error. I couldn't narrow the error down to a single instance. It is somehow related to an interaction between these instances. I know that the coordinates are quite unrealistically to be ever used in production. This is just the (reduced) output of a particle simulation gone wild. But I didn't expect a crash until I threw NaNs at it.

I hope I am using everything correctly. The project is just a stripped down standard-project with a custom actor which has in the constructor:

 // 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;
 
 USphereComponent* SphereComponent = CreateDefaultSubobject<USphereComponent>(TEXT("RootComponent"));
 RootComponent = SphereComponent;
 
 UInstancedStaticMeshComponent* ParticleVisualization = CreateDefaultSubobject< UInstancedStaticMeshComponent>(TEXT("ParticleVisualization"));
 
 FName Path("/Engine/BasicShapes/Sphere");
 UStaticMesh* sphereMesh = Cast<UStaticMesh>(StaticLoadObject(UStaticMesh::StaticClass(), NULL, *Path.ToString()));
 
 ParticleVisualization->SetStaticMesh(sphereMesh);
 
 ParticleVisualization->AttachTo(RootComponent);
 
 ParticleVisualization->AddInstance(FTransform(FRotator(0, 0, 0), FVector(-5.6526e+07, 5.6523e+07, -3561.12), FVector(0.4f, 0.4f, 0.4f)));
 ParticleVisualization->AddInstance(FTransform(FRotator(0, 0, 0), FVector(-5.68537e+07, -4066.15, 5.68518e+07), FVector(0.4f, 0.4f, 0.4f)));
 ParticleVisualization->AddInstance(FTransform(FRotator(0, 0, 0), FVector(-5.77781e+07, 32644.8, -5.77864e+07), FVector(0.4f, 0.4f, 0.4f)));
 ParticleVisualization->AddInstance(FTransform(FRotator(0, 0, 0), FVector(-5.81239e+07, -5.81233e+07, 15821.5), FVector(0.4f, 0.4f, 0.4f)));
 ParticleVisualization->AddInstance(FTransform(FRotator(0, 0, 0), FVector(-56.2229, 11.118, 199.461), FVector(0.4f, 0.4f, 0.4f)));
 ParticleVisualization->AddInstance(FTransform(FRotator(0, 0, 0), FVector(5.65258e+07, -5.6523e+07, 4072.48), FVector(0.4f, 0.4f, 0.4f)));
 

Thanks in advance for the help!

Product Version: UE 4.11
Tags:
crashexample.zip (5.9 kB)
more ▼

asked May 19 '16 at 03:27 PM in Bug Reports

avatar image

HRayTracing
1 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey HRayTracing-

I entered a bug report, UE-31075 , to investigate the error message you reported. I did notice that this is an ensure that is being triggered. Since you are debugging through Visual Studio you should be able to press the Continue button to continue working in the editor.

Cheers

Doug Wilson

more ▼

answered May 20 '16 at 02:02 PM

avatar image HRayTracing May 20 '16 at 08:07 PM

Hi, thank you very much. Didn't notice before that it can run on after pressing continue. I got rid of this example of the bug/warning via clipping the positions.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question