Application crashes on launch during DataDetector internal operation
| Originator: | luke | ||
| Number: | rdar://15230157 | Date Originated: | 15 Oct 2013 |
| Status: | Duplicate (14669869) | Resolved: | |
| Product: | iOS SDK | Product Version: | 7.0 |
| Classification: | Reproducible: | Sometimes |
Summary: Frequently, but not consistently, my app crashes immediately on launch. The thread that crashes is an NSOperationQueue serial queue being used by DataDetectors, specifically it's DDOperation. DDScannerScanQuery is frequently near the top of the backtrace. I have occasionally seen this error in the console: 2013-10-15 13:28:37.271 CAN[80590:a803] assertion on /SourceCache/MobileDataDetectorsCore_Sim/MobileDataDetectorsCore-355/Sources/PushDown/DDTokenCache.c:360 "delta >= 0" failed :Bad shift in DDTokenCacheMoveStreamOffset, aborting I've yet to reproduce this in a sample app, and disabling data detectors on some text views in my app doesn't seem to prevent the issue. Others have observed this issue too: https://devforums.apple.com/message/900134#900134 I'm yet to see this on an actual device, just in the simulator, although the above thread contains reports of it happening on the device too. Steps to Reproduce: As yet unknown. Expected Results: The app should not crash. Actual Results: Version: iOS 7.0, Xcode Version 5.0 (5A1412) Notes: Configuration: I've as yet only observed this in the iPad simulator. Attachments: A sample app has been submitted to Apple that exhibits this bug - it's a single view template application, with a UITableView and each cell has a text view with the same hardcoded text and data detectors enabled. This appears to be related to text views in cells but I haven't confirmed that.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Filed as dupe of rdar://14669869 which is apparently closed. Fix on the way hopefully.
Some extra observations...
This may be a general SDK bug or just a simulator bug. I've only seen it in the simulator and I've spoken to another dev who has seen it in the simulator but had no crash reports in the wild from his popular app.
I've only seen this on iPad but it may happen on iPhone too.
The crash alway seems to occur in a private NSOperationQueue queue and is clearly related to data detectors although the crash point varies I've seen crashes at these points: DDScannerScanQuery, processToken, DDTokenCacheGetTokenOrSubtokenAfterPosition. Probably others too.
Here's an example backtrace: Thread 26 Crashed:: Dispatch queue: NSOperationQueue Serial Queue 0 DataDetectorsCore 0x0cdb1575 DDTokenCacheGetTokensAtPosition + 1523 1 DataDetectorsCore 0x0cdb19f2 DDTokenCacheGetTokenOrSubtokenAfterPosition + 48 2 DataDetectorsCore 0x0cdaab9b DDScannerScanQuery + 181 3 DataDetectorsUI 0x1358f7fa -[DDOperation main] + 215 4 Foundation 0x01545a69 -[__NSOperationInternal _start:] + 671 5 Foundation 0x014c2798 -[NSOperation start] + 83 6 Foundation 0x01547d34 _NSOQSchedulef + 62 7 libdispatch.dylib 0x033934b0 dispatchclient_callout + 14 8 libdispatch.dylib 0x03381088 dispatchqueue_drain + 450 9 libdispatch.dylib 0x03380e85 dispatchqueue_invoke + 126 10 libdispatch.dylib 0x03381e25 dispatchroot_queue_drain + 83 11 libdispatch.dylib 0x0338213d dispatchworker_thread2 + 39 12 libsystem_c.dylib 0x036abe72 pthreadwqthread + 441 13 libsystem_c.dylib 0x03693daa start_wqthread + 30