Search Issue Tracker

Fixed in Unity 2019.1

Votes

0

Found in

2018.1.6f1

Issue ID

1056115

Regression

No

Crash on Scripting::ScriptingWrapperFor when destroying component with GameObject.DestroyImmediate after re-adding it

Scripting

-

-

Priority: 3Not yet prioritized for a release

-

Severity: 1Crash, freeze, data loss, work stops

How to reproduce:
1. Open the "crash_on_change.zip" project
2. Open the "SampleScene.unity" scene
3. Select "Directional Light" and "Cube" game objects via Hierarchy
4. In the Inspector open the "Network Identity" component context menu
5. Press "Selection to PhotonView"
6. Select the same game objects again
7. Remove "Photon View" component
8. Add "Network Identity" component
9. Repeat step 4-5

Actual result: Unity crashes. (gif attached)

Reproducible with: 2017.1.4p2, 2017.2.3p2, 2017.4.7f1, 2018.1.9f1, 2018.2.0f2, 2018.3.0a5.

Notes:
Assertion failed: Assertion failed on expression: 'm_InstanceID != InstanceID_None' appears after first execution of the script.
The crash is caused by line: GameObject.DestroyImmediate(networkView); SelectiontoPhoton.cs: 45

---------------------------------------------------
Fixed in 2019.1.0a11.

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.