Search Unity

App crashing in background when downloaded from AppStore, but no crash with testflight

Discussion in 'iOS and tvOS' started by CharlesBarros, May 1, 2018.

  1. CharlesBarros

    CharlesBarros

    Joined:
    Nov 17, 2011
    Posts:
    61
    I'm having a hard time to debug a crash in our app. Our app is crashing in devices with iOS 9 and 10 when the user performs multitask and kill the app. So the issue is not that critical but it messes with our crash free statistics.

    To get the things a little harder, we are only able to reproduce this issue when the app is downloaded from App Store.

    Before I start telling about the crash, let's provide some context about the app.
    This is a native iOS app where we integrated Unity using a solution almost identical to this one: https://github.com/jiulongw/swift-unity/
    There were no issues with the Unity 2017.1, but we had to upgrade the Unity version to use the new Vuforia features. We tried many Unity versions from 2017.3.1 up to 2017.4.1f1 without lucky.

    Repro steps:
    1) Download the app from App Store
    2) Run the app
    3) Perform multitask and kill the app
    Repro rate in iOS 9 and 10 are 100%!

    It's not practical to test our builds releasing the app in AppStore, so we need to find a way to reproduce this locally.

    Things we tried:
    1) Build using xcode (debug developer schema)
    2) Build using xcode (release production schema)
    3) Upload a build to testflight and check for crash logs in the device
    4) Tried to download the app from app store and then replace with one of the xcode/testflight
    5) Tried to uninstall the app store build first and then installed the one of the xcode/testflight
    3) Repeated these steps like a trillion of times in multiple devices

    The crash logs are attached at the end of my post. But what I can't understand is how a testflgith build is different from an app store build.

    Maybe the iOS handle the app differently when downloaded from app store?

    Crashlytics pointed out these crashes as heap corruption. From the logs it rly looks like that there is something trying to free a string that was already deallocated. But if we are able to reproduce this in production, the same issue would have to happen at least in a testflight build. At this point this make no sense anymore.

    iOS 9:
    CRASH_INFO_ENTRY_0: abort() called
    CRASH_INFO_ENTRY_1: *** error for object 0x6879fb0: pointer being freed was not allocated
    Code (CSharp):
    1. # Organization: companyName
    2. # Platform: ios
    3. # Application: appName TV
    4. # Bundle Identifier: com.companyName.appName
    5. # Issue #: 55748
    6. # Issue ID: 56082027f5d3a7f76b5ee749
    7. # Session ID: 0b8e087f892a427182afc03a98b4859f_DNE_0_v2
    8. # Date: 2018-05-01T13:04:00Z
    9. # OS Version: 9.3.5 (13G36)
    10. # Device: iPad mini
    11. # RAM Free: 9%
    12. # Disk Free: 19%
    13. #0. Crashed: com.apple.main-thread
    14. 0  libsystem_kernel.dylib        0x2503ac5c __pthread_kill + 8
    15. 1  libsystem_pthread.dylib        0x250e4733 pthread_kill + 62
    16. 2  libsystem_c.dylib              0x24fcf0ad abort + 108
    17. 3  libsystem_malloc.dylib        0x25064ef7 free + 438
    18. 4  libc++.1.dylib                0x24b19809 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string() + 20
    19. 5  libsystem_c.dylib              0x24fcf9a5 __cxa_finalize_ranges + 300
    20. 6  libsystem_c.dylib              0x24f8efad exit + 12
    21. 7  UIKit                          0x299b957f -[UIApplication _terminateWithStatus:] + 578
    22. 8  UIKit                          0x29bd09bd __102-[UIApplication _handleApplicationDeactivationWithScene:shouldForceExit:transitionContext:completion:]_block_invoke2019 + 908
    23. 9  UIKit                          0x29bd34c9 _runAfterCACommitDeferredBlocks + 268
    24. 10 UIKit                          0x29bdf7db _cleanUpAfterCAFlushAndRunDeferredBlocks + 90
    25. 11 UIKit                          0x2991db1d _afterCACommitHandler + 84
    26. 12 CoreFoundation                0x253716c9 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
    27. 13 CoreFoundation                0x2536f9cd __CFRunLoopDoObservers + 280
    28. 14 CoreFoundation                0x2536fdff __CFRunLoopRun + 958
    29. 15 CoreFoundation                0x252bf229 CFRunLoopRunSpecific + 520
    30. 16 CoreFoundation                0x252bf015 CFRunLoopRunInMode + 108
    31. 17 GraphicsServices              0x268afac9 GSEventRunModal + 160
    32. 18 UIKit                          0x29993189 UIApplicationMain + 144
    33. 19 appName                      0x6e4d84 main (AppDelegate.swift:17)
    34. 20 (Missing)                      0x24f67873 (Missing)
    35. --
    36. #0. Crashed: com.apple.main-thread
    37. 0  libsystem_kernel.dylib        0x2503ac5c __pthread_kill + 8
    38. 1  libsystem_pthread.dylib        0x250e4733 pthread_kill + 62
    39. 2  libsystem_c.dylib              0x24fcf0ad abort + 108
    40. 3  libsystem_malloc.dylib        0x25064ef7 free + 438
    41. 4  libc++.1.dylib                0x24b19809 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string() + 20
    42. 5  libsystem_c.dylib              0x24fcf9a5 __cxa_finalize_ranges + 300
    43. 6  libsystem_c.dylib              0x24f8efad exit + 12
    44. 7  UIKit                          0x299b957f -[UIApplication _terminateWithStatus:] + 578
    45. 8  UIKit                          0x29bd09bd __102-[UIApplication _handleApplicationDeactivationWithScene:shouldForceExit:transitionContext:completion:]_block_invoke2019 + 908
    46. 9  UIKit                          0x29bd34c9 _runAfterCACommitDeferredBlocks + 268
    47. 10 UIKit                          0x29bdf7db _cleanUpAfterCAFlushAndRunDeferredBlocks + 90
    48. 11 UIKit                          0x2991db1d _afterCACommitHandler + 84
    49. 12 CoreFoundation                0x253716c9 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
    50. 13 CoreFoundation                0x2536f9cd __CFRunLoopDoObservers + 280
    51. 14 CoreFoundation                0x2536fdff __CFRunLoopRun + 958
    52. 15 CoreFoundation                0x252bf229 CFRunLoopRunSpecific + 520
    53. 16 CoreFoundation                0x252bf015 CFRunLoopRunInMode + 108
    54. 17 GraphicsServices              0x268afac9 GSEventRunModal + 160
    55. 18 UIKit                          0x29993189 UIApplicationMain + 144
    56. 19 appName                      0x6e4d84 main (AppDelegate.swift:17)
    57. 20 (Missing)                      0x24f67873 (Missing)
    58. #1. com.apple.libdispatch-manager
    59. 0  libsystem_kernel.dylib        0x2503c2f8 kevent_qos + 24
    60. 1  libdispatch.dylib              0x24f31d61 _dispatch_mgr_invoke + 256
    61. 2  libdispatch.dylib              0x24f31abf _dispatch_mgr_thread$VARIANT$mp + 38
    62. #2. com.twitter.crashlytics.ios.MachExceptionServer
    63. 0  libsystem_kernel.dylib        0x250268d0 mach_msg_trap + 20
    64. 1  libsystem_kernel.dylib        0x250266d5 mach_msg + 40
    65. 2  appName                      0x104a15f CLSMachExceptionServer + 17178975
    66. 3  libsystem_pthread.dylib        0x250e385b _pthread_body + 138
    67. 4  libsystem_pthread.dylib        0x250e37cf _pthread_start + 110
    68. 5  libsystem_pthread.dylib        0x250e1724 thread_start + 8
    69. #3. com.apple.NSURLConnectionLoader
    70. 0  libsystem_kernel.dylib        0x250268d0 mach_msg_trap + 20
    71. 1  libsystem_kernel.dylib        0x250266d5 mach_msg + 40
    72. 2  CoreFoundation                0x25371ac5 __CFRunLoopServiceMachPort + 136
    73. 3  CoreFoundation                0x2536fe4d __CFRunLoopRun + 1036
    74. 4  CoreFoundation                0x252bf229 CFRunLoopRunSpecific + 520
    75. 5  CoreFoundation                0x252bf015 CFRunLoopRunInMode + 108
    76. 6  CFNetwork                      0x259109f7 +[NSURLConnection(Loader) _resourceLoadLoop:] + 486
    77. 7  Foundation                    0x25bd94a5 __NSThread__start__ + 1148
    78. 8  libsystem_pthread.dylib        0x250e385b _pthread_body + 138
    79. 9  libsystem_pthread.dylib        0x250e37cf _pthread_start + 110
    80. 10 libsystem_pthread.dylib        0x250e1724 thread_start + 8
    81. #4. AVAudioSession Notify Thread
    82. 0  libsystem_kernel.dylib        0x250268d0 mach_msg_trap + 20
    83. 1  libsystem_kernel.dylib        0x250266d5 mach_msg + 40
    84. 2  CoreFoundation                0x25371ac5 __CFRunLoopServiceMachPort + 136
    85. 3  CoreFoundation                0x2536fe4d __CFRunLoopRun + 1036
    86. 4  CoreFoundation                0x252bf229 CFRunLoopRunSpecific + 520
    87. 5  CoreFoundation                0x252bf015 CFRunLoopRunInMode + 108
    88. 6  libAVFAudio.dylib              0x2ac7e225 GenericRunLoopThread::Entry(void*) + 132
    89. 7  libAVFAudio.dylib              0x2ac53177 CAPThread::Entry(CAPThread*) + 154
    90. 8  libsystem_pthread.dylib        0x250e385b _pthread_body + 138
    91. 9  libsystem_pthread.dylib        0x250e37cf _pthread_start + 110
    92. 10 libsystem_pthread.dylib        0x250e1724 thread_start + 8
    93. #5. KWIAFNetworking
    94. 0  libsystem_kernel.dylib        0x250268d0 mach_msg_trap + 20
    95. 1  libsystem_kernel.dylib        0x250266d5 mach_msg + 40
    96. 2  CoreFoundation                0x25371ac5 __CFRunLoopServiceMachPort + 136
    97. 3  CoreFoundation                0x2536fe4d __CFRunLoopRun + 1036
    98. 4  CoreFoundation                0x252bf229 CFRunLoopRunSpecific + 520
    99. 5  CoreFoundation                0x252bf015 CFRunLoopRunInMode + 108
    100. 6  Foundation                    0x25b08045 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 268
    101. 7  Foundation                    0x25b56a4d -[NSRunLoop(NSRunLoop) run] + 80
    102. 8  appName                      0xece02b +[KWIAFURLConnectionOperation networkRequestThreadEntryPoint:] (KWIAFURLConnectionOperation.m:160)
    103. 9  Foundation                    0x25bd94a5 __NSThread__start__ + 1148
    104. 10 libsystem_pthread.dylib        0x250e385b _pthread_body + 138
    105. 11 libsystem_pthread.dylib        0x250e37cf _pthread_start + 110
    106. 12 libsystem_pthread.dylib        0x250e1724 thread_start + 8
    107. #6. com.apple.CoreMotion.MotionThread
    108. 0  libsystem_kernel.dylib        0x250268d0 mach_msg_trap + 20
    109. 1  libsystem_kernel.dylib        0x250266d5 mach_msg + 40
    110. 2  CoreFoundation                0x25371ac5 __CFRunLoopServiceMachPort + 136
    111. 3  CoreFoundation                0x2536fe4d __CFRunLoopRun + 1036
    112. 4  CoreFoundation                0x252bf229 CFRunLoopRunSpecific + 520
    113. 5  CoreFoundation                0x252ffdd3 CFRunLoopRun + 98
    114. 6  CoreMotion                    0x2a5c5db9 (null) + 71113
    115. 7  libsystem_pthread.dylib        0x250e385b _pthread_body + 138
    116. 8  libsystem_pthread.dylib        0x250e37cf _pthread_start + 110
    117. 9  libsystem_pthread.dylib        0x250e1724 thread_start + 8
    118. #7. com.apple.coreaudio.AQClient
    119. 0  libsystem_kernel.dylib        0x250268d0 mach_msg_trap + 20
    120. 1  libsystem_kernel.dylib        0x250266d5 mach_msg + 40
    121. 2  CoreFoundation                0x25371ac5 __CFRunLoopServiceMachPort + 136
    122. 3  CoreFoundation                0x2536fe4d __CFRunLoopRun + 1036
    123. 4  CoreFoundation                0x252bf229 CFRunLoopRunSpecific + 520
    124. 5  CoreFoundation                0x252bf015 CFRunLoopRunInMode + 108
    125. 6  AudioToolbox                  0x2772f675 GenericRunLoopThread::Entry(void*) + 132
    126. 7  AudioToolbox                  0x277185af CAPThread::Entry(CAPThread*) + 186
    127. 8  libsystem_pthread.dylib        0x250e385b _pthread_body + 138
    128. 9  libsystem_pthread.dylib        0x250e37cf _pthread_start + 110
    129. 10 libsystem_pthread.dylib        0x250e1724 thread_start + 8
    130. #8. Thread
    131. 0  libsystem_kernel.dylib        0x2503b864 __workq_kernreturn + 8
    132. 1  libsystem_pthread.dylib        0x250e1b35 _pthread_wqthread + 1036
    133. 2  libsystem_pthread.dylib        0x250e1718 start_wqthread + 8
    134. #9. com.hackemist.SDWebImageCache
    135. 0  libsystem_kernel.dylib        0x25026a00 syscall_thread_switch + 8
    136. 1  libsystem_platform.dylib      0x250dd75f _os_lock_handoff_lock_slow + 78
    137. 2  libsystem_malloc.dylib        0x2506296d szone_malloc_should_clear + 60
    138. 3  libsystem_malloc.dylib        0x250628fb malloc_zone_malloc + 90
    139. 4  CoreFoundation                0x252b91c1 _CFRuntimeCreateInstance + 236
    140. 5  CoreFoundation                0x2537fa19 __CFStringCreateImmutableFunnel3 + 1532
    141. 6  CoreFoundation                0x252ba78b CFStringCreateWithBytes + 50
    142. 7  CoreFoundation                0x252e6cf3 CreateStringFromFileSystemRepresentationByAddingPercentEscapes + 526
    143. 8  CoreFoundation                0x2538e771 _CFURLCreateWithFileSystemRepresentation + 184
    144. 9  CoreFoundation                0x252e8d63 CFURLCreateFromFileSystemRepresentation + 18
    145. 10 CoreServicesInternal          0x35d02b09 _FSURLCreateWithPathAndAttributes + 288
    146. 11 CoreServicesInternal          0x35d0b057 _GetDirectoryURLs(_CFURLEnumerator*) + 522
    147. 12 CoreServicesInternal          0x35d0a88b _URLEnumeratorGetNextURL + 94
    148. 13 Foundation                    0x25b7286d -[NSURLDirectoryEnumerator nextObject] + 52
    149. 14 CoreFoundation                0x252e401b -[NSEnumerator countByEnumeratingWithState:objects:count:] + 50
    150. 15 appName                      0xfd30a5 __45-[SDImageCache cleanDiskWithCompletionBlock:]_block_invoke (SDImageCache.m:549)
    151. 16 libdispatch.dylib              0x24f1d823 _dispatch_call_block_and_release + 10
    152. 17 libdispatch.dylib              0x24f2a423 _dispatch_queue_drain$VARIANT$mp + 1758
    153. 18 libdispatch.dylib              0x24f29a61 _dispatch_queue_invoke$VARIANT$mp + 284
    154. 19 libdispatch.dylib              0x24f2c5e9 _dispatch_root_queue_drain + 1560
    155. 20 libdispatch.dylib              0x24f2bfcd _dispatch_worker_thread3 + 96
    156. 21 libsystem_pthread.dylib        0x250e1b29 _pthread_wqthread + 1024
    157. 22 libsystem_pthread.dylib        0x250e1718 start_wqthread + 8
    158. #10. Thread
    159. 0  libsystem_kernel.dylib        0x2503b864 __workq_kernreturn + 8
    160. 1  libsystem_pthread.dylib        0x250e1b35 _pthread_wqthread + 1036
    161. 2  libsystem_pthread.dylib        0x250e1718 start_wqthread + 8
    162. #11. Thread
    163. 0  libsystem_kernel.dylib        0x2503b864 __workq_kernreturn + 8
    164. 1  libsystem_pthread.dylib        0x250e1b35 _pthread_wqthread + 1036
    165. 2  libsystem_pthread.dylib        0x250e1718 start_wqthread + 8
    166. #12. Thread
    167. 0  libsystem_kernel.dylib        0x2503b864 __workq_kernreturn + 8
    168. 1  libsystem_pthread.dylib        0x250e1b35 _pthread_wqthread + 1036
    169. 2  libsystem_pthread.dylib        0x250e1718 start_wqthread + 8
    170. #13. Thread
    171. 0  libsystem_kernel.dylib        0x2503b864 __workq_kernreturn + 8
    172. 1  libsystem_pthread.dylib        0x250e1b35 _pthread_wqthread + 1036
    173. 2  libsystem_pthread.dylib        0x250e1718 start_wqthread + 8
    174. #14. Thread
    175. 0  libsystem_kernel.dylib        0x2503b864 __workq_kernreturn + 8
    176. 1  libsystem_pthread.dylib        0x250e1b35 _pthread_wqthread + 1036
    177. 2  libsystem_pthread.dylib        0x250e1718 start_wqthread + 8
    178. #15. Thread
    179. 0  libsystem_kernel.dylib        0x2503b864 __workq_kernreturn + 8
    180. 1  libsystem_pthread.dylib        0x250e1b35 _pthread_wqthread + 1036
    181. 2  libsystem_pthread.dylib        0x250e1718 start_wqthread + 8



    iOS 10:
    CRASH_INFO_ENTRY_0: abort() called
    CRASH_INFO_ENTRY_1: *** error for object 0x660bfb0: pointer being freed was not allocated
    Code (CSharp):
    1. # Organization: companyName
    2. # Platform: ios
    3. # Application: appName TV
    4. # Version: 4.6.12 (398)
    5. # Bundle Identifier: com.companyName.appName
    6. # Issue #: 87471
    7. # Issue ID: 59138cb1be077a4dcc8e0076
    8. # Session ID: 9709cee5807e469db13ff5273444233c_DNE_0_v2
    9. # Date: 2018-05-01T13:16:00Z
    10. # OS Version: 10.3.3 (14G60)
    11. # Device: iPhone 5
    12. # RAM Free: 23.2%
    13. # Disk Free: 7.7%
    14. #0. Crashed: com.apple.main-thread
    15. 0  libsystem_kernel.dylib        0x1af29acc __pthread_kill + 8
    16. 1  libsystem_pthread.dylib        0x1afe2087 pthread_kill + 62
    17. 2  libsystem_c.dylib              0x1aebe95b abort + 108
    18. 3  libsystem_malloc.dylib        0x1af630e5 free + 578
    19. 4  libc++.1.dylib                0x1a9b1285 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string() + 20
    20. 5  libsystem_c.dylib              0x1aebf20d __cxa_finalize_ranges + 290
    21. 6  libsystem_c.dylib              0x1ae7e1b3 exit + 12
    22. 7  UIKit                          0x20a15c77 +[_UIAlertManager hideAlertsForTermination] + 564
    23. 8  UIKit                          0x20c098b5 __102-[UIApplication _handleApplicationDeactivationWithScene:shouldForceExit:transitionContext:completion:]_block_invoke.2095 + 924
    24. 9  UIKit                          0x20c0c983 _runAfterCACommitDeferredBlocks + 276
    25. 10 UIKit                          0x20bffc93 _cleanUpAfterCAFlushAndRunDeferredBlocks + 524
    26. 11 UIKit                          0x209818bd _afterCACommitHandler + 112
    27. 12 CoreFoundation                0x1b717803 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
    28. 13 CoreFoundation                0x1b715a55 __CFRunLoopDoObservers + 282
    29. 14 CoreFoundation                0x1b716017 __CFRunLoopRun + 1358
    30. 15 CoreFoundation                0x1b6691af CFRunLoopRunSpecific + 470
    31. 16 CoreFoundation                0x1b668fd1 CFRunLoopRunInMode + 104
    32. 17 GraphicsServices              0x1ce13b41 GSEventRunModal + 80
    33. 18 UIKit                          0x209f1a53 UIApplicationMain + 150
    34. 19 appName                      0x5c8704 main (main.swift:23)
    35. 20 libdyld.dylib                  0x1ae564eb start + 2
    36. --
    37. #0. Crashed: com.apple.main-thread
    38. 0  libsystem_kernel.dylib        0x1af29acc __pthread_kill + 8
    39. 1  libsystem_pthread.dylib        0x1afe2087 pthread_kill + 62
    40. 2  libsystem_c.dylib              0x1aebe95b abort + 108
    41. 3  libsystem_malloc.dylib        0x1af630e5 free + 578
    42. 4  libc++.1.dylib                0x1a9b1285 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string() + 20
    43. 5  libsystem_c.dylib              0x1aebf20d __cxa_finalize_ranges + 290
    44. 6  libsystem_c.dylib              0x1ae7e1b3 exit + 12
    45. 7  UIKit                          0x20a15c77 +[_UIAlertManager hideAlertsForTermination] + 564
    46. 8  UIKit                          0x20c098b5 __102-[UIApplication _handleApplicationDeactivationWithScene:shouldForceExit:transitionContext:completion:]_block_invoke.2095 + 924
    47. 9  UIKit                          0x20c0c983 _runAfterCACommitDeferredBlocks + 276
    48. 10 UIKit                          0x20bffc93 _cleanUpAfterCAFlushAndRunDeferredBlocks + 524
    49. 11 UIKit                          0x209818bd _afterCACommitHandler + 112
    50. 12 CoreFoundation                0x1b717803 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
    51. 13 CoreFoundation                0x1b715a55 __CFRunLoopDoObservers + 282
    52. 14 CoreFoundation                0x1b716017 __CFRunLoopRun + 1358
    53. 15 CoreFoundation                0x1b6691af CFRunLoopRunSpecific + 470
    54. 16 CoreFoundation                0x1b668fd1 CFRunLoopRunInMode + 104
    55. 17 GraphicsServices              0x1ce13b41 GSEventRunModal + 80
    56. 18 UIKit                          0x209f1a53 UIApplicationMain + 150
    57. 19 appName                      0x5c8704 main (main.swift:23)
    58. 20 libdyld.dylib                  0x1ae564eb start + 2
    59. #1. fmdb.<KWIFMDatabaseQueue: 0x1669c570>
    60. 0  libsystem_kernel.dylib        0x1af162fc fsync + 8
    61. 1  libsqlite3.dylib              0x1bc02cd1 (null) + 44054
    62. 2  libsqlite3.dylib              0x1bc0b29b (null) + 2170
    63. 3  libsqlite3.dylib              0x1bc027fd (null) + 42818
    64. 4  libsqlite3.dylib              0x1bbf3eb7 (null) + 16492
    65. 5  libsqlite3.dylib              0x1bbcd8fb (null) + 2524
    66. 6  libsqlite3.dylib              0x1bbeee17 (null) + 51750
    67. 7  libsqlite3.dylib              0x1bbe25ab sqlite3_step + 442
    68. 8  appName                      0xd50f27 -[KWIFMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] (KWIFMDatabase.m:1042)
    69. 9  appName                      0xd511e7 -[KWIFMDatabase executeUpdate:withParameterDictionary:] (KWIFMDatabase.m:1122)
    70. 10 appName                      0xd49ad7 __51-[KWIKeyValueDatabase setObject:forKeyedSubscript:]_block_invoke (KWIDatabase.m:108)
    71. 11 appName                      0xd53cc7 __33-[KWIFMDatabaseQueue inDatabase:]_block_invoke (KWIFMDatabaseQueue.m:153)
    72. 12 libdispatch.dylib              0x1ae29783 _dispatch_client_callout + 22
    73. 13 libdispatch.dylib              0x1ae35a35 _dispatch_barrier_sync_f_invoke + 50
    74. 14 appName                      0xd53c5b -[KWIFMDatabaseQueue inDatabase:] (KWIFMDatabaseQueue.m:167)
    75. 15 appName                      0xd499e7 -[KWIKeyValueDatabase setObject:forKeyedSubscript:] (KWIDatabase.m:103)
    76. 16 appName                      0xd4dbf5 -[KWIEventHandler retrieveNewEventPersistentSequentialID] (KWIEventHandler.m:54)
    77. 17 appName                      0xd7be37 -[PrivateKiwi(Events) registerEvent:parameters:] (PrivateKiwi+Events.m:27)
    78. 18 appName                      0xd3071b +[Kiwi(Events) registerEvent:parameters:] (Kiwi+Events.m:19)
    79. 19 appName                      0x863e74 KiwiProviderappNameAnalyticsProvider (KiwiProvider.swift:22)
    80. 20 appName                      0x7b3ac8 partial apply for static Analytics.(logEvent(AnalyticsEvent) -> ()).(closure #1) (Analytics.swift:26)
    81. 21 appName                      0x7b3b0c partial apply for static Analytics.(executeBlockForProvider(AnalyticsProvider, block : () -> ()) -> ()).(closure #1) (Analytics.swift:95)
    82. 22 appName                      0x8d415c thunk (NavigationEventDispatcher.swift)
    83. 23 libdispatch.dylib              0x1ae29797 _dispatch_call_block_and_release + 10
    84. 24 libdispatch.dylib              0x1ae382db _dispatch_root_queue_drain + 620
    85. 25 libdispatch.dylib              0x1ae3800f _dispatch_worker_thread3 + 106
    86. 26 libsystem_pthread.dylib        0x1afde87d _pthread_wqthread + 1040
    87. 27 libsystem_pthread.dylib        0x1afde45c start_wqthread + 8
    88. #2. Thread
    89. 0  libsystem_kernel.dylib        0x1af2a73c __workq_kernreturn + 8
    90. 1  libsystem_pthread.dylib        0x1afde8eb _pthread_wqthread + 1150
    91. 2  libsystem_pthread.dylib        0x1afde45c start_wqthread + 8
    92. #3. com.apple.root.background-qos
    93. 0  libsystem_kernel.dylib        0x1af29878 __psynch_mutexwait + 24
    94. 1  libsystem_pthread.dylib        0x1afe34ad _pthread_mutex_lock_wait + 74
    95. 2  libsystem_pthread.dylib        0x1afe3675 _pthread_mutex_lock_slow + 256
    96. 3  libobjc.A.dylib                0x1a9ed8cd recursive_mutex_tt<false>::lock() + 8
    97. 4  libobjc.A.dylib                0x1a9f054b objc_sync_enter + 18
    98. 5  appName                      0xd4daf1 -[KWIEventHandler retrieveNewEventPersistentSequentialID] (KWIEventHandler.m:52)
    99. 6  appName                      0xd7be37 -[PrivateKiwi(Events) registerEvent:parameters:] (PrivateKiwi+Events.m:27)
    100. 7  appName                      0xd3071b +[Kiwi(Events) registerEvent:parameters:] (Kiwi+Events.m:19)
    101. 8  appName                      0x863e74 KiwiProviderappNameAnalyticsProvider (KiwiProvider.swift:22)
    102. 9  appName                      0x7b3ac8 partial apply for static Analytics.(logEvent(AnalyticsEvent) -> ()).(closure #1) (Analytics.swift:26)
    103. 10 appName                      0x7b3b0c partial apply for static Analytics.(executeBlockForProvider(AnalyticsProvider, block : () -> ()) -> ()).(closure #1) (Analytics.swift:95)
    104. 11 appName                      0x8d415c thunk (NavigationEventDispatcher.swift)
    105. 12 libdispatch.dylib              0x1ae29797 _dispatch_call_block_and_release + 10
    106. 13 libdispatch.dylib              0x1ae382db _dispatch_root_queue_drain + 620
    107. 14 libdispatch.dylib              0x1ae3800f _dispatch_worker_thread3 + 106
    108. 15 libsystem_pthread.dylib        0x1afde87d _pthread_wqthread + 1040
    109. 16 libsystem_pthread.dylib        0x1afde45c start_wqthread + 8
    110. #4. com.apple.uikit.eventfetch-thread
    111. 0  libsystem_kernel.dylib        0x1af14900 mach_msg_trap + 20
    112. 1  libsystem_kernel.dylib        0x1af146e1 mach_msg + 44
    113. 2  CoreFoundation                0x1b717be3 __CFRunLoopServiceMachPort + 144
    114. 3  CoreFoundation                0x1b716065 __CFRunLoopRun + 1436
    115. 4  CoreFoundation                0x1b6691af CFRunLoopRunSpecific + 470
    116. 5  CoreFoundation                0x1b668fd1 CFRunLoopRunInMode + 104
    117. 6  Foundation                    0x1bfbdaf5 <redacted> + 258
    118. 7  Foundation                    0x1bfda76d <redacted> + 86
    119. 8  UIKit                          0x212f2ad9 -[UIEventFetcher threadMain] + 128
    120. 9  Foundation                    0x1c0a18eb <redacted> + 1122
    121. 10 libsystem_pthread.dylib        0x1afe093b _pthread_body + 216
    122. 11 libsystem_pthread.dylib        0x1afe085d _pthread_start + 234
    123. 12 libsystem_pthread.dylib        0x1afde468 thread_start + 8
    124. #5. com.appName.SpinePreloadStartupOperation
    125. 0  libobjc.A.dylib                0x1a9fcf12 objc_object::sidetable_retain() + 117
    126. 1  libobjc.A.dylib                0x1a9fe8a9 objc::DenseMapBase<objc::DenseMap<DisguisedPtr<objc_object>, unsigned long, true, objc::DenseMapInfo<DisguisedPtr<objc_object> > >, DisguisedPtr<objc_object>, unsigned long, objc::DenseMapInfo<DisguisedPtr<objc_object> >, true>::FindAndConstruct(DisguisedPtr<objc_object> const&) + 16
    127. 2  libswiftFoundation.dylib      0x484a7a4 specialized _arrayConditionalCast<A, B>(_:) + 62428
    128. 3  libswiftFoundation.dylib      0x484aab8 specialized static Array._conditionallyBridgeFromObjectiveC(_:result:) + 63216
    129. 4  libswiftFoundation.dylib      0x4786bd4 static Array._conditionallyBridgeFromObjectiveC(_:result:) + 26588
    130. 5  libswiftCore.dylib            0x452a285 _dynamicCastClassToValueViaObjCBridgeable(swift::OpaqueValue*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*, (anonymous namespace)::_ObjectiveCBridgeableWitnessTable const*, swift::DynamicCastFlags) + 184
    131. 6  libswiftCore.dylib            0x4529613 swift_dynamicCast + 2246
    132. 7  libswiftCore.dylib            0x4529047 swift_dynamicCast + 762
    133. 8  SpineKit                      0x3c9ae44 __swift_memcpy64_8 + 1464
    134. 9  SpineKit                      0x3c43c34 __swift_memmove_array32_8 + 4124
    135. 10 SpineKit                      0x3c5bea8 swift_rt_swift_isUniquelyReferenced_nonNull_native + 11192
    136. 11 SpineKit                      0x3c5c198 swift_rt_swift_isUniquelyReferenced_nonNull_native + 11944
    137. 12 SpineKit                      0x3ca4c60 swift_rt_swift_retain + 15328
    138. 13 SpineKit                      0x3ca5bac swift_rt_swift_retain + 19244
    139. 14 SpineKit                      0x3c8a94c globalinit_33_1E1907A979A7C49ABC5726F24B42723D_func4 + 5172
    140. 15 SpineKit                      0x3c6a958 swift_rt_swift_storeEnumTagSinglePayload + 1108
    141. 16 appName                      0x701d38 SpinePreloadStartupOperationexecute empty-list Scheduler first-element-marker SchedulerEventevent empty-list  (SpinePreloadStartupOperation.swift:98)
    142. 17 appName                      0x700d60 SpinePreloadStartupOperationexecute empty-list Scheduler first-element-marker SchedulerEventevent empty-list  (SpinePreloadStartupOperation.swift)
    143. 18 appName                      0x8d415c thunk (NavigationEventDispatcher.swift)
    144. 19 libdispatch.dylib              0x1ae29797 _dispatch_call_block_and_release + 10
    145. 20 libdispatch.dylib              0x1ae35155 _dispatch_continuation_pop + 384
    146. 21 libdispatch.dylib              0x1ae34f0f _dispatch_async_redirect_invoke + 548
    147. 22 libdispatch.dylib              0x1ae381b5 _dispatch_root_queue_drain + 326
    148. 23 libdispatch.dylib              0x1ae3800f _dispatch_worker_thread3 + 106
    149. 24 libsystem_pthread.dylib        0x1afde87d _pthread_wqthread + 1040
    150. 25 libsystem_pthread.dylib        0x1afde45c start_wqthread + 8
    151. #6. com.hackemist.SDWebImageCache
    152. 0  libsystem_kernel.dylib        0x1af28a20 __getattrlist + 20
    153. 1  CoreServicesInternal          0x2f1f3f63 corePropertyProviderPrepareValues(__CFURL const*, __FileCache*, __CFString const* const*, void const**, long, void const*, __CFError**) + 468
    154. 2  CoreServicesInternal          0x2f1ee56d prepareValuesForBitmap(__CFURL const*, __FileCache*, _FilePropertyBitmap*, __CFError**) + 244
    155. 3  CoreServicesInternal          0x2f1ece03 _FSURLCopyResourcePropertiesForKeysInternal(__CFURL const*, __CFArray const*, void*, __CFError**, unsigned char) + 566
    156. 4  CoreServicesInternal          0x2f1ecbc9 _FSURLCopyResourcePropertiesForKeys + 18
    157. 5  CoreFoundation                0x1b7375f7 CFURLCopyResourcePropertiesForKeys + 220
    158. 6  CoreFoundation                0x1b789659 -[NSURL resourceValuesForKeys:error:] + 170
    159. 7  appName                      0xe3474b __45-[SDImageCache cleanDiskWithCompletionBlock:]_block_invoke (SDImageCache.m:531)
    160. 8  libdispatch.dylib              0x1ae29797 _dispatch_call_block_and_release + 10
    161. 9  libdispatch.dylib              0x1ae3659d _dispatch_queue_serial_drain + 854
    162. 10 libdispatch.dylib              0x1ae2cb71 _dispatch_queue_invoke + 886
    163. 11 libdispatch.dylib              0x1ae36a1f _dispatch_queue_override_invoke + 282
    164. 12 libdispatch.dylib              0x1ae381b5 _dispatch_root_queue_drain + 326
    165. 13 libdispatch.dylib              0x1ae3800f _dispatch_worker_thread3 + 106
    166. 14 libsystem_pthread.dylib        0x1afde87d _pthread_wqthread + 1040
    167. 15 libsystem_pthread.dylib        0x1afde45c start_wqthread + 8
    168. #7. com.twitter.crashlytics.ios.MachExceptionServer
    169. 0  libsystem_kernel.dylib        0x1af14900 mach_msg_trap + 20
    170. 1  libsystem_kernel.dylib        0x1af146e1 mach_msg + 44
    171. 2  appName                      0xe9be8f CLSMachExceptionServer + 15576719
    172. 3  libsystem_pthread.dylib        0x1afe093b _pthread_body + 216
    173. 4  libsystem_pthread.dylib        0x1afe085d _pthread_start + 234
    174. 5  libsystem_pthread.dylib        0x1afde468 thread_start + 8
    175. #8. Thread
    176. 0  libsystem_pthread.dylib        0x1afde454 start_wqthread + 83
    177. #9. Thread
    178. 0  libsystem_kernel.dylib        0x1af2a73c __workq_kernreturn + 8
    179. 1  libsystem_pthread.dylib        0x1afde8eb _pthread_wqthread + 1150
    180. 2  libsystem_pthread.dylib        0x1afde45c start_wqthread + 8
    181. #10. Thread
    182. 0  libsystem_kernel.dylib        0x1af2a73c __workq_kernreturn + 8
    183. 1  libsystem_pthread.dylib        0x1afde8eb _pthread_wqthread + 1150
    184. 2  libsystem_pthread.dylib        0x1afde45c start_wqthread + 8
    185. #11. com.apple.NSURLConnectionLoader
    186. 0  libsystem_kernel.dylib        0x1af14900 mach_msg_trap + 20
    187. 1  libsystem_kernel.dylib        0x1af146e1 mach_msg + 44
    188. 2  CoreFoundation                0x1b717be3 __CFRunLoopServiceMachPort + 144
    189. 3  CoreFoundation                0x1b716065 __CFRunLoopRun + 1436
    190. 4  CoreFoundation                0x1b6691af CFRunLoopRunSpecific + 470
    191. 5  CoreFoundation                0x1b668fd1 CFRunLoopRunInMode + 104
    192. 6  CFNetwork                      0x1bd46393 +[NSURLConnection(Loader) _resourceLoadLoop:] + 402
    193. 7  Foundation                    0x1c0a18eb <redacted> + 1122
    194. 8  libsystem_pthread.dylib        0x1afe093b _pthread_body + 216
    195. 9  libsystem_pthread.dylib        0x1afe085d _pthread_start + 234
    196. 10 libsystem_pthread.dylib        0x1afde468 thread_start + 8
    197. #12. Thread
    198. 0  libsystem_kernel.dylib        0x1af2a73c __workq_kernreturn + 8
    199. 1  libsystem_pthread.dylib        0x1afde8eb _pthread_wqthread + 1150
    200. 2  libsystem_pthread.dylib        0x1afde45c start_wqthread + 8
    201. #13. io.answers.EventQueue :: NSOperation 0x165f1ad0 (QOS: BACKGROUND)
    202. 0  libsystem_kernel.dylib        0x1af28568 __bsdthread_ctl + 12
    203. 1  libsystem_pthread.dylib        0x1afe430b pthread_override_qos_class_end_np + 66
    204. 2  Foundation                    0x1c083e13 <redacted> + 408
    205. 3  libdispatch.dylib              0x1ae3659d _dispatch_queue_serial_drain + 854
    206. 4  libdispatch.dylib              0x1ae2cb71 _dispatch_queue_invoke + 886
    207. 5  libdispatch.dylib              0x1ae381b5 _dispatch_root_queue_drain + 326
    208. 6  libdispatch.dylib              0x1ae3800f _dispatch_worker_thread3 + 106
    209. 7  libsystem_pthread.dylib        0x1afde87d _pthread_wqthread + 1040
    210. 8  libsystem_pthread.dylib        0x1afde45c start_wqthread + 8
    211. #14. Thread
    212. 0  libsystem_kernel.dylib        0x1af2a73c __workq_kernreturn + 8
    213. 1  libsystem_pthread.dylib        0x1afde8eb _pthread_wqthread + 1150
    214. 2  libsystem_pthread.dylib        0x1afde45c start_wqthread + 8
    215. #15. AVAudioSession Notify Thread
    216. 0  libsystem_kernel.dylib        0x1af14900 mach_msg_trap + 20
    217. 1  libsystem_kernel.dylib        0x1af146e1 mach_msg + 44
    218. 2  CoreFoundation                0x1b717be3 __CFRunLoopServiceMachPort + 144
    219. 3  CoreFoundation                0x1b716065 __CFRunLoopRun + 1436
    220. 4  CoreFoundation                0x1b6691af CFRunLoopRunSpecific + 470
    221. 5  CoreFoundation                0x1b668fd1 CFRunLoopRunInMode + 104
    222. 6  AVFAudio                      0x3227a82f GenericRunLoopThread::Entry(void*) + 142
    223. 7  AVFAudio                      0x322a358f CAPThread::Entry(CAPThread*) + 154
    224. 8  libsystem_pthread.dylib        0x1afe093b _pthread_body + 216
    225. 9  libsystem_pthread.dylib        0x1afe085d _pthread_start + 234
    226. 10 libsystem_pthread.dylib        0x1afde468 thread_start + 8
    227. #16. KWIAFNetworking
    228. 0  libsystem_kernel.dylib        0x1af14900 mach_msg_trap + 20
    229. 1  libsystem_kernel.dylib        0x1af146e1 mach_msg + 44
    230. 2  CoreFoundation                0x1b717be3 __CFRunLoopServiceMachPort + 144
    231. 3  CoreFoundation                0x1b716065 __CFRunLoopRun + 1436
    232. 4  CoreFoundation                0x1b6691af CFRunLoopRunSpecific + 470
    233. 5  CoreFoundation                0x1b668fd1 CFRunLoopRunInMode + 104
    234. 6  Foundation                    0x1bfbdaf5 <redacted> + 258
    235. 7  Foundation                    0x1c00adb9 <redacted> + 80
    236. 8  appName                      0xd3aa9f +[KWIAFURLConnectionOperation networkRequestThreadEntryPoint:] (KWIAFURLConnectionOperation.m:160)
    237. 9  Foundation                    0x1c0a18eb <redacted> + 1122
    238. 10 libsystem_pthread.dylib        0x1afe093b _pthread_body + 216
    239. 11 libsystem_pthread.dylib        0x1afe085d _pthread_start + 234
    240. 12 libsystem_pthread.dylib        0x1afde468 thread_start + 8
    241. #17. com.apple.CoreMotion.MotionThread
    242. 0  libsystem_kernel.dylib        0x1af14900 mach_msg_trap + 20
    243. 1  libsystem_kernel.dylib        0x1af146e1 mach_msg + 44
    244. 2  CoreFoundation                0x1b717be3 __CFRunLoopServiceMachPort + 144
    245. 3  CoreFoundation                0x1b716065 __CFRunLoopRun + 1436
    246. 4  CoreFoundation                0x1b6691af CFRunLoopRunSpecific + 470
    247. 5  CoreFoundation                0x1b6a91a1 CFRunLoopRun + 104
    248. 6  CoreMotion                    0x2179ece9 (null) + 110553
    249. 7  libsystem_pthread.dylib        0x1afe093b _pthread_body + 216
    250. 8  libsystem_pthread.dylib        0x1afe085d _pthread_start + 234
    251. 9  libsystem_pthread.dylib        0x1afde468 thread_start + 8
    252. #18. Thread
    253. 0  libsystem_kernel.dylib        0x1af14968 semaphore_timedwait_trap + 8
    254. 1  libdispatch.dylib              0x1ae3a9df _os_semaphore_timedwait + 70
    255. 2  libdispatch.dylib              0x1ae3a07f _dispatch_semaphore_wait_slow + 56
    256. 3  libdispatch.dylib              0x1ae39463 _dispatch_worker_thread + 200
    257. 4  libsystem_pthread.dylib        0x1afe093b _pthread_body + 216
    258. 5  libsystem_pthread.dylib        0x1afe085d _pthread_start + 234
    259. 6  libsystem_pthread.dylib        0x1afde468 thread_start + 8
    260. #19. com.apple.root.background-qos
    261. 0  appName                      0xe8c840 +[AppsFlyerTracker sharedTracker] + 15513664
    262. 1  appName                      0x7fc914 specialized AppsflyerProvider.startWithLaunchOption([UIApplicationLaunchOptionsKey : Any]) -> () (AppsflyerProvider.swift:21)
    263. 2  appName                      0x7fc5a4 AppsflyerProviderappNameAnalyticsProvider (AppsflyerProvider.swift)
    264. 3  appName                      0x7b31d8 static Analytics.(startProviders([AnalyticsProvider], launchOptions : [UIApplicationLaunchOptionsKey : Any]) -> ()).(closure #1) (Analytics.swift:17)
    265. 4  appName                      0x7b3b0c partial apply for static Analytics.(executeBlockForProvider(AnalyticsProvider, block : () -> ()) -> ()).(closure #1) (Analytics.swift:95)
    266. 5  appName                      0x8d415c thunk (NavigationEventDispatcher.swift)
    267. 6  libdispatch.dylib              0x1ae29797 _dispatch_call_block_and_release + 10
    268. 7  libdispatch.dylib              0x1ae382db _dispatch_root_queue_drain + 620
    269. 8  libdispatch.dylib              0x1ae3800f _dispatch_worker_thread3 + 106
    270. 9  libsystem_pthread.dylib        0x1afde87d _pthread_wqthread + 1040
    271. 10 libsystem_pthread.dylib        0x1afde45c start_wqthread + 8
    272. #20. Thread
    273. 0  libsystem_kernel.dylib        0x1af2a73c __workq_kernreturn + 8
    274. 1  libsystem_pthread.dylib        0x1afde745 _pthread_wqthread + 728
    275. 2  libsystem_pthread.dylib        0x1afde45c start_wqthread + 8
     
  2. jdeuce

    jdeuce

    Joined:
    Dec 15, 2012
    Posts:
    22
    Sound like a tough one man. On my builds I've had very good success with debugging on test flight.

    Just to confirm, were you able to try the exact same build as a test flight release with no issue and then try that exact build on the app store with different behavior? There's no chance some other difference could have popped in by trying slightly different builds?
     
  3. CharlesBarros

    CharlesBarros

    Joined:
    Nov 17, 2011
    Posts:
    61
    We find out that this issue is related to the Vuforia.
    We were able to reproduce this issue in an empty project just by enabling Vuforia:
    https://forum.unity.com/threads/unity-vuforia-ios-crash-on-exit-urgent.529767/

    Unfortunately, the new Vuforia plugin is integrated inside Unity so we don't have access to the C# code... We are digging inside the Vuforia auto-generated files by il2cpp, but no luck yet to pinpoint what's causing the issue.
    I believe that's is related to Vuforia deinitialization, but's only a guess since the crash happens when we kill the app.
     
    henriqueranj likes this.