Search Issue Tracker

Duplicate

Votes

0

Found in

5.3.6p1

Issue ID

821051

Regression

No

GameObjects fail to load properly when doing a lot of loading, destroying, and UnloadUnusedAssets

Asset Loading

-

[IN THE EDITOR]
Steps to reproduce the issue:
1. Download and open attached project.
2. Open scene named "MainScene".
3. Enter the Play mode.
4. Notice that the "Console" window regularly outputs this message:
[PCG_9744] Test member is 5
5. Let the scene run for several minutes.

Actual result:
After some time the loading process fails and the "Console" window outputs these error messages:

The referenced script on this Behaviour is missing!
UnityEngine.AssetBundleRequest:get_asset()
AssetBundleLoader:OnAssetLoaded(AssetBundleRequest) (at Assets/AssetBundleLoader.cs:82)
<WaitAndLoadAsset>c__Iterator1:MoveNext() (at Assets/AssetBundleLoader.cs:76)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

The referenced script on this Behaviour (Game Object 'TestPrefab') is missing!
UnityEngine.AssetBundleRequest:get_asset()
AssetBundleLoader:OnAssetLoaded(AssetBundleRequest) (at Assets/AssetBundleLoader.cs:82)
<WaitAndLoadAsset>c__Iterator1:MoveNext() (at Assets/AssetBundleLoader.cs:76)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

GameObject (named 'TestPrefab') references runtime script in scene file. Fixing!
UnityEngine.AssetBundleRequest:get_asset()
AssetBundleLoader:OnAssetLoaded(AssetBundleRequest) (at Assets/AssetBundleLoader.cs:82)
<WaitAndLoadAsset>c__Iterator1:MoveNext() (at Assets/AssetBundleLoader.cs:76)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

Expected result:
The loading process should not fail and error messages should not appear.

Reproduced with:
5.3.6p2, 5.4.0f3, 5.5.0a5.

Cannot reproduce with:
5.1.5f1, 5.2.5f1, because the loading process does not work at all.

Note:
With 5.4.0f3 version of Unity the Editor even crashed after some time.

========== OUTPUTING STACK TRACE ==================

0x0000000140134BC2 (Unity) AwakeAndActivateClonedObjects
0x00000001401350A2 (Unity) CollectAndProduceClonedIsland
0x000000014013514B (Unity) CollectAndProduceClonedIsland
0x00000001401356CC (Unity) CloneObject
0x0000000140E8682C (Unity) Object_CUSTOM_Internal_CloneSingle
0x00000000130F0605 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Object:Internal_CloneSingle (UnityEngine.Object)
0x00000000130F0440 (Mono JIT Code) [C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.cs:164] UnityEngine.Object:Instantiate (UnityEngine.Object)
0x00000000130F00FC (Mono JIT Code) [C:\Users\LocalAccount\Downloads\case_821051-PCG_9744\Assets\AssetBundleLoader.cs:83] AssetBundleLoader:OnAssetLoaded (UnityEngine.AssetBundleRequest)
0x00000000130EF9B2 (Mono JIT Code) [C:\Users\LocalAccount\Downloads\case_821051-PCG_9744\Assets\AssetBundleLoader.cs:76] AssetBundleLoader/<WaitAndLoadAsset>c__Iterator1:MoveNext ()
0x0000000012FED6C8 (Mono JIT Code) [C:\buildslave\unity\build\Runtime\Export\Coroutines.cs:17] UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
0x0000000012FED83B (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_object_intptr (object,intptr,intptr,intptr)
0x00007FFC4557519B (mono) [c:\buildslave\mono\build\mono\mini\mini.c:4937] mono_jit_runtime_invoke
0x00007FFC454C84FD (mono) [c:\buildslave\mono\build\mono\metadata\object.c:2623] mono_runtime_invoke
0x000000014036020F (Unity) scripting_method_invoke
0x00000001404C432F (Unity) ScriptingInvocation::Invoke
0x000000014033A68E (Unity) Coroutine::InvokeMoveNext
0x000000014033AB45 (Unity) Coroutine::Run
0x0000000140131B05 (Unity) DelayedCallManager::Update
0x0000000140462AA3 (Unity) PlayerLoop
0x0000000140BD2A05 (Unity) Application::UpdateScene
0x0000000140BD3F89 (Unity) Application::UpdateSceneIfNeeded
0x0000000140BDBE54 (Unity) Application::TickTimer
0x0000000140E3D91E (Unity) FindMonoBinaryToUse
0x0000000140E3EF4C (Unity) WinMain
0x00000001415BCA40 (Unity) strnlen
0x00007FFC73D58102 (KERNEL32) BaseThreadInitThunk

========== END OF STACKTRACE ===========

[ON ANDROID]
Use "AndroidTest.apk" file (it is located in the "Builds" folder) to reproduce the same issue. These error messages should be visible:

The referenced script on this Behaviour is missing!
The referenced script on this Behaviour (Game Object 'TestPrefab') is missing!
The file 'none' is corrupted! Remove it and launch unity again!

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.