Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2021.1.X
Crash when calling "Rigidbody2D.ClosestPoint" on an inactive Rigidbody2D.
1. Open attached project "Physics2D_Closest_Crash_Project.zip" and scene "SampleScene"
2. Enter Play Mode
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.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Scene is modified after exiting Play Mode when Graphics Compositor is enabled in HD RP
- Shortcuts inconsistently trigger when they have a conflict with the same Command
- On Script import/reimport MonoImporter does not generate consistent results due to updating Custom packages
- [Entities Graphics] Size of the Content Update generated folder increases when changes are made to the Scene
- In Play Mode, an extra Sync Call is made every frame when a GameObject has a Rigidbody 2D component