Typing some string into almost any app causes app to hang or crash

Originator:qzy
Number:rdar://13143583 Date Originated:04-Feb-2013 11:53 PM
Status:Duplicate/13115697 Resolved:
Product:Mac OS X Product Version:10.8
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
Typing some malformed URI sequence which the data detector mechanism fails to handle gracefully causes almost any application to hang or quit unexpectedly.

========================================

Steps to Reproduce:
1. Activate TextEdit and ⌘N, or activate Mail and ⌘N, or activate Stickies and ⌘N, or open just about any application that allows you to type things, even the search box in Preview, Finder, iTunes, Aperture
2. Type exactly "File:///" followed by enter. The letter F needs to be capital and there should be three slashes following the colon.

========================================

Expected Results:
Application processes this string normally, either doing nothing or perform a search, depending on where this string is typed.

========================================

Actual Results:
Application hangs or quits unexpectedly, creating several entries in system log, for example:
assertion on /SourceCache/DataDetectorsCore/DataDetectorsCore-269.1/Sources/PushDown/DDResultExtraction.c:1576 "CFStringHasPrefix(urlVal, CFSTR("file://"))" failed :wrong extraction: File:///
wrong extraction: File:///
An uncaught exception was raised
condition "wrong extraction: File:///"
[ call stack ]

Sometimes this also leads to data loss/inconsistency, for example Aperture detected library inconsistency on second launch.

========================================

Regression:
In certain circumstances some applications do not exhibit this behaviour, including Pages, Keynote, Numbers. (This only applies to typing the string into the main area. Press ⌘F then type the string into the "Find" textbox will also result in a crash.)
Other applications that provide its own mechanism for text input are also unaffected, such as Terminal, Mathematica, Emacs, MacVim, Microsoft Word.

========================================

Notes:
Due to this bug, filing a bug report is extremely difficult. For example, Safari would hang when I type the string into this textbox. Even merely opening the crash log in Console causes Console to crash.

In crash logs for some applications, DDCrashv is not mentioned but -[NSTextCheckingOperation dealloc] is mentioned.

The data detectors are ostensibly activated by spell checking, therefore disabling data detectors does not seem to work.

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!