Search Unity

Question Infinite hold when trying to load a localized behavior on android

Discussion in 'Localization Tools' started by NicolasBasilGerard, Feb 15, 2021.

  1. NicolasBasilGerard

    NicolasBasilGerard

    Joined:
    Nov 3, 2020
    Posts:
    7
    Hello,

    I have an addressable project that has a single scene in its apk. That scene loads the first remote addressable scene immediately and that scene contains a localized string component. Here the app freezes forever without logging any exception, after calling awake, start and one update on the new scene's objects (it doesn't happen if I disable the localized component, so I am certain it is the culprit). The issue doesn't happen in the editor.

    If I add a time consuming operation like loading other assets before loading my scene, the localization works fine, and it work in subsequent scenes. After a few days of trying different things I gathered that there is an operation somewhere that needs to be finished before the localized component can be used without locking the app. I thought it was the initialization operation of LocalizationSettings, and waiting on it in a minimal project does solve the issue, but it appears to be a coincidence(It fixes the issue on first startup for some devices, but once the scene is cached, it will load too fast and trigger the bug, so this operation isn't the culprit).

    Is there a way to find the condition I need to wait on to get the app to start 100% of the time ? Or is this a known issue, if so, is there a workaround ?

    I tried to make a minimal repro project, and it worked with our hosting service but when I tried to use the local hosting service the build throws a curl error on the majority of devices I've tried (I assume this is a quirk of the localization system or something changed in our network, as we didn't have any issue with it earlier in development).
    Putting it there just in case, if you have a blob storage to use to host the addressables: https://github.com/Basil42/RacingConditionMinimalRepro
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Hi,
    Im not aware of this issue. Could you please file a bug report so QA can try and recreate it? I suspect its something in Addressables causing the problem.
     
    Ascended_Fern likes this.
  3. NicolasBasilGerard

    NicolasBasilGerard

    Joined:
    Nov 3, 2020
    Posts:
    7
    Having a localized string in the root scene that is built in the app seems to have solved the issue, somehow. Is there a way to send a follow up to a bug report, in case the work around helps QA locate the problem ?
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Do you have the bug number? You can reply to the bug email with extra info I believe.
    Post the bug number here and I can check
     
  5. NicolasBasilGerard

    NicolasBasilGerard

    Joined:
    Nov 3, 2020
    Posts:
    7
    It's case 13144989. I'll try sending an answer to the email now.