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
- PlayerPropertiesChanged event fires before Player Properties are applied
- Opening Media Pop-out in “Before You Start” Tutorial throws “Styles” and “Styles_Dark” messages in the Console window
- Play Mode Scenario selection/highlight is too long and out of its bounds when the Play Mode Scenario window is opened after maximizing
- Asset name is not shown in the Undo History window when a sprite is modified
- Moving a Tab to a floating window fails when floating windows are docked next to each other
This is a duplicate of issue #1231211