Search Issue Tracker
Won't Fix
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
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.
-
CheritDeveloper
Mar 06, 2021 16:05
I had this issue in 2019.4.14f1 and the workaround that Binouze sent fixed it.
I'm also using Unity Cloud build. For everyone else that using Cloud Build, you can use the [PostProcessBuildAttribute(1)] with a static method to run the script. Also make sure to put the script in Assets/Editor. The script that I used:"
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;public class MyBuildPostprocessor {
[PostProcessBuildAttribute(1)]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
{
if(target==BuildTarget.iOS)
{
Debug.Log("Post Process Build callback, adding UnityFramework to project...");
var projectPath = PBXProject.GetPBXProjectPath(pathToBuiltProject);
var project = new PBXProject();
project.ReadFromString(File.ReadAllText(projectPath));
project.AddFrameworkToProject(project.GetUnityMainTargetGuid(), "UnityFramework.framework", false);
project.WriteToFile(projectPath);
}
}
}"
-
Martin_Gonzalez
Jan 29, 2021 02:53
So is there any news about this?
It's pretty sensitive and blocker.* Does the workaround works?
* Are we gonna have problems releasing?
* Why is not going to be fixed? -
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 ?
-
OceanViewGames
Jan 22, 2021 20:28
This needs to be fixed. Spent far to long wondering what my issues are
-
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
-
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.
-
zackrump
Dec 03, 2020 23:33
What ALAN25799 said. THANKS!
-
maxdjking
Nov 30, 2020 09:16
Success !! Clean - Rebuild solution haha... thanks..
-
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' -
Airman
Nov 25, 2020 04:12
Work around sorted us out. Thanks guys!
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (2021.1.X):
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.