Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug [AnimationGraph]The BlobAssetReference is not valid. Likely it has already been unloaded or released

Discussion in 'DOTS Animation' started by anarkiastd, May 26, 2021.

  1. anarkiastd

    anarkiastd

    Joined:
    Feb 3, 2018
    Posts:
    8
    Hello,

    I am trying to use com.unity.animation for a simple case since animator is too expensive for high amount of actors; randomly getting "The BlobAssetReference is not valid. Likely it has already been unloaded or released." for the animation clip asset. Can you think of a reason that can be resolved quickly?

    Thank you,
    -Atahan
     
  2. StickyKevin

    StickyKevin

    Joined:
    Jul 1, 2020
    Posts:
    22
    Hi, your currently described issue is too broad to be assessed specifically.
    Maybe you can provide a simplified use case?
    For example how you are converting the data in the authoring script?
    Or which function call is throwing the error?
     
  3. anarkiastd

    anarkiastd

    Joined:
    Feb 3, 2018
    Posts:
    8
    Hola Kevin, thanks for your attention. Error stack and conversion flow is given below.

    As far as I understand, it is related to referenced AnimationClip's BlobAssetReference. ShaderGraph asset (Blend Graph, contains 1 mixer and 2 animation clips). I have tried both referencing from FBX or duplicating animation asset file to folder and referencing it from ShaderGraph asset. Both produces the same error randomly. It works all the game session or it won't entirely. Error is produced once.

    Conversion flow:

    MonoBehaviour spawner always ensures 150 entities are alive/spawns them as prefab;

    Actor prefab contains (only related components given):
    -Root GameObject Components:
    1. RigComponent [bones are all set-up], channels are empty.
    2. AnimationGraph (Phase: Process Late Animation Phase), Rig referenced, Inputs: mixer weight float from a ComponentData.
    3. SkinnedMeshRenderer, shaders set-up with LinearBlendingSkinning node.
    4. ConvertToEntity, convert and destroy selected.
    -All bones except root bone contains "LateAnimationGraphWriteTransformHandle" component. I've tried with or without it, does not make a difference.



    I am using URP and HR with DOTS (2021.1.6f1):
    Animation 0.9.0-p6
    Entities 0.17.0-p41
    Burst 1.5.0-p5
    Collections 0.15-p21
    Jobs 0.8.0-p23
    Mathematics 1.2.1
    Test Framework 1.1.24
    Data Flow Graph 0.19-p7
    Unity Physics 0.6.0-p3
    Hybrid Renderer 0.11.p42
    CoreRP 11.0.0
    Universal RP 11.0.0
    Shader Graph 11.0.0​


    Error stack:

    InvalidOperationException: The BlobAssetReference is not valid. Likely it has already been unloaded or released.
    Unity.Entities.BlobAssetReferenceData.ValidateNonBurst () (at Packages/com.unity.entities@0.17.0-preview.41/Unity.Entities/Blobs.cs:261)
    Unity.Entities.BlobAssetReferenceData.ValidateNotNull () (at Packages/com.unity.entities@0.17.0-preview.41/Unity.Entities/Blobs.cs:277)
    Unity.Entities.BlobAssetReference`1[T].get_Value () (at Packages/com.unity.entities@0.17.0-preview.41/Unity.Entities/Blobs.cs:365)
    Unity.Animation.BaseGraphLoaderSystem`3+<>c__DisplayClass14_0[TNode,TTag,TAllocatedTag].<OnUpdate>b__0 (Unity.Entities.Entity entity, Unity.Entities.DynamicBuffer`1[T] graphs) (at Library/PackageCache/com.unity.animation@0.9.0-preview.6/Unity.Animation.Graph/Systems/BaseGraphLoaderSystem.cs:102)
    Unity.Entities.EntityQueryBuilder.ForEach[T0] (Unity.Entities.EntityQueryBuilder+F_EB`1[T0] action) (at Packages/com.unity.entities@0.17.0-preview.41/Unity.Entities/EntityQueryBuilder_ForEach.gen.cs:272)
    Unity.Animation.BaseGraphLoaderSystem`3[TNode,TTag,TAllocatedTag].OnUpdate () (at Library/PackageCache/com.unity.animation@0.9.0-preview.6/Unity.Animation.Graph/Systems/BaseGraphLoaderSystem.cs:95)
    Unity.Animation.AnimationGraphLoaderSystem`3[TAnimationSystem,TTag,TReleaseTag].OnUpdate () (at Library/PackageCache/com.unity.animation@0.9.0-preview.6/Unity.Animation.Graph/Systems/AnimationGraphLoaderSystem.cs:96)
    Unity.Entities.ComponentSystem.Update () (at Packages/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at Packages/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:472)
    UnityEngine.Debug:LogException(Exception)
    Unity.Debug:LogException(Exception) (at Packages/com.unity.entities@0.17.0-preview.41/Unity.Entities/Stubs/Unity/Debug.cs:19)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Packages/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:477)
    Unity.Entities.ComponentSystemGroup:OnUpdate() (at Packages/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:417)
    Unity.Entities.ComponentSystem:Update() (at Packages/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Packages/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:472)
    Unity.Entities.ComponentSystemGroup:OnUpdate() (at Packages/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:417)
    Unity.Entities.ComponentSystem:Update() (at Packages/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at Packages/com.unity.entities@0.17.0-preview.41/Unity.Entities/ScriptBehaviourUpdateOrder.cs:333)​
     
    StickyKevin likes this.
  4. varnon

    varnon

    Joined:
    Jan 14, 2017
    Posts:
    52
    I don't know the solution, but I'll add that I see this error as well, only when using the animation graph component, and only after a certain amount of that clip are present in the scene, though the animation graph or other source. My solution was to just not use the animation graph component, unforunately.
     
    anarkiastd likes this.
  5. anarkiastd

    anarkiastd

    Joined:
    Feb 3, 2018
    Posts:
    8
    How do you use animation package without graph component? I am more than okay to that.

    except for this example:
    https://github.com/Unity-Technologi...s/Assets/Scenes/Examples/MyFirstAnimationClip
     
    Last edited: May 26, 2021
  6. DV_Gen

    DV_Gen

    Joined:
    May 22, 2021
    Posts:
    14
    If you know how, you can build the animation graph yourself in code. Thats what all of Unity's samples do. I find that challenging, but I've made do with that. It seems like the bug is with the animation graph component building the graphs for you. I think it will be an excellent solution later, but for now, you might have to try something else.
     
    anarkiastd likes this.
  7. varnon

    varnon

    Joined:
    Jan 14, 2017
    Posts:
    52
    The code is beyond me right now. I get a little bit of it, but not enough to really work with it. Check out PhilSA's system for something simple, but useful. I'm trying to learn the how all of it works from unity's samples and some of the forum contributions like this one.
    https://forum.unity.com/threads/sou...mation-system-to-get-started-quickly.1046975/
     
    anarkiastd likes this.
  8. anarkiastd

    anarkiastd

    Joined:
    Feb 3, 2018
    Posts:
    8
    Thanks for all the answers, I have more than what I needed now. Let the hordes flow!