Search Issue Tracker

Fixed

Fixed in 6000.3.12f1, 6000.4.1f1, 6000.5.0b1, 6000.6.0a2

Votes

0

Found in

6000.3.0a5

6000.4.0a1

6000.5.0a1

6000.6.0a1

Issue ID

UUM-137011

Regression

No

PhysicsCore2D Internal Validation doesn't happen in non-dev player build

2D

-

Currently all PhysicsCore2D objects and arguments have validity checking on any call into the engine. This provides users with immediate feedback to the console/log as well as stopping invalid objects and data being passed to Box2D. Whilst Box2D does check a handful of things being passed into it, these checks are not robust enough and will often produce bad behaviour and crashes.

We perform this validation in the Editor and development player only so not in final player builds. If a user doesn't encounter the issue in the Editor or development player then they won't detect/fix the issue so later in a deployed final player build, the issue would cause bad behaviour/crashing.

Recently I saw a (https://discussions.unity.com/t/crash-in-b2destroyjointinternal-when-destroying-a-physicsbody) and after looking at the dump file the user posted, it appears an invalid body was being passed back. As this was in a final player build, no validation is occurring which leads to a crash inside Box2D which isn't checking for a valid body there and then attempts to remove joints/contacts from a non-existent body (not good).

The fix here is to ensure all critical validation checks always happen. Given that these checks are extremely cheap, this makes sense but some are more expensive thus it's worth splitting up the validation checks into always-on and only-on in Editor/dev-player.

 

  1. Resolution Note:

    Fixed in 6000.6.0a2

  2. Resolution Note (fix version 6000.6.0a2):

    Fixed in 6000.6.0a2

  3. Resolution Note (fix version 6000.5.0b1):

    Fixed in 6000.5.0b1

  4. Resolution Note (fix version 6000.4.1f1):

    Fixed in 6000.4.1f1

  5. Resolution Note (fix version 6000.3.12f1):

    Fixed in 6000.3.12f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.