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
- Certain textures are incorrectly marked in the render pass list when observed through Render Graph Viewer
- "Assertion failed on expression" error occurs when multiple Animation Components are instantiated after changing the Culling Type
- MacOS persistentDataPath uses old path when built compared to Editor Play mode
- Crash on RaiseException when entering Play Mode in a specific project
- Debug Console does not reappear when disabling and re-enabling Debug.developerConsoleEnabled
Resolution Note (fix version 2020.2):
Fixed in: 2019.3.15f1, 2020.1.0b10, 2020.2.0a12