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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug iOS app built with Unity 2020.3.42 always crashes on exit

Discussion in 'iOS and tvOS' started by kyubuns, Dec 7, 2022.

  1. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    135
    After upgrading from 2020.3.18 to 2020.3.42, my iOS app now crashes 100% when taskkilling.
    I have tried it on multiple devices and all (all iOS16).
    Do you have any information about this?
    This thread is similar to this one, but the graphics had nothing to do with it, so I started a new thread.

    https://forum.unity.com/threads/cra...id-jobgroupid-jobqueue-jobqueueworks.1370391/


    Incident Identifier: 133234C1-5458-4D02-A59A-C08F6F9F2C67
    Hardware Model: iPad8,3
    Process: ************* [676]
    Path: /private/var/containers/Bundle/Application/************************
    Identifier: com.********
    Version: 6.0.0 (11189)
    AppStoreTools: 14C17
    AppVariant: 1:iPad8,3:16
    Beta: YES
    Code Type: ARM-64 (Native)
    Role: Background
    Parent Process: launchd [1]
    Coalition: com.*********** [392]
    Date/Time: 2022-12-07 10:18:56.5663 +0900
    Launch Time: 2022-12-07 10:18:46.9222 +0900
    OS Version: iPhone OS 16.2 (20C5032e)
    Release Type: Beta
    Baseband Version: 5.01.00
    Report Version: 104
    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Subtype: KERN_INVALID_ADDRESS at 0x000000000000010a
    Exception Codes: 0x0000000000000001, 0x000000000000010a
    VM Region Info: 0x10a is not in any region. Bytes before following region: 68719476470
    REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
    UNUSED SPACE AT START
    --->
    commpage (reserved) 1000000000-7000000000 [384.0G] ---/--- SM=NUL ...(unallocated)
    Termination Reason: SIGNAL 11 Segmentation fault: 11
    Terminating Process: exc handler [676]
    Triggered by Thread: 0
    Thread 0 name:
    Thread 0 Crashed:
    0 UnityFramework 0x000000010f97acf4 0x10dc8c000 + 30338292
    1 UnityFramework 0x000000010f976dd8 0x10dc8c000 + 30322136
    2 UnityFramework 0x000000010f8b1c64 0x10dc8c000 + 29514852
    3 UnityFramework 0x000000010f8b19b4 0x10dc8c000 + 29514164
    4 UnityFramework 0x000000010fb14834 0x10dc8c000 + 32016436
    5 UnityFramework 0x000000010f9ec450 0x10dc8c000 + 30803024
    6 UnityFramework 0x000000010dcabe48 0x10dc8c000 + 130632
    7 UIKitCore 0x00000001a5eeb198 -[UIApplication _terminateWithStatus:] + 196 (UIApplication.m:7372)
    8 UIKitCore 0x00000001a5441c18 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 112 (_UISceneLifecycleMultiplexer.m:811)
    9 UIKitCore 0x00000001a585905c -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 164 (_UISceneLifecycleMultiplexer.m:481)
    10 UIKitCore 0x00000001a5ee75b4 -[UIApplication workspaceShouldExit:withTransitionContext:] + 176 (UIApplication.m:4088)
    11 FrontBoardServices 0x00000001b93cca38 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 72 (FBSWorkspaceScenesClient.m:332)
    12 FrontBoardServices 0x00000001b9392220 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168 (FBSWorkspace.m:359)
    13 FrontBoardServices 0x00000001b93cc9d8 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 128 (FBSWorkspaceScenesClient.m:329)
    14 libdispatch.dylib 0x00000001aa5dffdc _dispatch_client_callout + 20 (object.m:560)
    15 libdispatch.dylib 0x00000001aa5e3a5c _dispatch_block_invoke_direct + 264 (queue.c:496)
    16 FrontBoardServices 0x00000001b939c33c __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52 (FBSSerialQueue.m:157)
    17 FrontBoardServices 0x00000001b939bed8 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220 (FBSSerialQueue.m:181)
    18 FrontBoardServices 0x00000001b939e6b8 -[FBSSerialQueue _performNextFromRunLoopSource] + 28 (FBSSerialQueue.m:194)
    19 CoreFoundation 0x00000001a30b1f54 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1957)
    20 CoreFoundation 0x00000001a30be32c __CFRunLoopDoSource0 + 176 (CFRunLoop.c:2001)
    21 CoreFoundation 0x00000001a3042210 __CFRunLoopDoSources0 + 244 (CFRunLoop.c:2038)
    22 CoreFoundation 0x00000001a3057ba8 __CFRunLoopRun + 836 (CFRunLoop.c:2953)
    23 CoreFoundation 0x00000001a305ced4 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3418)
    24 GraphicsServices 0x00000001dc836368 GSEventRunModal + 164 (GSEvent.c:2196)
    25 UIKitCore 0x00000001a5553108 -[UIApplication _run] + 888 (UIApplication.m:3753)
    26 UIKitCore 0x00000001a5552d6c UIApplicationMain + 340 (UIApplication.m:5343)
    27 UnityFramework 0x000000010dcb33a0 0x10dc8c000 + 160672
    28 *********** 0x0000000102b8fde8 0x102b88000 + 32232
    29 dyld 0x00000001c2170960 start + 2528 (dyldMain.cpp:1170)
    Thread 1:
    0 libsystem_pthread.dylib 0x00000001f0626b90 start_wqthread + 0 (:-1)
    Thread 2:
    0 libsystem_pthread.dylib 0x00000001f0626b90 start_wqthread + 0 (:-1)
    Thread 3:
    0 libsystem_pthread.dylib 0x00000001f0626b90 start_wqthread + 0 (:-1)
    Thread 4:
    0 libsystem_pthread.dylib 0x00000001f0626b90 start_wqthread + 0 (:-1)
    Thread 5 name:
    Thread 5:
    0 libsystem_kernel.dylib 0x00000001e009ca64 semaphore_wait_trap + 8 (:-1)
    1 libdispatch.dylib 0x00000001aa5e0578 _dispatch_sema4_wait + 28 (lock.c:139)
    2 libdispatch.dylib 0x00000001aa5e0c2c _dispatch_semaphore_wait_slow + 132 (semaphore.c:132)
    3 UnityFramework 0x00000001101a209c 0x10dc8c000 + 38887580
    4 UnityFramework 0x000000010f54d24c 0x10dc8c000 + 25956940
    5 UnityFramework 0x000000010fc319a8 0x10dc8c000 + 33184168
    6 UnityFramework 0x000000010fc31294 0x10dc8c000 + 33182356
    7 UnityFramework 0x000000010fc027e4 0x10dc8c000 + 32991204
    8 libsystem_pthread.dylib 0x00000001f06276cc _pthread_start + 148 (pthread.c:893)
    9 libsystem_pthread.dylib 0x00000001f0626ba4 thread_start + 8 (:-1)
    Thread 6 name:
    Thread 6:
    0 libsystem_kernel.dylib 0x00000001e009cae8 mach_msg2_trap + 8 (:-1)
    1 libsystem_kernel.dylib 0x00000001e00aefe4 mach_msg2_internal + 80 (mach_msg.c:201)
    2 libsystem_kernel.dylib 0x00000001e00af224 mach_msg_overwrite + 388 (mach_msg.c:0)
    3 libsystem_kernel.dylib 0x00000001e009d02c mach_msg + 24 (mach_msg.c:323)
    4 CoreFoundation 0x00000001a3056af0 __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2622)
    5 CoreFoundation 0x00000001a3057d34 __CFRunLoopRun + 1232 (CFRunLoop.c:3005)
    6 CoreFoundation 0x00000001a305ced4 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3418)
    7 Foundation 0x000000019d44f334 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (NSRunLoop.m:373)
    8 Foundation 0x000000019d44f21c -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 (NSRunLoop.m:420)
    9 UIKitCore 0x00000001a5687f48 -[UIEventFetcher threadMain] + 436 (UIEventFetcher.m:1385)
    10 Foundation 0x000000019d468808 __NSThread__start__ + 716 (NSThread.m:963)
    11 libsystem_pthread.dylib 0x00000001f06276cc _pthread_start + 148 (pthread.c:893)
    12 libsystem_pthread.dylib 0x00000001f0626ba4 thread_start + 8 (:-1)
    Thread 7 name:
    Thread 7:
    0 libsystem_kernel.dylib 0x00000001e009cae8 mach_msg2_trap + 8 (:-1)
    1 libsystem_kernel.dylib 0x00000001e00aefe4 mach_msg2_internal + 80 (mach_msg.c:201)
    2 libsystem_kernel.dylib 0x00000001e00af224 mach_msg_overwrite + 388 (mach_msg.c:0)
    3 libsystem_kernel.dylib 0x00000001e009d02c mach_msg + 24 (mach_msg.c:323)
    4 CoreFoundation 0x00000001a3056af0 __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2622)
    5 CoreFoundation 0x00000001a3057d34 __CFRunLoopRun + 1232 (CFRunLoop.c:3005)
    6 CoreFoundation 0x00000001a305ced4 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3418)
    7 CoreFoundation 0x00000001a30a0d04 CFRunLoopRun + 64 (CFRunLoop.c:3444)
    8 CoreMotion 0x00000001ae6bea18 CLMotionCore::runMotionThread(void*) + 1208 (CLMotionCore.mm:376)
    9 libsystem_pthread.dylib 0x00000001f06276cc _pthread_start + 148 (pthread.c:893)
    10 libsystem_pthread.dylib 0x00000001f0626ba4 thread_start + 8 (:-1)
    Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000 x1: 0x000000016d276118 x2: 0x0000000000000010 x3: 0x0000000000000000
    x4: 0x00000000000000a2 x5: 0x00000001358131e0 x6: 0x00000000000002c4 x7: 0x0000000000000000
    x8: 0x0000000282373910 x9: 0x0000000000000000 x10: 0x0000000000000000 x11: 0x0000000000000001
    x12: 0x000000003a05e843 x13: 0x00000000000007fd x14: 0x000000003a25f041 x15: 0x000000003a05e843
    x16: 0x00000001f0596b28 x17: 0x000000003a200000 x18: 0x0000000000000000 x19: 0x0000000000000000
    x20: 0x0000000282373910 x21: 0x0000000000000000 x22: 0x0000000000000000 x23: 0x0000000000000001
    x24: 0x0000000000000010 x25: 0x0000000103b07e38 x26: 0x0000000000000010 x27: 0x00000000211200d5
    x28: 0x00000002838fc790 fp: 0x000000016d276170 lr: 0x000000010f97acf4
    sp: 0x000000016d276100 pc: 0x000000010f97acf4 cpsr: 0x20000000
    esr: 0x92000006 (Data Abort) byte read Translation fault
     
    Last edited: Dec 12, 2022
    TeamHoray and bugrahanakbulut like this.
  2. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    135
    I had believed this problem to be widespread, but apparently not.
    It takes a long time to create a minimum reproduction project because I have no idea what triggers it.
    If anyone knows anything about this, please comment.
     
  3. Faustob64

    Faustob64

    Joined:
    Nov 28, 2022
    Posts:
    17
    having the same problem on Unity 2022.2. My app generates a crash report with SEG FAULT on calling Application.Quit().
     
    ilmario likes this.
  4. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    135
    From my testing, this problem does not seem to occur with 2020.3.41.
     
  5. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    135
    ↑ was my mistake. in 2020.3.41, the frequency has decreased. However, it does occur.
     
  6. Bartt-Hypernova

    Bartt-Hypernova

    Joined:
    Feb 24, 2020
    Posts:
    8
    Same problem. It also happens on iOS15.

    Code (csharp):
    1. Crashed: com.apple.main-thread
    2. EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x00000000000000f2
    3.  
    4. 0  UnityFramework                 0x1b778f0 JobQueue::WaitForJobGroupID(JobGroupID, JobQueue::JobQueueWorkStealMode) + 1750 (JobQueue.cpp:1750)
    5. 1  UnityFramework                 0x1b753ec CompleteFenceInternal(JobFence&, WorkStealMode) + 17 (Jobs.cpp:17)
    6. 2  UnityFramework                 0x1b164dc AsyncUploadManager::~AsyncUploadManager() + 282 (Jobs.h:282)
    7. 3  UnityFramework                 0x1b16270 AsyncUploadManager::StaticDestroy(void*) + 203 (MemoryMacros.h:203)
    8. 4  UnityFramework                 0x1c01a94 RegisterRuntimeInitializeAndCleanup::ExecuteCleanup() + 520 (dynamic_array.h:520)
    9. 5  UnityFramework                 0x1b9a788 RuntimeCleanup() + 728 (Player.cpp:728)
    10. 6  UnityFramework                 0x11480 -[UnityAppController applicationWillTerminate:] + 526 (UnityAppController.mm:526)
    11. 7  UIKitCore                      0xf577c8 -[UIApplication _terminateWithStatus:] + 244
    12. 8  UIKitCore                      0x6359fc -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 128
    13. 9  UIKitCore                      0x82abd8 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 224
    14. 10 UIKitCore                      0xf53b44 -[UIApplication workspaceShouldExit:withTransitionContext:] + 224
    15. 11 FrontBoardServices             0x4efec __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 80
    16. 12 FrontBoardServices             0xa308 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240
    17. 13 FrontBoardServices             0x4ef84 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 132
    18. 14 libdispatch.dylib              0x3a2c _dispatch_client_callout + 20
    19. 15 libdispatch.dylib              0x74e0 _dispatch_block_invoke_direct + 264
    20. 16 FrontBoardServices             0xbc70 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48
    21. 17 FrontBoardServices             0xb040 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220
    22. 18 FrontBoardServices             0xf700 -[FBSSerialQueue _performNextFromRunLoopSource] + 28
    23. 19 CoreFoundation                 0xbbf1c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
    24. 20 CoreFoundation                 0xccc90 __CFRunLoopDoSource0 + 208
    25. 21 CoreFoundation                 0x6184 __CFRunLoopDoSources0 + 268
    26. 22 CoreFoundation                 0xbb4c __CFRunLoopRun + 828
    27. 23 CoreFoundation                 0x1f6b8 CFRunLoopRunSpecific + 600
    28. 24 GraphicsServices               0x1374 GSEventRunModal + 164
    29. 25 UIKitCore                      0x513acc -[UIApplication _run] + 1100
    30. 26 UIKitCore                      0x295970 UIApplicationMain + 364
    31. 27 UnityFramework                 0x15084 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 96 (main.mm:96)
    32. 28 Dreamdale                      0x7c00 main + 28 (main.mm:28)
    33. 29 ???                            0x102ef1ce4 (Missing)

    upload_2022-12-14_11-47-8.png
     
    Last edited: Dec 14, 2022
    kyubuns likes this.
  7. Bartt-Hypernova

    Bartt-Hypernova

    Joined:
    Feb 24, 2020
    Posts:
    8
    Any news here? Has anyone already tried Unity 2020.3.43?
     
  8. sia-dark

    sia-dark

    Joined:
    Feb 28, 2015
    Posts:
    3
    same issue here. happens in most iOS devices after minimizing and closing the app from the tray. upgrading from unity 2019.4.31 to unity 2020.3.42

    update:
    problem seems to go away after downgrading to 2020.3.41
     
    Last edited: Dec 31, 2022
  9. TeamHoray

    TeamHoray

    Joined:
    Dec 21, 2015
    Posts:
    7
    2020.3.43 also has the issue.
    (Upgrading 2020.3.25 to 2020.3.43)
     
  10. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    135
    I do not think this problem is recognized by Unity.
    I sent them a bug report, but I was a bit too busy to make a minimal reproduction project and closed it by them.
    If anyone has a minimum reproduction project, I would appreciate it if you could send a bug report to Unity.
     
  11. noasoso

    noasoso

    Joined:
    Nov 29, 2022
    Posts:
    3
    same issue . (Upgrading from 2020.3.3 to 2020.3.42)
     
  12. SeyeonSoft

    SeyeonSoft

    Joined:
    Nov 30, 2013
    Posts:
    1
    When I call Application.Quit() on iOS, I always get a fatal error exception in 2020.3.43

    So I downgraded to 2020.3.41
     
    noasoso likes this.
  13. noasoso

    noasoso

    Joined:
    Nov 29, 2022
    Posts:
    3
    Can it only be solved by downgrading?
     
  14. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    420
    I have the same crash with 2020.3.43f1 on the app quit with Windows Standalone. Unity 2020.3.38 didn't have this issue.
     
  15. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    135
    ijemin and noasoso like this.
  16. ijemin

    ijemin

    Unity Technologies

    Joined:
    Feb 16, 2023
    Posts:
    2
    It is same issue. Fix should be released in 2020.3.45f1

    It was destruction order problem.

    Reason is when you try to exit game by calling Application.Quit()->RuntimeCleanup() Unity destroy JobSystem.

    But as you can see in that linked post, destruction process of RegisterRuntimeInitializeAndCleanup triggered bit later and RegisterRuntimeInitializeAndCleanup try to use JobSystem while JobSystem is destroyed by RuntimeCleanup().
     
    kyubuns likes this.