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

Unity 2021.3.9f1, XCODE 14, iOS 16 Problem

Discussion in 'iOS and tvOS' started by monda, Sep 13, 2022.

  1. monda

    monda

    Joined:
    May 14, 2015
    Posts:
    35
    Hi, I've recently updated to XCODE 14 and my devices to iOS 16.

    I have an AR App about to be released by the end of the month, the app was tested for months and never had a single crash or problem.

    After the XCODE and iOS Update the app is now randomly crashing on iPhone 11 Pro Max running iOS 16.

    I've also notice this error on XCODE:

    QOS_CLASS_USER_INTERACTIVE waiting on a thread without a QoS class specified. Investigate ways to avoid priority inversions

    followed by a series of details like:

    PID: 5083, TID: 399426

    Backtrace

    =================================================================

    3 UnityFramework 0x000000010addd6a8 _ZN12UnityClassic31Baselib_SystemSemaphore_AcquireENS_30Baselib_SystemSemaphore_HandleE + 28

    4 UnityFramework 0x000000010a68d6e0 _ZN15GfxDeviceClient16CreateGpuProgramE20ShaderGpuProgramTypeRK13dynamic_arrayIhLm0EER22CreateGpuProgramOutput + 424

    5 UnityFramework 0x000000010a56afd4 _ZN9ShaderLab10SubProgram7CompileERNS_15CompilationDataE + 1092

    6 UnityFramework 0x000000010a56c2cc _ZNK9ShaderLab7Program40EnsureCompiledAndMarkUnsupportedIfFailedEPKNS_10SubProgramEiRKN8keywords17LocalKeywordStateEPS5_R19ShaderSnippetResult + 168

    7 UnityFramework 0x000000010a56c744 _ZNK9ShaderLab7Program21GetMatchingSubProgramEPK6ShaderPKNS_4PassERKN8keywords17LocalKeywordStateEjPS8_R19ShaderSnippetResult26AsyncShaderCompilationModebii + 888

    8 UnityFramework 0x000000010a564788 _ZNK9ShaderLab11ShaderState20FindSubProgramsToUseEPK6ShaderPKNS_4PassERNS_11SubProgramsERK17ShaderPassContextRKN8keywords17LocalKeywordStateEbii + 204

    9 UnityFramework 0x000000010a56210c _ZNK9ShaderLab11ShaderState16ApplyShaderStateEjPK19ShaderPropertySheetRK17ShaderPassContextRKN8keywords17LocalKeywordStateEP6ShaderPNS_4PassEPbPNS_11SubProgramsEPK22DeviceRenderStateBlockii + 144

    10 UnityFramework 0x000000010a562020 _ZN9ShaderLab4Pass9ApplyPassEjPK19ShaderPropertySheetR17ShaderPassContextRKN8keywords17LocalKeywordStateEP6ShaderiiPbPKNS_10GrabPassesEPNS_11SubProgramsEPK22DeviceRenderStateBlock + 160

    11 UnityFramework 0x000000010a4bfb94 _ZNK22RenderingCommandBuffer29ExecuteCommandBufferWithStateER17ShaderPassContextR15RenderNodeQueueP27RenderingCommandBufferStatej16ComputeQueueType + 11388

    12 UnityFramework 0x000000010a4bc834 _ZNK22RenderingCommandBuffer20ExecuteCommandBufferER17ShaderPassContextR15RenderNodeQueuejP13dynamic_arrayINSt3__14pairIN9ShaderLab16FastPropertyNameEP13RenderTextureEELm0EE16ComputeQueueTypeSA_ + 88

    13 UnityFramework 0x000000010a4d7740 _ZN23ScriptableRenderContext27ExecuteScriptableRenderLoopEv + 2828

    14 UnityFramework 0x000000010c1fdb78 UniversalRenderPipeline_RenderSingleCamera_mB65976B5A2C523D5835CFA7188220511A01B66F2 + 1376

    15 UnityFramework 0x000000010c1fc0d8 UniversalRenderPipeline_RenderCameraStack_m47BBC0B4111D83BB6EE3275C9572BFBF2F5451B9 + 3532

    16 UnityFramework 0x000000010c1fa96c UniversalRenderPipeline_Render_m15A42AB44C14AB4DCA7EF0B915964D46B643D50E + 540

    17 UnityFramework 0x000000010c363568 RenderPipelineManager_DoRenderLoop_Internal_m01D54C058082806D20515903AC0558768DA1A0FA + 444

    18 UnityFramework 0x000000010b250ac8 _ZN6il2cpp2vm7Runtime15InvokeWithThrowEPK10MethodInfoPvPS5_ + 100

    19 UnityFramework 0x000000010b250910 _ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException + 84

    20 UnityFramework 0x000000010a5f13f0 _Z23scripting_method_invoke18ScriptingMethodPtr18ScriptingObjectPtrR18ScriptingArgumentsP21ScriptingExceptionPtrb + 112

    21 UnityFramework 0x000000010a5fd230 _ZN19ScriptingInvocation6InvokeEP21ScriptingExceptionPtrb + 120

    22 UnityFramework 0x000000010a4d80ec _ZN23ScriptableRenderContext31ExtractAndExecuteRenderPipelineERK13dynamic_arrayIP6CameraLm0EEPFvPK9SceneNodePK4AABBR9IndexListPK22SceneCullingParametersEPv18ScriptingObjectPtr + 304

    23 UnityFramework 0x000000010aa29310 _ZN13RenderManager22RenderOffscreenCamerasEv + 1928

    24 UnityFramework 0x000000010a5031fc _Z12PlayerRenderb + 208

    25 UnityFramework 0x000000010a50466c _Z17ExecutePlayerLoopP22NativePlayerLoopSystem + 100

    26 UnityFramework 0x000000010a5046ac _Z17ExecutePlayerLoopP22NativePlayerLoopSystem + 164

    27 UnityFramework 0x000000010a504908 _Z10PlayerLoopv + 272

    28 UnityFramework 0x000000010ac4e7fc _ZL19UnityPlayerLoopImplb + 112

    29 UnityFramework 0x000000010a175530 -[UnityAppController(Rendering) repaint] + 84

    30 UnityFramework 0x000000010a1754c0 -[UnityAppController(Rendering) repaintDisplayLink] + 76

    31 QuartzCore 0x0000000188e8aa98 C4C4667B-6933-3B01-A37B-747CD0C00431 + 170648

    32 QuartzCore 0x0000000188e9c3e8 C4C4667B-6933-3B01-A37B-747CD0C00431 + 242664

    33 CoreFoundation 0x0000000187877b30 42C5C917-0447-3995-B50F-DE4D132C2435 + 506672

    34 CoreFoundation 0x0000000187895010 42C5C917-0447-3995-B50F-DE4D132C2435 + 626704

    35 CoreFoundation 0x0000000187896c18 42C5C917-0447-3995-B50F-DE4D132C2435 + 633880

    36 CoreFoundation 0x000000018787844c 42C5C917-0447-3995-B50F-DE4D132C2435 + 509004

    37 CoreFoundation 0x000000018787d1e4 CFRunLoopRunSpecific + 612

    38 GraphicsServices 0x00000001c069d368 GSEventRunModal + 164

    39 UIKitCore 0x0000000189d2cd88 7B942FA4-CB76-3375-9972-F58C14492FB4 + 3812744

    40 UIKitCore 0x0000000189d2c9ec UIApplicationMain + 340

    41 UnityFramework 0x000000010a175068 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 92
     
  2. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    this is not an error. You can "get rid of it" by editing scheme: Diagnositcs -> "Runtime Api Checking" section -> Thread Performance Checker

    you didnt provide call stack for that, nor repro project with repro steps so i don't know how we can help
     
    monda likes this.
  3. monda

    monda

    Joined:
    May 14, 2015
    Posts:
    35
    Hi, thanks for this. Is this a new thing on XCODE 14? I've just tried other apps and they all got the same problem.
    About the Call Stack, I gotta catch it...every time I'm connected to XCODE it doesn't crash but if I use the app "Free" it crashes :(
     
  4. ANTONBORODA

    ANTONBORODA

    Joined:
    Nov 16, 2017
    Posts:
    46
    I have the same issue, the app randomly hard-crashes.
    The XCode displays this:
    upload_2022-9-20_13-39-48.png

    It crashes for me when viewing a large collection of elements, like a catalog, with a dynamically loaded previews.
     
  5. monda

    monda

    Joined:
    May 14, 2015
    Posts:
    35
    My problem was ARFoundation, I've updated to the latest version and the crash stopped. I've tested for hours on old devices and new as well.
     
    Arbury_Labs and Railon23 like this.
  6. ANTONBORODA

    ANTONBORODA

    Joined:
    Nov 16, 2017
    Posts:
    46
    It didn't solve it for me, I did it before posting here. I've updated to 5.0.2 and the crash still occurs.
     
    BBigG likes this.
  7. BBigG

    BBigG

    Joined:
    Aug 7, 2019
    Posts:
    4
    I am running into the same issue. @Alexey do you have updates on this issue and if there will be a fix soon?
     
  8. merrythieves

    merrythieves

    Joined:
    Apr 28, 2021
    Posts:
    14
    Same issue here. Updated to AR Foundation 5.0.2, cleaned, rebuilt, but the error still appears and the hard crashes continue.

    For now it looks like we need to disable multi-threaded rendering until a fix is found.

    Thanks for your patience while we fix the issue. Until it's fixed, I recommend using AR Foundation 4.1.10, 4.2.3, or 5.0.0-pre.13 without multi-threaded rendering for iOS.​

    Follow the discussion here: When running on iOS 16 the camera feed is unstable (shaky and jittery) when multi-threaded rendering is enabled · Issue #988 · Unity-Technologies/arfoundation-samples (github.com)
     
    Last edited: Oct 12, 2022
    Railon23 likes this.
  9. monda

    monda

    Joined:
    May 14, 2015
    Posts:
    35
    Thanks for this! I really gotta update the app this way, I got more than 300 users reporting crashes, can't wait for a fix.

    If possible, I need a small help: On my package Manager I can only see the 4.2.6 version of ARFoundation, even if I enable Preview Packages, nothing else is available, how can I install another version of ARFoundation?

    EDIT: Solved, Looks like there is a bug in Unity, I had to manually edit the .json in order to have the package.
     
    Last edited: Oct 15, 2022
  10. mylastggeast

    mylastggeast

    Joined:
    Jun 14, 2021
    Posts:
    47
    @Alexey

    Does this mean there is no risk of the game hanging and Unity won't patch this?
    I am getting this warning on a game without ARFoundation btw
     
    Sparkline, fwalker and Railon23 like this.
  11. AbeAvnisan

    AbeAvnisan

    Joined:
    Aug 5, 2021
    Posts:
    1
    I'm having the same issue as originally posted by @monda on Sep 13, 2022. I've tried
    • updating to ARFoundation 5.0.3 and Apple ARKit XR Plugin v 5.0.3
    • disabling multithreading in build settings -> player settings -> iOS -> rendering
    • disabling "main thread checker" in Xcode by going to edit scheme -> diagnostics
    Here are the specs to reproduce this issue:

    Device: iPhone 14 Pro
    OS: iOS 16.0.2
    Unity version: 2021.3.15f
    ARFoundation version: 5.0.3
    Xcode: 14.1

    Here is the trace:

    Thread Performance Checker: Thread running at QOS_CLASS_USER_INTERACTIVE waiting on a thread without a QoS class specified. Investigate ways to avoid priority inversions
    PID: 1189, TID: 172575
    Backtrace
    =================================================================
    3 UnityFramework 0x000000010a2066c8 _ZN12UnityClassic31Baselib_SystemSemaphore_AcquireENS_30Baselib_SystemSemaphore_HandleE + 28
    4 UnityFramework 0x0000000109ba9700 _ZN8JobQueue17WaitForJobGroupIDE10JobGroupIDNS_21JobQueueWorkStealModeE + 628
    5 UnityFramework 0x0000000109c28c14 _ZN23TransformChangeDispatch40GetAndClearChangedAsBatchedJobs_InternalEyPFvPvjPK23TransformAccessReadOnlyPKyjES0_PN9profiling6MarkerEPKc + 720
    6 UnityFramework 0x0000000109b69e24 _ZN21RendererUpdateManager9UpdateAllER13RendererScene + 200
    7 UnityFramework 0x0000000109ee53f0 _ZN13RenderManager18UpdateAllRenderersEv + 72
    8 UnityFramework 0x0000000109bb1dcc _Z16CleanupAfterLoadv + 68
    9 UnityFramework 0x0000000109bc662c _ZN18LoadSceneOperation25PlayerLoadSceneFromThreadEv + 584
    10 UnityFramework 0x0000000109bc6704 _ZN18LoadSceneOperation22CompleteLoadFirstSceneEv + 12
    11 UnityFramework 0x0000000109bc6310 _ZN18LoadSceneOperation19IntegrateMainThreadEv + 132
    12 UnityFramework 0x0000000109bc76c4 _ZN14PreloadManager26UpdatePreloadingSingleStepENS_21UpdatePreloadingFlagsEi + 224
    13 UnityFramework 0x0000000109bc8094 _ZN14PreloadManager16UpdatePreloadingEv + 276
    14 UnityFramework 0x000000010a0a6838 _ZL19UnityPlayerLoopImplb + 280
    15 UnityFramework 0x00000001096958c0 UnityRepaint + 28
    16 UnityFramework 0x0000000109695894 -[UnityAppController(Rendering) repaint] + 108
    17 UnityFramework 0x00000001096957ec -[UnityAppController(Rendering) repaintDisplayLink] + 120
    18 QuartzCore 0x00000001b12caa98 C4C4667B-6933-3B01-A37B-747CD0C00431 + 170648
    19 QuartzCore 0x00000001b13f91c0 C4C4667B-6933-3B01-A37B-747CD0C00431 + 1409472
    20 UIKitCore 0x00000001b241b678 7B942FA4-CB76-3375-9972-F58C14492FB4 + 6624888
    21 UIKitCore 0x00000001b2a5a904 7B942FA4-CB76-3375-9972-F58C14492FB4 + 13175044
    22 UIKitCore 0x00000001b2a59ad0 7B942FA4-CB76-3375-9972-F58C14492FB4 + 13171408
    23 CoreFoundation 0x00000001afd1222c 42C5C917-0447-3995-B50F-DE4D132C2435 + 877100
    24 CoreFoundation 0x00000001afd1e614 42C5C917-0447-3995-B50F-DE4D132C2435 + 927252
    25 CoreFoundation 0x00000001afca251c 42C5C917-0447-3995-B50F-DE4D132C2435 + 419100
    26 CoreFoundation 0x00000001afcb7eb8 42C5C917-0447-3995-B50F-DE4D132C2435 + 507576
    27 CoreFoundation 0x00000001afcbd1e4 CFRunLoopRunSpecific + 612
    28 GraphicsServices 0x00000001e8add368 GSEventRunModal + 164
    29 UIKitCore 0x00000001b216cd88 7B942FA4-CB76-3375-9972-F58C14492FB4 + 3812744
    30 UIKitCore 0x00000001b216c9ec UIApplicationMain + 340
    31 UnityFramework 0x00000001096950d0 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 136
    32 ARFromScratch-2021.3.15f 0x0000000100b5fc98 main + 76
    33 dyld 0x00000001cdfe1948 341BBF64-6034-357E-8AA6-E1E4B988E03C + 88392
     
  12. thomasvaniseghemSB

    thomasvaniseghemSB

    Joined:
    Sep 15, 2022
    Posts:
    12
    Facing the same issue also using AR-foundation 5.0.3 on IOS 16 using XCode 14.1.
     
  13. ckempke

    ckempke

    Joined:
    Dec 15, 2020
    Posts:
    20
    Getting the same error. I'm not using ARKit at all, and disabled the two options listed in the reply two above. This is a very, very simple app, I've barely started it and it doesn't actually do much yet, end it still throws a random number of these messages right after startup.
     
  14. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    249
    We are also getting that "error" and random cashes that we can't pin point.
    Unity 2022.2.3f1 iOS.
     
  15. hochul-song

    hochul-song

    Joined:
    Aug 14, 2021
    Posts:
    1
    I also have these random crashes on my ios game. not using AR kit. Just with a 2d tilemap game. So far it happens only below iPhone 11, not above iPhone 13. Unity 2022.2.6f1
     

    Attached Files:

  16. keystagefun

    keystagefun

    Joined:
    Feb 19, 2020
    Posts:
    33
    I'm getting the same issue and not using ARFoundation.
     
  17. lukechatton

    lukechatton

    Joined:
    Apr 1, 2020
    Posts:
    2
    Also getting this without using ARFoundation.
     
  18. thegreatmiasma

    thegreatmiasma

    Joined:
    Mar 27, 2016
    Posts:
    42
    Arr, me getting the error too. I has no ARKit intARRgration either. Arr.
     
  19. juliens137

    juliens137

    Joined:
    Oct 2, 2017
    Posts:
    26
    happening to me as well. Anybody found a way to get it to go away?