Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2021.1.X
Votes
0
Found in
2019.4.12f1
Issue ID
1327333
Regression
No
Crash when calling "Rigidbody2D.ClosestPoint" on an inactive Rigidbody2D.
Reproduction steps:
1. Open attached project "Physics2D_Closest_Crash_Project.zip" and scene "SampleScene"
2. Enter Play Mode
3. Crash!
Expected result: Should not crash.
Actual result: Crashes.
The physics system is simply not checking if the underlying Box2D body is available or not i.e. checking if it's NULL. This issue has probably been around for many, many years.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (fix version 2021.2):
Rigidbody2D.ClosestPoint now correctly checks for the underlying Box2D body before calculating the closest point.