Search Issue Tracker
Duplicate
Votes
4
Found in
2020.1
2020.1.0b1
2020.2
Issue ID
1228509
Regression
No
Crash on PhysicsContacts2D::SendCallbackReports when destroying a GameObject
How to reproduce:
1. Open the attached project from link "Case_1228509" and load scene "MainGame"
2. Enter Play Mode
3. Press "Play" in the Game window
4. If it does not crash, exit the Editor and open the project again
Reproducible with: 2020.1.0b14, 2020.2.0a16
Could not test with: 2018.4.24f1, 2019.4.2f1 (scene file gets corrupted when downgrading)
First lines of stack trace:
0x00007ff69ee78b46 (Unity) PhysicsContacts2D::SendCallbackReports
0x00007ff69ee770e1 (Unity) PhysicsContacts2D::ProcessContacts
0x00007ff69ee2ea9f (Unity) PhysicsManager2D::Simulate
0x00007ff69ee2021f (Unity) PhysicsManager2D::FixedUpdate
0x00007ff69ee20363 (Unity) `PhysicsManager2D::Initialize'::`2'::FixedUpdatePhysics2DFixedUpdateRegistrator::Forward
Note: "Assertion failed on expression: 'm_InstanceID != InstanceID_None'" and "Contact key could not be found to be removed." are thrown in the Editor.log before crashing
Comments (2)
-
mhardy
Jul 03, 2020 20:55
I can't reproduce it with a small project, but I finally figured out what's causing the issue.
When the ship is killed in the game, I turn off all it's weapons with this:
_weapons.SetActive(false);
But during that time all the weapons are doing a lot of other things, playing animations, destroying themselves, etc. Somewhere in there the crash occurs.
I changed that one line of code to hide the Renderers instead, no crashes or errors since.
-
mhardy
Jul 02, 2020 13:30
I've also been able to reproduce the issue in 2019.4.2f1. Is there any known work around?
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
- Crash on "The GUID inside 'Assets/asset.png.meta' cannot be extracted by the YAML Parser." when opening the project
- Shadows disappear when looking at a certain angle in Scene view and using Cloud Shadows with Volumetric Clouds
- StackOverflowException freezes or silently crashes the Editor
- Microsoft Surface Device freezes when detaching and reattaching physical keyboard attachment to a Microsoft Surface device in Standalone Player for Windows
- Shadows are cast with artifacts on GameObjects when the light type is set to Point
This is a duplicate of issue #1231211