Termination Description: DYLD, Symbol not found: ___darwin_check_fd_set_overflow - ios

I have such a problem, I put together a build for ios in unity.
When I run a app:
-IOS 14+ and IOS 13.6 starts up and works
-IOS 12.3.1 and IOS 13.2 crashes when start
The application opens, freezes and crashes.
Termination Description: DYLD, Symbol not found: ___darwin_check_fd_set_overflow | Referenced from: /var/containers/Bundle/Application/1C5FB058-3A1A-4845-A857-D4717591F4BA/ProductName.app/Frameworks/UnityFramework.framework/UnityFramework | Expected
Thread 39 Crashed:
0 dyld 0x0000000100a0a398 __abort_with_payload + 8
1 dyld 0x0000000100a099d8 abort_with_payload_wrapper_internal + 100
2 dyld 0x0000000100a09a08 fcntl + 0
3 dyld 0x00000001009cc8f8 dyld::fastBindLazySymbol+ 18680 (ImageLoader**, unsigned long) + 0
4 dyld 0x00000001009cca14 dyld::fastBindLazySymbol+ 18964 (ImageLoader**, unsigned long) + 284
5 libdyld.dylib 0x00000001a8524848 dyld_stub_binder + 60
6 UnityFramework 0x0000000107f0bf20 0x107000000 + 15777568
7 UnityFramework 0x0000000107ee75d0 0x107000000 + 15627728
8 UnityFramework 0x0000000107f07864 0x107000000 + 15759460
9 UnityFramework 0x0000000107f074bc 0x107000000 + 15758524
10 UnityFramework 0x0000000107ef03cc 0x107000000 + 15664076
11 UnityFramework 0x0000000108109b30 0x107000000 + 17865520
12 UnityFramework 0x0000000107f4d5ec 0x107000000 + 16045548
13 UnityFramework 0x0000000107f4f2cc 0x107000000 + 16052940
14 UnityFramework 0x0000000107f4f20c 0x107000000 + 16052748
15 libsystem_pthread.dylib 0x00000001a86f02c0 _pthread_body + 128
16 libsystem_pthread.dylib 0x00000001a86f0220 _pthread_start + 44
17 libsystem_pthread.dylib 0x00000001a86f3cdc thread_start + 4
Know someone who can answer?

Those are system components. Generally, you should only go into those folders when you have a reason to do so.
When you run the second command, the change is being made to the root account's settings and not those for your normal account.

Related

After switching to Xcode 14 beta I got this error: QOS_CLASS_USER_INITIATED waiting on a lower QoS thread running at QOS_CLASS_DEFAULT

My app is working well and I didn't get this error on Xcode 13.4,
Is it Xcode 14 beta bug or I'm doing some bad threading?!
Thread running at QOS_CLASS_USER_INITIATED waiting on a lower QoS thread running at QOS_CLASS_DEFAULT. Investigate ways to avoid priority inversions
I didn't understand the issue, so I added my stack log too:
_TtGC7SwiftUI14_UIHostingViewVVS_P10$1dc8d4d8821BridgedNavigationView8RootView_ implements focusItemsInRect: - caching for linear focus movement is limited as long as this view is on screen.
2022-06-07 18:53:41.412342+0430 MyApp[916:25641] [UIFocus] _TtCC7SwiftUI17HostingScrollView22PlatformGroupContainer implements focusItemsInRect: - caching for linear focus movement is limited as long as this view is on screen.
Thread Performance Checker: Thread running at QOS_CLASS_USER_INITIATED waiting on a lower QoS thread running at QOS_CLASS_DEFAULT. Investigate ways to avoid priority inversionsPID: 916, TID: 25815
Backtrace
=================================================================
3 MyApp 0x0000000102c7665c -[_FSRRunLoopThread runLoop] + 44
4 MyApp 0x0000000102c763a8 __45+[NSRunLoop(FSRWebSocket) FSR_networkRunLoop]_block_invoke + 124
5 libdispatch.dylib 0x00000001054318fc _dispatch_client_callout + 16
6 libdispatch.dylib 0x0000000105433240 _dispatch_once_callout + 80
7 MyApp 0x0000000102c76304 +[NSRunLoop(FSRWebSocket) FSR_networkRunLoop] + 84
8 MyApp 0x0000000102c6ff30 -[FSRWebSocket _connect] + 68
9 MyApp 0x0000000102c6ed60 -[FSRWebSocket open] + 216
10 MyApp 0x0000000102c4ebdc -[FWebSocketConnection open] + 248
11 MyApp 0x0000000102c4d3c4 -[FConnection open] + 112
12 MyApp 0x0000000102bf1404 -[FPersistentConnection openNetworkConnectionWithContext:] + 588
13 MyApp 0x0000000102bf1078 __45-[FPersistentConnection tryScheduleReconnect]_block_invoke_2 + 332
14 MyApp 0x0000000102c3d0fc -[FIRDatabaseConnectionContextProvider fetchContextForcingRefresh:withCallback:] + 264
15 MyApp 0x0000000102bf0f0c __45-[FPersistentConnection tryScheduleReconnect]_block_invoke + 460
16 MyApp 0x0000000102c1c0d8 -[FIRRetryHelperTask execute] + 92
17 MyApp 0x0000000102c1c6dc __24-[FIRRetryHelper retry:]_block_invoke + 84
18 libdispatch.dylib 0x00000001054300c4 _dispatch_call_block_and_release + 24
19 libdispatch.dylib 0x00000001054318fc _dispatch_client_callout + 16
20 libdispatch.dylib 0x0000000105438a58 _dispatch_lane_serial_drain + 688
21 libdispatch.dylib 0x00000001054396d0 _dispatch_lane_invoke + 424
22 libdispatch.dylib 0x0000000105445150 _dispatch_workloop_worker_thread + 696
23 libsystem_pthread.dylib 0x000000023db94ddc _pthread_wqthread + 284
24 libsystem_pthread.dylib 0x000000023db94908 start_wqthread + 8
You're getting this message due to a priority inversion in your code. More details here: https://developer.apple.com/documentation/xcode/diagnosing-performance-issues-early
More specifically, you're using dispatch_group_wait which doesn't provide priority inversion avoidance; so your waiting thread is susceptible to an inversion. Seemingly that's what's happening here.

iOS Framework Crash in Crashyltics with strange characters

There are a number of crashes being reported on Crashlytics (Fabric.io) for my app which is live (in Production). I (and my few of my friends) also use the same app regularly but have never seen any crash.
In detail- As per the crashlytics dashboard, the crash is caused in a Framework (also developed by me but cannot add crashytlics there - reference this) and the logs have below details -
Crashed: com.apple.main-thread
0 libswiftCore.dylib 0x1a59e2a70 <redacted> + 384
1 (Missing) 0x0 (Missing)
2 (Missing) 0x0 (Missing)
3 XtraIntegration 0x1061e609c $s15XtraIntegration18QrUIViewControllerC05fetchC0yyFyAA0A6ResultOyAA0A8CardInfoVAA0A5ErrorOGcfU_ + 1728
4 XtraIntegration 0x106136f7c $s15XtraIntegration0A7SessionC03getA8CardInfo10completionyyAA0A6ResultOyAA0aeF0VAA0A5ErrorOGc_tFyAGySSAKGXEfU_yAGySo12NSDictionaryCAKGcfU_ + 1104
5 XtraIntegration 0x1063438c0 $s15XtraIntegration13ServiceClientC11requestJSON_10completionyAA21URLRequestConvertible_p_yAA0A6ResultOySo12NSDictionaryCAA0A5ErrorOGctFZy10Foundation4DataVSg_So13NSURLResponseCSgs0L0_pSgtcfU_yycfU_ + 1420
6 XtraIntegration 0x1061b6e34 $sIeg_IeyB_TR + 52
7 libdispatch.dylib 0x197f63bb0 <redacted> + 32
8 (Missing) 0x0 (Missing)
9 (Missing) 0x4b16b68197f70c00 (Missing)
10 (Missing) 0x621f120198239000 (Missing)
11 (Missing) 0x1a4d4a8198233b00 (Missing)
12 (Missing) 0x2645158198233000 (Missing)
13 (Missing) 0x0 (Missing)
14 (Missing) 0x494e46819c353800 (Missing)
15 (Missing) 0x0 (Missing)
16 libdyld.dylib 0x1980b2f30 <redacted> + 4
Also, whenever I get this crash, I see below in my report -
The screenshot says, there is a Fatal error while trying to unwrapping a nil value. And I see some strange characters like question marks.
Putting these things together, I assume I am getting an error in my Framework ViewController file (QRUIViewController in the logs) but I am not unwrapping any nil value in my whole code in that file.
Can anyone please help me understand what is going on with the app?
UPDATE
Similar Crash with below logs observed again
Crashed: com.apple.main-thread
0 libswiftCore.dylib 0x1af933b00 specialized _fatalErrorMessage(_:_:file:line:flags:) + 296
1 libswiftCore.dylib 0x1af7583e0 _fatalErrorMessage(_:_:file:line:flags:) + 16
2 XtraIntegration 0x1025dbb84 $s15XtraIntegration18QrUIViewControllerC03getA2QR12xtraCardInfo7sessionyAA0aiJ0V_AA0A7SessionCtFyAA0A6ResultOyAA0aI13ImageResponseVAA0A5ErrorOGcfU0_ + 460
3 XtraIntegration 0x10252b97c $s15XtraIntegration0A7SessionC03getA9CardImage9cardToken0G6PngUrl10completionySS_SSyAA0A6ResultOyAA0aeF8ResponseVAA0A5ErrorOGctFyAIy10Foundation4DataVAMGcfU_ + 568
4 XtraIntegration 0x1025fc3c8 $s15XtraIntegration17ServiceClientDataC11requestJSON_10completionyAA21URLRequestConvertible_p_yAA0A6ResultOy10Foundation0E0VAA0A5ErrorOGctFZyAKSg_So13NSURLResponseCSgs0M0_pSgtcfU_yycfU_ + 796
5 XtraIntegration 0x1025aae34 $sIeg_IeyB_TR + 52
6 libdispatch.dylib 0x18171ca38 _dispatch_call_block_and_release + 24
7 libdispatch.dylib 0x18171d7d4 _dispatch_client_callout + 16
8 libdispatch.dylib 0x1816cb008 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1068
9 CoreFoundation 0x181c7032c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
10 CoreFoundation 0x181c6b264 __CFRunLoopRun + 1924
11 CoreFoundation 0x181c6a7c0 CFRunLoopRunSpecific + 436
12 GraphicsServices 0x183e6b79c GSEventRunModal + 104
13 UIKitCore 0x1ae5efc38 UIApplicationMain + 212
14 Xtra 0x10124a350 main + 69 (AppDelegate.swift:69)
15 libdyld.dylib 0x18172e8e0 start + 4

WebCore crash, iOS 11, related to UIWebView scripts. (JSC::JSLock::DropAllLocks::DropAllLocks)

Tons of crashes start happening on iOS 11 in the apps using UIWebView and showing rich content, like ads or videos. It was a similar problem in 2015, which then was fixed (see here). Now it re-appears again.
I saw some similar, but I still decided to post my problem, this is not a duplicate, but aggregated information about this crash from different, seems not-related at glance sources. Hope it will help to bring attention and solve the case faster. I also want to give bounty on the solution, so please don't remove this question.
My case - UIWebView in native Obj-C app. The problem only appears to happens in free version, which serves the ads. The date when it starts - July, 22. It was no app update at the time. All crashes in iOS 11 only. Thousands of them. Crash stack:
Crashed: WebThread 0 JavaScriptCore 0x188a8d464
JSC::JSLock::DropAllLocks::DropAllLocks(JSC::VM&) + 176 1
JavaScriptCore 0x188a8d438
JSC::JSLock::DropAllLocks::DropAllLocks(JSC::VM&) + 132 2 WebCore
0x1897d5cec SendDelegateMessage(NSInvocation*) + 360 3 CoreFoundation
0x18163c2d4 forwarding + 624 4 CoreFoundation
0x18152241c _CF_forwarding_prep_0 + 92 5 WebCore
0x189806588 WebCore::DOMWindow::removeAllEventListeners() + 412 6
WebCore 0x1897eee3c
WebCore::Document::removeAllEventListeners() + 32 7 WebCore
0x1897ed47c WebCore::Document::~Document() + 544 8 WebCore
0x18a533860 WebCore::HTMLDocument::~HTMLDocument() + 12 9 WebCore
0x1897ed11c WebCore::Node::~Node() + 384 10 WebCore
0x1898538bc WebCore::HTMLLinkElement::~HTMLLinkElement() + 12 11
JavaScriptCore 0x188a69a5c void
JSC::MarkedBlock::Handle::specializedSweep(JSC::FreeList*,
JSC::MarkedBlock::Handle::EmptyMode,
JSC::MarkedBlock::Handle::SweepMode,
JSC::MarkedBlock::Handle::SweepDestructionMode,
JSC::MarkedBlock::Handle::ScribbleMode,
JSC::MarkedBlock::Handle::NewlyAllocatedMode,
JSC::MarkedBlock::Handle::MarksMode,
JSC::JSDestructibleObjectDestroyFunc const&) + 196 12 JavaScriptCore
0x188a6846c void
JSC::MarkedBlock::Handle::finishSweepKnowingHeapCellType(JSC::FreeList*,
JSC::JSDestructibleObjectDestroyFunc const&)::'lambda'()::operator()()
const + 348 13 JavaScriptCore 0x188a67fa4 void
JSC::MarkedBlock::Handle::finishSweepKnowingHeapCellType(JSC::FreeList*,
JSC::JSDestructibleObjectDestroyFunc const&) + 320 14 JavaScriptCore
0x188a67e58
JSC::JSDestructibleObjectHeapCellType::finishSweep(JSC::MarkedBlock::Handle&,
JSC::FreeList*) + 32 15 JavaScriptCore 0x1887e997c
JSC::MarkedBlock::Handle::sweep(JSC::FreeList*) + 372 16
JavaScriptCore 0x1887e0064
JSC::IncrementalSweeper::sweepNextBlock() + 132 17 JavaScriptCore
0x1881c27fc JSC::IncrementalSweeper::doWork() + 72 18 JavaScriptCore
0x188aad864
JSC::JSRunLoopTimer::timerDidFireCallback(CFRunLoopTimer*, void*) +
76 19 CoreFoundation 0x1815dfaa8
__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 28 20 CoreFoundation 0x1815df76c __CFRunLoopDoTimer + 864 21
CoreFoundation 0x1815df010 __CFRunLoopDoTimers + 248
22 CoreFoundation 0x1815dcb60 __CFRunLoopRun + 2168 23
CoreFoundation 0x1814fcda8 CFRunLoopRunSpecific + 552
24 WebCore 0x1897c02d4 RunWebThread(void*) +
592 25 libsystem_pthread.dylib 0x18125d220 _pthread_body + 272
26 libsystem_pthread.dylib 0x18125d110 _pthread_body + 290 27
libsystem_pthread.dylib 0x18125bb10 thread_start + 4
React Native IOS 11.3 - 11.4 Error: JavaScriptCore JSC::JSLock::DropAllLocks::DropAllLocks. It seems that embedded Video Widget causes the same problem, also only iOS 11. The React Native platform seems unrelated, because the problem happens also in native Obj-C apps.
Javascript core crash when using YouTube iframe player in UIWebView in iOS 11.3. YouTube iframe player causes the same problem. Again, all starts iOS 11.
This is huge problem, please advise and help us solve this. Thanks!

Crash on iOS > TCCAccessRequest_block_invoke_2.8

I've got an error in my app (iOS 8 to iOS 11) :
Crashed: com.apple.root.default-qos
0 libsystem_kernel.dylib 0x1839a00a8 __abort_with_payload + 8
1 libsystem_kernel.dylib 0x18399b100 abort_with_payload_wrapper_internal + 100
2 libsystem_kernel.dylib 0x18399b12c system_set_sfi_window + 10
3 TCC 0x1868ed99c __TCCAccessRequest_block_invoke_2.85 + 222
4 TCC 0x1868ed8bc __CRASHING_DUE_TO_PRIVACY_VIOLATION__ + 706
5 TCC 0x1868f113c __tccd_send_block_invoke + 316
6 libxpc.dylib 0x183aeda0c _xpc_connection_reply_callout + 60
7 libxpc.dylib 0x183aed948 _xpc_connection_call_reply_async + 88
8 libdispatch.dylib 0x18380d758 _dispatch_client_callout3 + 16
9 libdispatch.dylib 0x183825060 _dispatch_mach_msg_async_reply_invoke$VARIANT$mp + 324
10 libdispatch.dylib 0x183813f54 _dispatch_queue_override_invoke$VARIANT$mp + 400
11 libdispatch.dylib 0x18381a1c8 _dispatch_root_queue_drain + 596
12 libdispatch.dylib 0x183819f10 _dispatch_worker_thread3 + 120
13 libsystem_pthread.dylib 0x183ab3130 _pthread_wqthread + 1268
14 libsystem_pthread.dylib 0x183ab2c30 start_wqthread + 4
I've read some subjects about errors like this one. Each time, people says that comes from Permissions in infos.plist.
App uses camera, library, geolocation. So I add :
Privacy - Camera Usage Description
Privacy - Location When in Use
Privacy - Photo Library Usage Description
But there is always the same problem.
I add Microphone usage in plist, but same crash occurs.
I don't understand the crash. On my iPhone, everything works perfectly but on some devices, this error cause crashes. Could you help me please ?
Thanks.
Check all of your WKWebView that is are loading images.
If you long press on Webview it shows an option to save photos in app.
Fix for the crash:
webView?.allowsLinkPreview = false

iOS: Need help figuring out this crash "Crashed: NSOperationQueue Serial Queue EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000000"

This is the crash report I received from crashlytics and I don't have the slightest clue on what it means or what to do about this. Any tips or suggestions will be appreciated.
Thread : Crashed: NSOperationQueue Serial Queue
0 libsystem_platform.dylib 0x3baef4da _platform_memmove$VARIANT$Swift + 185
1 ??? 0x0000000c
2 DataDetectorsCore 0x350b26bb DDTokenCacheGetItemAtIndexCreateIfNeeded + 90
3 DataDetectorsCore 0x350b2635 DDTokenCacheGetTokensAtPosition + 1084
4 DataDetectorsCore 0x350ae41d _DDScannerHandleState + 472
5 DataDetectorsCore 0x350aea71 _DDScannerHandleState + 2092
6 DataDetectorsCore 0x350addf1 DDScannerScanQuery + 328
7 DataDetectorsUI 0x350c8f7d -[DDOperation main] + 288
8 Foundation 0x31664aa5 -[__NSOperationInternal _start:] + 772
9 Foundation 0x3170896d __NSOQSchedule_f + 60
10 libdispatch.dylib 0x3b9c5e7b _dispatch_queue_drain + 374
11 libdispatch.dylib 0x3b9c2f93 _dispatch_queue_invoke + 42
12 libdispatch.dylib 0x3b9c6745 _dispatch_root_queue_drain + 76
13 libdispatch.dylib 0x3b9c69c5 _dispatch_worker_thread2 + 56
14 libsystem_pthread.dylib 0x3baf0dff _pthread_wqthread + 298
Do you have any part of your app where the user clicks on a URL or specifies a URL which is then handled by your app, or by the system on behalf of your app. The subsystem that does this is DataDetectorsCore.
If you have code around that area, it would be a good idea to add log messages, assert checks, validation, and unit test code.
It might be that you are receiving maliciously crafted URLs; here is an example but for the Mac platform: http://nakedsecurity.sophos.com/2013/02/06/anatomy-of-a-bug-how-mac-os-x-chokes-if-you-type-file/

Resources