Search Unity

Loading.LoadFromActivationQueue stalled [wait for loading operation to finish]

Discussion in 'Editor & General Support' started by TurboNic, Nov 14, 2017.

  1. TurboNic

    TurboNic

    Joined:
    Oct 7, 2015
    Posts:
    5
    I've gotten this message in the profiler using Deep Profile in a couple (seemingly) random scenarios now:

    1. Toggling a particle system on. It didn't have anything special about it, but when turning on this one particle system's game object, I would see this profiler message with a hefty CPU cost associated with it.

    2. When playing a spatialized audio source. Same message. But not on ALL audio sources.

    I can't seem to find any documentation about this message anywhere online, so I thought I'd ask if anyone knows what it means.

    All the audio and particle systems in the game either live directly in the scene or are pooled in one way or another, so it seems odd for it to be some kind of loading issue.

    Any help is greatly appreciated!
     

    Attached Files:

  2. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    508
    Hi!

    From what I can see, "Loading.LoadFromActivationQueue stalled [wait for loading operation to finish]" indicates that object loading (Loading.ReadObject) on one thread (presumably main thread) is interfering with loading on a loading thread.
    If you have any async load operation (LoadAssetAsync, LoadAsync) the solution would be to wait until they are completed before calling API which can do synchronous loading.

    If you select Loading.ReadObject you can see in Detailed objects view which object wants to be loaded (in the Editor).
     
  3. TurboNic

    TurboNic

    Joined:
    Oct 7, 2015
    Posts:
    5
    Hey Alex, thanks for the tip. Took a look at the detailed objects view and best I can tell, the issue is originating from AudioSource.set_spatializeInternal (). I assume that's likely an issue on the Unity side somehow? I'll start to do some searching for that specific call, but wanted to see if you might have any more insight?

    Thanks so much!
     

    Attached Files:

  4. TurboNic

    TurboNic

    Joined:
    Oct 7, 2015
    Posts:
    5
    Also seeing a similar issue with some particle effects. The one in this screenshot lives in the scene at all times and its game object is just getting toggled on an off when relevant.
     

    Attached Files:

  5. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    508
    In hierarchy view there is a detailed view detailed named "Show Related Objects" which can say which object/asset was loaded. If you click on the line it pings correspondent asset in ProjectBrowser - https://i.imgur.com/9CkkjWC.png
    That might help with identifying which asset to preload or keep alive.