Search Issue Tracker

Won't Fix

Fixed in 2020.1

Votes

96

Found in

2019.3.15f1

2019.4

2020.2

Issue ID

1262272

Regression

No

[iOS][UaaL] UnityFramework with 3rd party plugins triggers watchdog termination after launch

iOS

-

Reproduction steps:
1. Open project in "FirebaseTestMintegral.zip"
2. Build the project for iOS
3. Open .xcworkspace generated in the build folder
4. Deploy the Application to an iOS device
5. Shut the Application down (using Xcode or the device itself)
6. Open the Application from the device (without using Xcode)

Expected result: the Application will launch successfully
Actual result: the Application starts launching and shuts down in around 10-20 secs

Reproducible with: 2019.3.15f1, 2019.4.5f1, 2020.1.0f1, 2020.2.0a18
Could not test with 2018.4, 2019.3.0a1 because I was unable to resolve package/namespace errors

Devices tested:
Reproducible with:
VLNQA00310 iPad Pro 12.9 1st gen (iOS 13.4.1)
Not reproducible with:
VLNQA00204 iPhone 5C (iOS 10.3.3)
iPhone 7 iOS 12.3.
iPad 7th gen iOS 13.2.2
VLNQA00015, Samsung Galaxy Note8 (SM-N950W), Android 8.0.0, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540

---------------
Possible workaround:
By default UnityFramework.framework is embedded in Unity-iPhone target and it is not linked with it some plugins are sensitive to this initialization path. UnityFramework is loaded later at runtime.
* Go to Unity-iPhone / Build Phases / Link Binary with Libraries build section and add UnityFramework.framework.
UnityFramework will be loaded at the same time as the main executable.

  1. Response avatar

    Resolution Note:

    At some point, UnityFramework runtime together with plugins is loaded at run time by dyld/NSBundle.load. Please keep that in mind while developing a plugin.
    Any API-rich initialization on +(load), attribute(constructor), and global object construction code paths should be moved to a later phase preferably after UnityFramework is loaded, and even better when Unity is initialized.
    Simple plain data initialization is safe, but API-rich calls that deal with other os parts especially networking and user interface APIs might lead to deadlock leading to watchdog termination.
    By doing delayed/lazy initialization you can get better control over initialization order, you can reduce the application load time, and most importantly you avoid possible deadlock.

    ---------------
    Possible workaround:
    By default UnityFramework.framework is embedded in Unity-iPhone target and it is not linked with it, UnityFramework is loaded later at runtime and some plugins are sensitive to this initialization path.

    * Go to Unity-iPhone / Build Phases / Link Binary with Libraries build section and add UnityFramework.framework.
    UnityFramework will be loaded at the same time as the main executable.

Comments (30)

  1. D4581c102eeca9088e55c016ed06d832?d=mm

    artourmistplay

    Jan 24, 2021 18:43

    Like others, we ran into this issue and the workaround fixed it for us. The app works fine for everyone in Testflight, however, when we submit for review, it gets rejected because of a crash on load (that seems similar to the crash we see when we don't use the workaround). Has anyone encountered this in the app review process ? Has anyone successfully submitted an app with this workaround through the app review process with Apple ?

  2. D762fba87e01f8bcc89238fa5af3317a?d=mm

    OceanViewGames

    Jan 22, 2021 20:28

    This needs to be fixed. Spent far to long wondering what my issues are

  3. 5f3ef176f169ea10407004451e4fc14c?d=mm

    Idodi1337

    Jan 09, 2021 12:17

    So is this a won't fix or is this coming out in a later version? I'm kind of shocked at the amount of time it took to address this issue given its severity

  4. D53f5657b8b1959ab3b79dd78bf1aa38?d=mm

    ohthepain

    Dec 19, 2020 12:17

    Seriously Unity? It's now marked as won't fix and it has been an issue since 2019.

    Absolutely ridiculous that they treat developers this way AND that they can't even fix a simple initialisation bug.

    Absolutely unbelievable. I'd love to hear their excuse.

  5. Ab07078aa40f4b940f2d45a62c61bb2a?d=mm

    zackrump

    Dec 03, 2020 23:33

    What ALAN25799 said. THANKS!

  6. 37b18c5b72f4e8de088e585f8d55e328?d=mm

    maxdjking

    Nov 30, 2020 09:16

    Success !! Clean - Rebuild solution haha... thanks..

  7. 37b18c5b72f4e8de088e585f8d55e328?d=mm

    maxdjking

    Nov 25, 2020 11:17

    Thanks, But other error !
    unity version : 2019.4.14
    ios version : 14.1
    Termination Description: DYLD, dyld: Using shared cache: 45689165-E005-3DF1-BAD9-7C597109D0F3 | dependent dylib '@rpath/UnityFramework.framework/UnityFramework'
    not found for '/private/var/containers/Bundle/Application/613E8949-2D8E-4D50-B775-2D3CBE8662A8/my.app/my',
    tried but didn't find: '@rpath/UnityFramework.framework/UnityFramework' '/System/Library/Frameworks/UnityFramework.framework/UnityFramework'

  8. 4118f738547d1862e7220bf78d70d915?d=mm

    Airman

    Nov 25, 2020 04:12

    Work around sorted us out. Thanks guys!

  9. 740bfc6d4ba61f244e67bdcfbb56a378?d=mm

    AcuityCraig

    Nov 19, 2020 18:31

    Anyone have any suggestions on how to implement this workaround within Unity Cloud Build?

  10. A585e3e6dd08e42e4a46bd3eca057a0c?d=mm

    sarebots2

    Nov 15, 2020 19:02

    @Moriarty83 You have to move BuildProcessors script into the Editor folder

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.