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.
Comments (1)
-
MylesLambert
Nov 27, 2022 06:17
Hi! Can this fix be back ported to 2019 LTS?
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
- [Android][BiRP] Depth processing is handled incorrectly on certain Android devices when using 2 camera's
- [APV] Cancelling Display Dialog Error is thrown after Adaptive Probe Volumes tab is open in Lighting Window
- [APV] NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
- "OnTriggerExit2D" is called before "OnTriggerEnter2D" when object is destroyed immediately
Resolution Note (fix version 2021.2):
Rigidbody2D.ClosestPoint now correctly checks for the underlying Box2D body before calculating the closest point.