Several "Invalid AABB" errors after 5.6 update

Hi we are currently trying to update to 5.6 (for the second time) and are seeing tons of weird looking “Invalid AABB…”.

The project runs fine in 5.5.2p2 and we are currently using the latest release that is 5.6.0f3.

Here are the errors in more detail: (error message and line where the error is reported)

Invalid AABB aabb
UnityEngine.ParticleSystem:Emit(Int32)

>> crashParticles[i].Emit(emitThisFrame);
Invalid AABB result
UnityEngine.ParticleSystem:Emit(Int32)

crashParticles[i].Emit(emitThisFrame);
Invalid AABB a
(no stack trace or context given)
Assertion failed on expression: 'IsFinite(outDistanceAlongView)'
(no context)
Assertion failed on expression: 'IsFinite(outDistanceForSort)'
(no context)
Invalid AABB aabb
UnityEngine.Transform:set_position(Vector3)

>> GhostShip.transform.position = ...
Invalid AABB result
UnityEngine.Transform:set_position(Vector3)

>> GhostShip.transform.position = ...

and then there is a couple more, all similarly vague.

A google search showed that these errors appear every one in a while, but I could not link them to anything. Also, I haven’t filed a bug report yet, since sending the whole project to unity is not an option and I have no idea where to start to reduce the case.

any help/guess/fix is appreciated!

thanks,
Simon

I allow myself to push this thread, since probably none read it over the weekend…

Hi,

I’ve just checked, and we have no known logged issues for that error on Particle Systems in 5.6 :frowning:
As you’re running 5.6.0f3, I would suggest trying the latest patch release as a first step:
Download Archive (5.6.0p4 at the time of writing this)

The most common cause is if an invalid position gets into the particle data. This falls into 2 categories:

  • You set bad data from script
  • We set bad data in the runtime

We added a new error recently, to allow you to find out what object causes these errors by clicking on this error message:

However, I have a feeling that this new error message is coming in 2017.1, not 5.6 (can’t remember precisely).

If you do manage to pinpoint the issue in a reproduction project that you are willing to send us, we can assist in finding the cause.

Hi Richard,

I’ll update to p4 and see if the error is gone. The pain point for us is that it works in 5.5. and broke in 5.6 holding us back on the update.

Can you share any more insight on where this could come from? The last two error messages are seemingly triggered from setting the position on a transform. It is the transform though, that has particle systems somewhere in its subtrees. We never tinker with AABBs on our own so any hint on where I should start to investigate is appreciated.

I got cought on “world” in worldAABB. Is this just an AABB in world space or something more fancy and what condition causes this error? Is it just numeric stability and degrading precision when getting away from the origin too far?

How and why does the particle system depend on the AABB anyhow. I assume for rendering, but then I should not care much about it. The objects in our scene are large, but nowhere near numerical instability large. Player positions are in the range of roughly [-2k,-2k, -2k]x[2k, 2k, 2k] and tree nodes are almost all unit transforms.

thanks, Simon

If it’s caused by one of your scripts, then there are some possibilities:

  • setting particle positions very far from the origin (e.g. position.x = 1.0f / 0.0f would give an invalid result)
  • setting particle velocities to be very fast
  • setting some parameter that affects velocity, to be very large (eg Collision Bounce)

Bounds are calculated automatically by the runtime for Particle Systems, and are important for visibility checking. We don’t want to draw particle systems that are offscreen. Therefore, we calculate a box that encapsulates all particles, and use this to determine whether the system is visible. This is why bad particle data can break this computation.

It seems that there are 2 particle system on our ship that cause the problem. They don’t inherit speed though, and the error also happens in the editor’s scene view when the game is not playing. I’ll investigate further…

All righty, Narrowed it down to an empty project with a single particle system. The error occurs also in edit mode, so I guess our code is not to blame. Smells like a broken game object or config somehow.

Coping the component and pasting it as values into a vanilla particle system retained the errors, so I assume there’s garbage somewhere, possibly resulting form the 5.5 → 5.6 update.

@richardkettlewell Case number 909326

update: somehow the “Arc” parameter in the Shape module was set to NaN, probably caused by the update. Setting it to a valid value, fixes the problem.

Just a guess, but is the asset in question a Prefab Instance?

And thanks for reporting the bug! :slight_smile:

The particle system is inside a prefab that we instantiate at runtime. I can be that some are also laying around in the scenes for development though. I guess it also does not contain any nested prefabs, at least not in the part where we have the particle systems.