-
Notifications
You must be signed in to change notification settings - Fork 27
Unity crash on ReleaseAllScriptCaches not releasing all caches #125
Comments
FWIW, another clue: this happens with a certain scene loaded. It seems that if I make any change to the scene in Editor and save it (even something inconsequential like adding an empty game object) before editing any script, the crash disappears. |
Is it possible to send me the scene so I can reproduce it? I've never seen this error but it is definitely something that needs to be fixed. |
Sure, thanks, just sent a private message with the files to @sient on Unity Forums. To reproduce:
Very occasionally, you will get a different behavior, with the error showing up in the Console without a crash. That's what the screen shot I also sent you is for. That shows this rare case, after I double-click on one of the errors, which shows further info in Inspector, which hopefully will give some further clues. |
I'm having a hard time reproducing this - I tried doing so on both Windows and OSX, with Unity 5.2 and Unity 5.1. Can you try updating to Unity 5.2 and see if that resolves the issue? Also, try clearing out metadata by executing the menu item "Window/Full Inspector/Developer/Remove Metadata". Can you also try adding if (Application.isPlaying)
return; to line 43 of fiBaseStorageComponent? (at the start of the |
Hmm, I wonder if the act of unzipping and reloading the project on your machine is doing the same thing as saving, which makes the crash behavior disappear. In any case, I just tried the Remove Metadata. That DOES remove the problem. If I load the scene and remove metadata, then edit a file, no crash, all good. If I don't save and start over without removing metadata, the crash happens. If I remove then save the scene, the crash permanently disappears, i.e. no crash after quitting and reloading scene without removing metadata again. Will report back more findings as I get them. |
Adding those lines to ftBaseStorageComponent does NOT change anything apparent -- still get the crash. |
Hmm, I'm not sure how to fix this, since I'm unable to reproduce it and I think it is a regression in Unity. |
Closing for now (hopefully fixed in the releases from access - I've never been able to repro this). Please reopen if this is still happening. |
Got the error and crash as well. Right now, it's on every code change. I managed to get it to output to console only once, but I managed to copy the second log exactly:
As @Ghopper21 mentioned, it's extremely hard to pinpoint what causes it. I noticed it came in a revision where I added a reference extending What is consistent with the previous report is that the error occurs only when loading the scene without making (and saving) any change. As soon as I move any GameObject, for instance, and save, the crash seems to go away. In other words:
Whereas:
|
While running a diff on I created the ScriptableObject using Unity's CreateAssetMenuAttribute. Its GUID is 11400000. I'm pasting fiPersistentEditorStorage.prefab in case it can help you debug:
|
I know this is closed, but I just wanted to state my experience. I was getting the same error and crashing after making a class derived from BaseScriptableObject and creating an asset file. This was with FI 2.6.1 and Unity 5.4.3f1. After upgrading to FI 2.6.3, I no longer seem to have this issue. No clue what specifically was causing the issue or what corrected it, but I thought I'd document it. |
Whenever I edit any script file and save, causing Unity to reload/recompile the solution, I am getting a Unity crash. The Unity editor log shows:
I haven't been able to isolate the cause specifically, but here's what I have been able to find out: it's related to a scene where I have a BaseBehavior script attached to a game object. That script has public members that are interface types. In Inspector, the multiple choice field correctly shows the available implementations of the interfaces.
Several of these implementations inherit form BaseScriptableObject. When I choose one of these, the Inspector now shows a picker field below, with a foldout showing the fields of the implementation. I've assigned the picker field to a saved asset version of the scriptable object (created using this ScriptableObject factory).
For another one of the interfaces, there is an implementation that inherits from MonoBehaviour. For this one, in the inspector I've set the picker to an in-scene game object that has that implementation attached as a component.
The crash never happens when I first load the scene -- only when it is already loaded and I go edit any script, even with meaningless edits (e.g. adding a blank line to any script file in the assembly, whether used in this scene or not).
The crash manifests itself in two ways -- often with the Unity crash reporter popping up with the above log. Other times it just hangs, with the tail of the Editor log similarly showing "ReleaseAllScriptCaches did not release all script caches!" and indicating those two FullInspector caches.
Finally, occasionally, there is no crash but instead the "ReleaseAllScriptCaches did not release all script caches!" shows up as an error in the Console, followed by two more errors, each saying something about a problem with some fiPersistantStorage object referencing a scene object that doesn't exist or something and that it is "fixing" it -- something like that. (Haven't been able to reproduce this to copy down the exact error.)
Sorry I haven't been able to be more specific. I've been hacking at this for hours to try to isolate the problem. I know the above is rather vague. But I'm hoping you may recognize something! Let me know if helpful for me to provide more information, e.g. send you the project file.
The text was updated successfully, but these errors were encountered: