Search Issue Tracker
Fixed in 5.4.0
Votes
0
Found in
5.4.0b5
Issue ID
770153
Regression
No
[ExecuteInEditMode] Calling DestroyImmediate in OnEnable crashes Unity
Steps to reproduce:
1. Open attached project
2. In hierarchy, create empty game object and make sure that its Inspector is visible
3. Drag NewBehaviourScript on it and notice error that script can't be added and, when clicking OK, m_InstanceID != 0
4. Create new empty game object but this time make sure that its Inspector isn't visible (object isn't selected)
5. Drag NewBehaviourScript on it and observe a crash
Long story short: if object is selected and inspector is visible - errors, if object isn't selected - crash
Reproduced with: 5.2.4p1, 5.3.2p3, 5.4.0b6
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
x4000
Jun 24, 2016 13:23
Note: the problems I were having are now fixed in unity 5.3.5p5. I was seeing m_InstanceID != 0 issues, which I was assuming were related to this, but it may actually have been the Threadpool issues that were fixed there. Either way, b21 and b22 did not have the issue, but 5.3.5p4 did.
x4000
Jun 22, 2016 12:51
Is this something that we could get int the next 5.3 branch patch? So far as I can tell, this is only in the 5.4 patch notes, and this is affecting a project I'm working on. Upgrading to 5.4 resolves this issue, but then of course there are new issues arising from the fact that 5.4 is beta.