Search Issue Tracker
Fixed in 2020.2.X
Votes
0
Found in
2019.1.0a11
2019.3
2019.3.4f1
2020.1
2020.2
Issue ID
1248984
Regression
Yes
Editor crashes on Scripting::CreateEngineScriptableObject when creating Custom Editor Window in ScriptableImporter
Reproduction steps:
1. Open the attached "case_1248984.zip" project
-- Observe the crash
Reproduces on: 2019.1.0a11, 2019.2.0a1, 2019.3.14f1, 2020.1.0b9, 2020.2.0a11
Not reproducible with: 2018.4.23f1, 2019.1.0a10 (exception is thrown instead of crashing: "UnityException: ScriptableObject.ctor is not allowed to be called from a script constructor (or instance field initializer). Called from 'ArtomatixMaterialImporter'")
Notes:
- removing "private static readonly MaterialModalWindow window = new MaterialModalWindow();" in ArtomatixMaterialImporter.cs (line 9) stops Editor from crashing
- in some versions (especially in older versions like 2019.1) instead of crashing when opening the project, it silently crashes when reimporting "Materials\test.amtl" in the Project window
First lines of the stack trace:
0x00007ff64e34c6e7 (Unity) Scripting::CreateEngineScriptableObject
0x00007ff64e5793aa (Unity) ScriptableObject_CUSTOM_CreateScriptableObject
0x00000242ae29f5c7 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.ScriptableObject:CreateScriptableObject (UnityEngine.ScriptableObject)
0x00000242ae29f483 (Mono JIT Code) UnityEngine.ScriptableObject:.ctor ()
0x00000242b05be6eb (Mono JIT Code) UnityEditor.EditorWindow:.ctor ()
<...>
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
- Red spots appear when Blending Lighting Scenarios using Adaptive Probe Volumes
- [Windows] About Unity Window needs to be opened twice to adapt to resolution
- NullReferenceException and temporary graph corruption after entering playmode if output node connection was changed
- Sprite Renderer with Animation does not reflect Sprite changes in the Scene when switching Mask Interaction
- Error "NullReferenceException: Object reference not set to an instance of an object" is present when loading 3D text mesh in Player from an asset bundle that is built with an older Editor version
Resolution Note (fix version 2020.2):
Fixed in: 2019.3.15f1, 2020.1.0b10, 2020.2.0a12