Search Issue Tracker
By Design
Votes
0
Found in
2017.4.0f1
2017.4.18f1
Issue ID
1119972
Regression
No
AssetDatabase.StartAssetEditing() inside EditorApplication.Update without AssetDatabase.StopAssetEditing() breaks the Editor
Registering a callback on EditorApplication.Update that call AssetDatabase.StartAssetEditing() without calling AssetDatabase.StopAssetEditing() during the same callback will completely break the Unity Editor update cycles. EditorApplication.Update won't be fired anymore and the Editor will be in a corrupted state not responding to most inputs.
To reproduce:
1. Download attached project “Case1119972.zip" and open in Unity
2. Press Reproduction > Run Without Issue
3. Observe that in Console Unity prints thousands of Logs that it is Updating
4. Press Reproduction > Run Issue (will break the editor)
Expected results: Observe that in Console Unity still prints thousands of Logs that it is Updating
Actual results: Observe that EditorApplication.Update won't be fired anymore and the Editor will be in a corrupted state not responding to most Inputs
Notes:
- This issue appears on both Windows and macOS
- It would be great if a proper Error message informs the User that he's missing a call to AssetDatabase.StopAssetEditing() matching AssetDatabase.StartAssetEditing()
- Sometimes Console throws Native Error messages :
Assertion failed on expression: 'GetApplication().MayUpdate()'
(Filename: C:\buildslave\unity\build\Editor/Src/Application/PlayerLoopController.cpp Line: 166)
Refreshing native plugins compatible for Editor in 4.58 ms, found 5 plugins.
Preloading 2 native plugins for Editor in 0.16 ms.
Assertion failed on expression: '!performAutorepaint || GetApplication().MayUpdate()'
(Filename: C:\buildslave\unity\build\Editor/Platform/Windows/EditorWindows.cpp Line: 2799)
Reproduced on 2017.4.0f1, 2017.4.19f1, 2018.2.20f1, 2018.3.3f1, 2019.1.0b1 and 2019.2.0a3
Comments (1)
-
RyanTremblay
Jul 26, 2019 17:22
"We have incoming improvements to the API that will simplify the way to deal with assets modification"
Are those improvements available yet? If so, what are they? If not, what is the latest timeline?
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
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
- Previously deleted “DefaultLookDevProfile“ is present when upgrading the Editor version
- [Ubuntu] UI text and buttons are missing spaces in Unity Version Control > New Workspace window
- "Inherit attribute is not supported" warning is shown but attributes are available in VFX Graph Output and Update blocks
Resolution Note:
A call to AssetDatabase.StartAssetEditing() completely stops the import process of any asset, until AssetDatabase.StopAssetEditing() is invoked. For this reason, a missing call to AssetDatabase.StopAssetEditing() makes the Editor misbehave.
We have incoming improvements to the API that will simplify the way to deal with assets modification, but for the time being calling AssetDatabase.SopAssetEditing() is required to keep the editor behave properly.