Crash: CFPrefsSearchListSource

My app's crashlytics board shows a top crash where the description is mentioned as below

CoreFoundation

-[CFPrefsSearchListSource addManagedSourceForIdentifier:user:]

Fatal Exception: NSInternalInconsistencyException 

UITableView dataSource is not set

This is not reproducible at any definite steps, and from the logs which I put, it looks like it happens in most of the view controllers.

Have any one got similar crashes and any work around for this?

Thanks in advance!

My app's crashlytics board shows a top crash

I don’t suppose you’ve got an Apple crash report for this? Without that there’s really not much I can do to help you )-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

We have encountered the same issue in our app. All of the recent crashes are coming from iOS 14.6.0 (18F72) and are exclusive to iPads.

Seems like the issue originates from the WebView controller that presents something with a table (I suspect the ActionSheet view on the select component)

Fatal Exception: NSInternalInconsistencyException
UITableView dataSource is not set

Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x1a1321298 __exceptionPreprocess
1  libobjc.A.dylib                0x1b507b480 objc_exception_throw
2  CoreFoundation                 0x1a122ecc8 -[CFPrefsSearchListSource addManagedSourceForIdentifier:user:]
3  Foundation                     0x1a2566128 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4  UIKitCore                      0x1a3dd9c9c -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:]
5  UIKitCore                      0x1a3dd9e9c -[UITableView _createPreparedCellForRowAtIndexPath:willDisplay:]
6  UIKitCore                      0x1a3de5208 -[UITableView _heightForRowAtIndexPath:]
7  UIKitCore                      0x1a3df7864 -[UISectionRowData heightForRow:inSection:canGuess:]
8  UIKitCore                      0x1a3dfc738 -[UITableViewRowData heightForRow:inSection:canGuess:adjustForReorderedRow:]
9  UIKitCore                      0x1a3dfdd5c -[UITableViewRowData rectForRow:inSection:heightCanBeGuessed:]
10 UIKitCore                      0x1a3db9428 -[UITableView _rectForRowAtIndexPath:usingPresentationValues:]
11 UIKitCore                      0x1a3dbaa80 -[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:usingPresentationValues:]
12 UIKitCore                      0x1a3dbb6e8 -[UITableView _scrollToRowAtIndexPath:atScrollPosition:animated:usingPresentationValues:]
13 UIKitCore                      0x1a3dbb554 -[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:]
14 WebKit                         0x1ad108d54 -[WKSelectTableViewController viewWillAppear:]
15 UIKitCore                      0x1a3504a64 -[UIViewController _setViewAppearState:isAnimating:]
16 UIKitCore                      0x1a35051e8 -[UIViewController __viewWillAppear:]
17 UIKitCore                      0x1a33f27bc __56-[UIPresentationController runTransitionForCurrentState]_block_invoke.466
18 UIKitCore                      0x1a4064cfc -[_UIAfterCACommitBlock run]
19 UIKitCore                      0x1a3bd47dc _runAfterCACommitDeferredBlocks
20 UIKitCore                      0x1a3bc3ca8 _cleanUpAfterCAFlushAndRunDeferredBlocks
21 UIKitCore                      0x1a3bf4ff8 _afterCACommitHandler
22 CoreFoundation                 0x1a129f588 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
23 CoreFoundation                 0x1a1299bb8 __CFRunLoopDoObservers
24 CoreFoundation                 0x1a129a154 __CFRunLoopRun
25 CoreFoundation                 0x1a1299818 CFRunLoopRunSpecific
26 GraphicsServices               0x1b799f570 GSEventRunModal
27 UIKitCore                      0x1a3bc50e8 -[UIApplication _run]
28 UIKitCore                      0x1a3bca664 UIApplicationMain
29 [Redacted]                     0x10060f764 main + 11 (AppDelegate.swift:11)
30 libdyld.dylib                  0x1a0f78140 start

Would appreciate any help with this issue, Quinn!

We have encountered the same issue in our app.

I’m confused by this claim, and your post in general. Specifically, the backtrace in your post doesn’t line up with the backtrace in your crash report. For example, frame 2 in your post is CFPrefsSearchListSource but the crash report doesn’t mentioned CFPrefsSearchListSource at all.

Indeed, I think the backtrace in your post is misleading nonsense. Consider this from your post:

0  CoreFoundation  … __exceptionPreprocess
1  libobjc.A.dylib … objc_exception_throw
2  CoreFoundation  … -[CFPrefsSearchListSource addManagedSourceForIdentifier:user:]
3  Foundation      … -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4  UIKitCore       … -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:]

Frames 4 and 3 make it clear that UIKit is throwing a language exception, and that’s born out by frames 1 and 0. However frame 2 is very hard to understand. How could we get from NSAssertionHandler to CFPrefs?

In contrast, your crash report seems to make more sense:

0   CoreFoundation  … __exceptionPreprocess + 220 (NSException.m:199)
1   libobjc.A.dylib … objc_exception_throw + 60 (objc-exception.mm:565)
2   CoreFoundation  … +[NSException raise:format:arguments:] + 100 (NSException.m:146)
3   Foundation      … -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 132 (NS…
4   UIKitCore       … -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 1680 (UITable…

Note how CFPrefs is no longer present and frame 2 is NSException, which is what you’d expect.

Where did the backtrace in your post come from?

And if the answer is “From a third-party crash reporting tool.” then take a look at the General Advice and Preserve the Apple Crash Report sections of Implementing Your Own Crash Reporter.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

vinurajmv, I can’t read your comment. Please just add it as a reply rather than jamming it in the comments.


The crash log attached is the extract from the XCode Organizer and reflects the correct backtrace.

Cool.

While I’m not a UIKit expert, I did some spelunking and it looks like the text of this exception is UITableView dataSource is not set (hey hey, that’s actually in vinurajmv’s original post).

Any suggestions where to go from here, given the exception traces way back to the WebKit’s WKSelectTableViewController at frame 14?

OK, just to be clear, here’s that frame symbolicated:

14  WebKit … -[WKSelectTableViewController viewWillAppear:] + 244 …/UIProcess/ios/forms/WKFormSelectPopover.mm:164)

While web views also aren’t my thing, I will note that this code is available in the WebKit open source so you could poke around there.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Crash: CFPrefsSearchListSource
 
 
Q