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
- Editor crashes on UndoManager::CreateUndoRedoInfo when dismissing spammed "Inspector - Unsaved Changes Detected" pop-ups
- Docked Import Activity window disappears when another window is maximized
- "RecordCreation cannot be called while an undo is already processing" error is thrown in the Console when undoing and saving Generate Physics Shape changes in Aseprite Importer
- Addressables package throws TreeView and other GUI errors when opening the Addressables Groups window
- Internal resolution does not change when switching FSR2 quality modes using the camera's custom quality override
This is a duplicate of issue #1231211