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
- PlayerPrefs get corrupted when a minimized fullscreen Player is closed through the Taskbar
- "To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations." warning is printed when JobTempMemoryLeakValidation switch is enabled
- Main Thread stalling when loading Audio Source asset asynchronously while preloading another Audio Source asset
- Material artifacts occur in the Material Preview window when baked lighting is applied to scenes
- “ArgumentOutOfRangeException” after saving, reseting and re-add Default Tile Palette Tools to the list in Preferences window
This is a duplicate of issue #1231211