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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note (fix version 2020.2):
Fixed in: 2019.3.15f1, 2020.1.0b10, 2020.2.0a12