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
Comments (2)
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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
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.