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
- "GetPreferedValue" returns max value when using auto-sizing
- UI Builder doesn't update the style sheet when using "Extract inline style" right-click option
- “Assertion failed on expression” errors thrown when undoing Nodes creation with keyboard shortcut
- Crash on various stack traces when using Texture2D.CreateExternalTexture() while rendering
- Clicking on section text in Node Library > Context folder throws NullReferenceException errors
Resolution Note (fix version 2020.2):
Fixed in: 2019.3.15f1, 2020.1.0b10, 2020.2.0a12