Search Issue Tracker
Won't Fix
Votes
0
Found in
5.4.1f1
Issue ID
842650
Regression
No
ReleaseAllScriptCaches did not release all script caches error followed by Fatal error after running scene for the second time
Steps to reproduce:
1. Open attached project provided in link bellow
2. Open scene "town1" and run it
3. Start as host. To simplify repro I've made sure that all needed methods are called without need to interact with scene. What happens is player prefab is instantiated. Then scene "level1" is loaded in which enemies are spawned and instantly destroyed. Finally, scene "town1" is loaded again
4. Once only ground is visible (no other object are in the scene) click play button to stop the scene
5. Start "town1" scene. Notice "ReleaseAllScriptCaches did not release all script caches" error in console
6. Start as host and notice Fatal error pointing at Instantiate
Crash happens when instantiating object which was loaded using Resources API
Reproduced with: 5.3.1f, 5.3.6p7, 5.4.2f1, 5.5.0b8
Comments (6)
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
- ScaleConstraint fails to maintain child GameObject scale when parent's scale is set to zero
- Crash on Transform::InitializeTransformHierarchyRecursive when opening a specific project
- Missing Script References are not removed from GameObjects when using GameObjectUtility.RemoveMonoBehavioursWithMissingScript
- UI Toolkit Editor Window Creator Action dropdown is not aligned with the text fields
- [Android][Vulkan] URP Decal Projector is broken in the Player when using the Deferred Rendering Path
mapleleaf4evr
Mar 02, 2021 05:37
This error seemed to have to do with the inspector window that I had open. I closed the tab, restarted, and things seem to be back to normal.
oobartez
Dec 16, 2020 14:38
We're still seeing the same bug years later, it's making it impossible to work on the project.
Xtro
Nov 19, 2019 00:32
ALTURIS2. Thank you for your comments here. I guess it will help me solve my problem.
Alturis2
Oct 24, 2016 13:34
Interesting, though, is that When using Resources.Load from OnAfterDeserialize() you get an error. But NOT when using it within OnBeforeSerialize(). THAT sounds like the real bug here. Just not reporting it as an error.
Alturis2
Oct 24, 2016 13:21
It looks like I have narrowed it down to the use of Resources.Load within OnBeforeSerialize
Alturis2
Oct 24, 2016 12:43
Confirmed this has something to do with my use of OnBeforeSerialize()
I have 6 uses of it in the project and when I make them all just return the issue goes away.