Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UnityFramework load in 2019.3.11 causes Watchdog Transgression crash (0x8badf00d)

Discussion in 'iOS and tvOS' started by yurykorzun, Apr 28, 2020.

  1. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    149
    What a GREAT time to publish for iOS, especially if you need to do it immediately.

    So, the old Unity versions have bugs related to Storyboard (or don't support it at all) which is mandatory for iOS and newer Unity versions have this issue, it will make our apps crash at startup. Should I go with a broken Storyboard or crashing app version, both of these can make the review team reject the app, and even worse, make my users remove my app.

    It would be ok if this issue is here for a few days, but hey, it is known for a couple of months, even bug report is made, and still no solution.

    I should be surprised by this, but I'm not, that's how Unity works.
     
  2. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    149
    @Tortuap
    I can't message you. What Unity version do you use now, or how did you solve these issues?
    - issue in this thread (from 2019.3)
    - app crash when force-quitting while the ad is displayed (from 2019.3)

    Question for everyone else regarding this crash issues. How is the situation in 2017LTS and 2018LTS (2018.4.21 and 2018.4.22 have the same issues)?
     
  3. TijsVdV

    TijsVdV

    Joined:
    Mar 7, 2017
    Posts:
    32
    I think we are seeing this issue in 2019.4.8f1. When we are connected to Xcode all is fine and the app runs, but when we disconnect and start the app ourselves, it crashes.
     
    andreyshade likes this.
  4. c0ffeeartc

    c0ffeeartc

    Joined:
    Jul 23, 2015
    Posts:
    42
    There is a workaround in bug report. It helped for at least 1 of my projects
     
    Last edited: Oct 23, 2020
    Mark-Currie and Ribeiro_Aquiris like this.
  5. nmd2

    nmd2

    Joined:
    Mar 19, 2019
    Posts:
    13
    I believe this issue is happening again from Unity 2019.4.5f1, Xcode 12.2, iOS 14.2

    The steps above and setting enable bit code to No will yield a build that works on iOS 14.2
     
    Last edited: Nov 6, 2020
  6. Tortuap

    Tortuap

    Joined:
    Dec 4, 2013
    Posts:
    137
    Hi
    I'm building on iOS using 2019.2
    This solve the issue mentioned in this thread (app crash at startup).

    I also had the "app crash when force-quitting while the ad is displayed" issue, but because it wasn't a big issue for player retention, as it is silent (only appears in crash reports, users won't see anything), I didn't took care of this one.
     
    studentvz likes this.
  7. GodnessLuo

    GodnessLuo

    Joined:
    Aug 9, 2017
    Posts:
    6
    Have you solved this problem?
    I have the same issue here and only on iOS 14.2...Bad day.
     
  8. GodnessLuo

    GodnessLuo

    Joined:
    Aug 9, 2017
    Posts:
    6
    Do I need to clear the Embed Frameworks Setting?
     
  9. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    @dan_unity829 do you know if "enable bitcode: no" is needed for this to work? I keep getting rejected from Apple Review with zero crash logs to go on, but I'm guessing this might be the issue. I've tried the workaround, but not tried set bitcode to "no" yet.
    Also as GodnessLuo wrote, is "Do I need to clear the Embed Frameworks Setting?" needed as well?

    EDIT:
    Did submit a build with "bitcode: no" and still got rejected without any logs to go on...
     
    Last edited: Dec 7, 2020
    ROBYER1 likes this.
  10. Mark-Currie

    Mark-Currie

    Joined:
    Sep 6, 2012
    Posts:
    54
    BTW, this is still happening and it's insidious because it's only reproducible on some iOS devices and it only happens when you are NOT debugging using the XCode debugger. What an evil bug!

    Thank you! The workaround you pointed out is working! And it seems Unity is on the verge of fixing it.
     
  11. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    I'm sitting here refreshing the LTS page hoping to get 2019.4.17f1 available for download...This is not fun when Apple is closing shop in a few days...
     
  12. GodnessLuo

    GodnessLuo

    Joined:
    Aug 9, 2017
    Posts:
    6
    This workaround will cause another problem...It will show a crash tip box when you clear your app in the background.
     
    Mark-Currie likes this.
  13. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    So this issue has now been marked as "Wont Fix", it previously said "Fixed in 2019.4" (but didn't specify version). Can we get an official response regarding this? It has also been removed from "Known Issues" in 2019.4.18f1 but hasn't been specified as fixed, what the hell?
     
    Mark-Currie and studentvz like this.
  14. artour

    artour

    Joined:
    Mar 25, 2014
    Posts:
    3
    @Maisey were you able to resolve the issue ? We got the builds working using the workaround. They work on Testflight but then when it goes to the Apple review process, they get a crash on launch and we get rejected. We haven't been able to repro the issue on any device on Testflight...
     
  15. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    Hey @artour

    I was able to repro* it locally when not using the workaround (got the crash-log showing that it was indeed this bug). Using the workaround seems to eliminate the crash (at least according to our testing).
    We did however in correlation with this bug have a bug with Unity Splash Screen causing freeze/extreme loading times which caused Apple to reject us a number of times. We removed Unity Splash Screen and had our own "empty" scene as a loading screen. It's a longshot that this would work for you, but if you're desperate...try it out, you might get lucky.

    * randomly make it occur

    (It may also differ depending on what dependencies you use, in our project we had Firebase, Facebook and quite a lot of Ad SDKs)
     
  16. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    149
    Did you report this as a bug or do you have a link to the thread about this issue (if thread or bug report already exists)?
     
  17. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    I made a post in this thread (my issue was slightly off topic). I did not make an official bug report because I didn't (and still don't) have the time to make a proper report and it's especially demotivating when they don't even fix the ones we do report.
    Good luck Unity with the mentality of "Won't Fix"...in a LTS-version. An official response detailing why this would be fixed in 2020 and not 2019 is too much to ask?
     
  18. artour

    artour

    Joined:
    Mar 25, 2014
    Posts:
    3
    Just to update the thread in case others face this issue, we have now passed review. There are a few changes that we made so I'm not 100% which of them fixed it:

    1. Removed Unity VFX Graph. We didn't use it in the project but apparently just having it in the project may cause problems.

    2. We turned off the splash screen as Maisey suggested

    3. We kept the workaround suggested here:
    https://issuetracker.unity3d.com/is...07.2130756126.1611704108-237245746.1588884917

    4. Upgraded to Unity 2020.2. Note this introduces other workarounds that we had to do, specifically as noted here:
    https://forum.unity.com/threads/201...rk-framework-contains-disallowed-file.751112/

    Thanks everyone for all the help with this.
     
    ROBYER1 and Maisey like this.
  19. Martin_Gonzalez

    Martin_Gonzalez

    Joined:
    Mar 25, 2012
    Posts:
    361
    Is there a way to automize the workaround? I found PBXProject API confusing
     
  20. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    @Martin_Gonzalez, I'm not sure what else you're after when it comes to "automize". Adding this script (taken from comments from issue-report) is basically automizing it (I haven't confirmed it myself):

    Code (CSharp):
    1.  
    2. using System.IO;
    3. using UnityEngine;
    4. using UnityEditor;
    5. using UnityEditor.Build;
    6. using UnityEditor.Build.Reporting;
    7. using UnityEditor.iOS.Xcode;
    8.  
    9. public class iOS_14_2_Workaround : IPostprocessBuildWithReport
    10. {
    11.     public int callbackOrder => 1;
    12.  
    13.     public void OnPostprocessBuild(BuildReport report)
    14.     {
    15.         #if UNITY_IOS
    16.         if( report.summary.platform == BuildTarget.iOS )
    17.         {
    18.             Debug.Log("Applying iOS 14.2 workaround. Remove me once Unity has patched this.");
    19.             var pathToBuiltProject = report.summary.outputPath;
    20.             var projectPath = PBXProject.GetPBXProjectPath(pathToBuiltProject);
    21.             var project = new PBXProject();
    22.             project.ReadFromString(File.ReadAllText(projectPath));
    23.             project.AddFrameworkToProject( project.GetUnityMainTargetGuid(), "UnityFramework.framework", false );
    24.             project.WriteToFile( projectPath );
    25.         }
    26.         #endif
    27.     }
    28. }
    29.  
    30.  
     
    cihadturhan_unity and ROBYER1 like this.
  21. Martin_Gonzalez

    Martin_Gonzalez

    Joined:
    Mar 25, 2012
    Posts:
    361
    Thanks! I saw it later :/
    I would like to know more if it's a Unity issue or Plugins issue that we need to be aware of, perhaps someone from Unity explaining a little bit (I know what is the issue but I would like to see if Unity has some action points or plugins should be aware of this)
     
  22. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    149
    Unity announced a change in mid-2019, forum post 1, forum post 2, but as it looks they didn't think about all the Plugins/SDKs and what a mess will it cause. As announced, change was introduced in Unity 2019.3.0 on 27.01.2020.

    Now, you would expect a huge announcement specially made for Plugin/SDK providers so they could adjust to this but that never happened. Even a whole year later there is no public statement that would notify all Plugin/SDKs providers to make changes so this error would go away. Not even a single official response on this breaking issue on this forum, very disappointing, like it is thrown under the rug. Plugins that still didn't adjust to this change (many still don't know about this) will crash the app if you are not using a workaround, but a workaround by some reports above causes another crash.

    Probably we users (in fact beta testers, QA) should notify Plugin/SDK providers, as we also need to find and report breaking bugs that are dragged from version to version over several months until we report them. Unity has catastrophic QA, I'm pretty sure that many things are thrown under the rug until someone makes a detailed bug report.

    Correct me if any of my statements are wrong.
     
    Last edited: Feb 2, 2021
    ROBYER1 likes this.
  23. Tortuap

    Tortuap

    Joined:
    Dec 4, 2013
    Posts:
    137
    I agree with you that Unity devs that are responsible for this change ( known as UaaL, or Unity as a Library, introduced in 2019.3 ) didn't understood how critical are the side effects they introduced.
    Even if they argue that the deadlocks are half made by 3rd party plugins code, those are side effects of a change they made, and in those dead locks they might play the other half locking the same resource.

    But I would disagree about the QA, I think the job done by QA is well done, considering the huge amount of work it is. I have produced 100+ bug reports and almost each of them have been taken and tested seriously. It is just that sometimes, the decisions that result are not meeting our expectation, but it is another concern.
     
    Last edited: Feb 13, 2021
    studentvz likes this.
  24. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    Just want to update to let people know that Unity has now marked it as "Won't Fix" for all Unity versions (previously it said it was fixed in Unity 2020). The mystery continues. o_O
     
  25. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    I am confused why the generated Xcode project from Unity doesn't automatically have the framework link setup to avoid this issue?

    Have been working on an IOS project for a while now and we only just noticed this when we went to use Testflight, sometimes I would notice a long hang on app load in Xcode builds but it was only when the build was pushed to Testflight, IOS would flag a crash error.

    For our users/the client, this meant that they would install through testflight then the app would be killed in the background when they weren't using it, when re-opening the app, they would see a popup that the app has crashed, this would also happen if the app was ran once, closed, then opened again.

    I would like to see a proper fix from Unity as this is a mess
     
  26. LE-Peter

    LE-Peter

    Joined:
    Sep 15, 2020
    Posts:
    44
    In 2020.3.25 if I use this code I get a linker error

    If I remove this class, then I get the watchdog transgression on launch. Firebase isn't in the project.
     
    ROBYER1 likes this.
  27. osgseb

    osgseb

    Joined:
    Jan 17, 2022
    Posts:
    26
    Hello,

    I'm experiencing the same issue and even with the workaround it still persists. What's going on is not really cristal clear to me. I wanted to know if us, as developer, can do something to delay SDK initializations ? Meaning, simply added an intermediate empty scene to ensure no SDK API calls is done would/could be enough or if those SDK already perfoms some operations in their hand which we can't control ?

    Thanks
     
  28. cihadturhan_unity

    cihadturhan_unity

    Joined:
    Apr 19, 2021
    Posts:
    62
    I have this issue in 2020.3.18f1 (LTS) and I don't have firebase. I have facebook and gameanlaytics.
    Here is the related part of crash log
    Code (CSharp):
    1. xception Type:  EXC_CRASH (SIGKILL)
    2. Exception Codes: 0x0000000000000000, 0x0000000000000000
    3. Exception Note:  EXC_CORPSE_NOTIFY
    4. Triggered by Thread:  0
    5.  
    6.  
    7. Kernel Triage:
    8. VM - Compressor failed a blocking pager_get
    9. VM - Compressor failed a blocking pager_get
    10. VM - Compressor failed a blocking pager_get
    11. VM - Compressor failed a blocking pager_get
    12. VM - Compressor failed a blocking pager_get
    13.  
    14.  
    15. Thread 0 name:
    16. Thread 0 Crashed:
    17. 0   libsystem_kernel.dylib            0x00000001b8863f90 __psynch_cvwait + 8
    18. 1   libsystem_pthread.dylib           0x00000001f24a6254 _pthread_cond_wait + 1228 (pthread_cond.c:636)
    19. 2   UnityFramework                    0x000000010a2bd7cc il2cpp::os::posix::PosixWaitObject::Wait(unsigned int, bool) + 404 (PosixWaitObject.cpp:119)
    20. 3   UnityFramework                    0x000000010a2b5190 il2cpp::os::Event::Wait(unsigned int, bool) + 16 (Event.cpp:46)
    21. 4   UnityFramework                    0x000000010a2b5190 il2cpp::os::Thread::Join(unsigned int) + 16 (Thread.cpp:219)
    22. 5   UnityFramework                    0x000000010a2b5190 il2cpp::os::Thread::Join() + 24 (Thread.cpp:213)
    23. 6   UnityFramework                    0x000000010a2db028 il2cpp::vm::Thread::KillAllBackgroundThreadsAndWaitForForegroundThreads() + 620 (Thread.cpp:329)
    24. 7   UnityFramework                    0x000000010a2e81a8 il2cpp::vm::Runtime::Shutdown() + 140 (Runtime.cpp:405)
    25. 8   UnityFramework                    0x0000000109b9ab60 CleanupIl2Cpp() + 20 (MonoManager_Il2Cpp.cpp:297)
    26. 9   UnityFramework                    0x0000000109ab1740 PlayerCleanup(bool) + 84 (Player.cpp:646)
    27. 10  UnityFramework                    0x0000000109e7ce74 UnityCleanup + 16 (LibEntryPoint.mm:213)
    28. 11  UnityFramework                    0x00000001095b2a20 -[UnityAppController applicationWillTerminate:] + 36 (UnityAppController.mm:490)
    29. 12  UIKitCore                         0x000000018452f61c -[UIApplication _terminateWithStatus:] + 244 (UIApplication.m:6917)
    30.  
    and crash rate is getting serious. FYI, your appstore ranking won't be good if you see high crash rate although it doesn't affect users.
    upload_2022-2-10_10-32-10.png
     
  29. cihadturhan_unity

    cihadturhan_unity

    Joined:
    Apr 19, 2021
    Posts:
    62
    Update, fixed in the unity LTS 2021
     
  30. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    289
    it worked then sudently it stopped working ,weird..
     
  31. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    289
    seams like this is a Unity Ads problem, i removed it and everything went smooth as it should be,
    what is going one with unity ads?
     
  32. Mese

    Mese

    Joined:
    Dec 13, 2015
    Posts:
    41
    We are seeing something similar, but we are on Android ¿?
    I bet it is not the same problem, but after looking high and low on internet I come here, and here's the only Trace we could get after desymbolicated:
    **It only happens in Android 12**

    Code (CSharp):
    1. **PosixWaitObject.cpp line 119
    2. il2cpp::os::posix::PosixWaitObject::Wait(unsigned int, bool)**
    3.  
    4. Crashed: Thread :  SIGABRT  0x0000000000000000
    5. 00 pc 0x519dc libc.so
    6. 01 pc 0x519ac libc.so
    7. 02 pc 0x6d29ec libart.so
    8. 03 pc 0x16ea8 libbase.so
    9. 04 pc 0x16450 libbase.so
    10. 05 pc 0x38d598 libart.so
    11. 06 pc 0x38a2c4 libart.so
    12. 07 pc 0x37c4c8 libart.so
    13. 08 pc 0x20f240 libart.so