Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Exception: Attempting to use an invalid operation handle

Discussion in 'Localization Tools' started by bottledgalaxy, Sep 1, 2023.

  1. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    83
    Hi, every time I hit play on my project, i'm getting this error:

    And when I click on it in the console, it points to one of my Text fields with a Game Object Localizer Script.
    But what's strange is that when I change locales with the top right dropdown, things seems to be working as expected?

    Only thing I'm noticing is that localization package is dependant on com.unity.addressables@1.21.8 but my project has com.unity.addressables@1.21.9 (probably because of another dependency).

    Not sure if this is the reason, but it's something...
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
  3. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    83
  4. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    83
  5. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
    The error you are getting are due to your initialization script, you cant return a
    new AsyncOperationHandle<bool>();
    .
    Its an empty handle.

    You need to do
    return Addressables.ResourceManager.CreateCompletedOperation(true, "");


    Theres also something strange going on with the localization Game View menu so you may want to disable that in the preferences.
    upload_2023-9-1_19-50-54.png
     
  6. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    83
    After doing this now i'm getting A LOT of errors like this when STOPPING the player:
     
  7. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    83
    After my previous incident was closed for using an old version, I updated to the latest LTS and still getting this problem.
    New ticket is IN-53957
     
    karl_jones likes this.
  8. imaxs

    imaxs

    Joined:
    Oct 31, 2020
    Posts:
    9
    Hi there,
    I'm facing exactly the same bug.

    Unity 2022.3.9f
    com.unity.addressables@1.21.17


     
  9. imaxs

    imaxs

    Joined:
    Oct 31, 2020
    Posts:
    9
    This bug happens always when the "Localization Scene Controls" is open

     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
  11. bottledgalaxy

    bottledgalaxy

    Joined:
    Jul 19, 2019
    Posts:
    83
    imaxs and karl_jones like this.