Search Unity

Bug InitalizationObjectsOperation never release

Discussion in 'Addressables' started by llFlexford, Jun 2, 2023.

  1. llFlexford

    llFlexford

    Joined:
    Jan 21, 2022
    Posts:
    24
    Requirements:
    • Unity 2021.3.19
    • Addressables 1.21.10
    • enabled 'Send Profiler Events'
    • one or more "Initialization Object" in addressables settings, in my case it's "CacheInitializationSettings" but with other will the same result
    Example code:
    Code (CSharp):
    1. private static AsyncOperationHandle<IResourceLocator> _initOp;
    2.  
    3. private static void InitOp()
    4. {
    5.     _initOp = Addressables.InitializeAsync(false);
    6.     _initOp.Completed += handle =>
    7.     {
    8.         Debug.Log("Init completed");
    9.     };
    10. }
    11.  
    12. private static void ReleaseInitOp()
    13. {
    14.     Addressables.Release(_initOp);
    15. }
    Results:
    • call "InitOp"
    • EventsViewer has 2 not destroyed operations(look at init_1.png):
      • InitalizationObjectsOperation
      • InitalizationOperation
    • call "ReleaseInitOp"
    • EventsViewer has 1 not destroyed operation(look at init_2.png):
      • InitalizationObjectsOperation
    • try again release init operation for check data in debugger:
      • init operation really destroyed (look at init_3.png)
      • inner InitalizationObjectsOperation from path: init op -> m_InternalOp -> m_InitGroupOps is NOT DESTROYED (look at init_4.png)
     

    Attached Files:

    Last edited: Jun 4, 2023
  2. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    346
    Hi @llFlexford thanks for posting this issue with detailed reproduction steps. I've created a bug report.
     
    llFlexford likes this.