Live data from Hacker News

Do Not Type "File:///" in OS X

openradar.appspot.com

161–170 of 206 posts

Re: Do Not Type "File:///" in OS X

#161

Earlier quoted context omitted.

That's because SublimeText doesn't use NSTextFields, and therefore, doesn't use Data Detectors. It's not voodoo.

Seriously, people, learn how to read a backtrace. This is hacker news, not social-media-manager-who-claims-they-are-a-geek news.

You mean this isn't Slashdot?

Re: Do Not Type "File:///" in OS X

#162
This is a bit nostalgic. Back in the day, Opera used to crash if you typed http:/// into the address bar.

(Edit: talking about bugs, HN formatting won't let me put http:/// in double quotes - it eats the closing quote.)

Re: Do Not Type "File:///" in OS X

#163
post #117
post #111

Earlier quoted context omitted.

Why would the spell checker be running against in -coming messages? So that you can be a grammar pedant and annoy your friends?

My guess would be that data detectors are used to detect and format links in incoming messages.

Then why would disabling Spellchecking affect that?

Re: Do Not Type "File:///" in OS X

#164
post #136
post #33

Earlier quoted context omitted.

From the openradar bug, it is obvious that the bug is inside the "Data Detectors" thing. Looks like it triggers on anything starting with file:// (+/) case-insensitive, but then something later in the data extraction makes the incorrect assumption that the string should start with file:// (+/) lowercase, and throws an assert. It's really quite bad that a bug inside the data detectors can bring down a whole app. Edit:…

checkDataDetectors will extract 'File://a/' - or any other 'complete' file URL - which at a minimum is a schema (file://) and a path '/' - as a valid data URL and then pass it to DDResultCopyExtractURL, which does some additional sanity checking. There it validates it by asserting that the URL begins with 'file://', which it doesn't. It then converts to an NSInternalInconsistencyException which is what crashes the ap…

Can you clarify what about that output shows that the crash cannot be exploited? Not doubting, just curious.

Re: Do Not Type "File:///" in OS X

#166

Earlier quoted context omitted.

That's because SublimeText doesn't use NSTextFields, and therefore, doesn't use Data Detectors. It's not voodoo.

Seriously, people, learn how to read a backtrace. This is hacker news, not social-media-manager-who-claims-they-are-a-geek news.

The likelihood of python/ruby/PHP/etc. programmer being able to interpret a native code stack trace is... what? Probably quite low. They might not even know what the function call names imply. And yet they'd fit perfectly in to this site's readership.

Re: Do Not Type "File:///" in OS X

#167
post #83

The cause of this bug seems to be the OSX system spell checker; I've crashed a few applications to take a look at the dumps, and so far they common point of failure seems to be that they all have some call to something like `NSSpellChecker`. In the OP for example: 6 AppKit 0x00007fff921dbd1a checkDataDetectors + 536 7 AppKit 0x00007fff921d9429 NSSpellCheckerCheckString + 13334 8 AppKit 0x00007fff921d5f9f -[NSTextChec…

I've disabled the spell checker a long time ago, but it still happens. So NSSpellCheckCheckString is still being invoked even though the spell check is not running.

Re: Do Not Type "File:///" in OS X

#168

Hilariously, this bug seems to also crash the Mac error reporter, maybe because it has the evil string in it. I did manage to copy and paste a crash dump before the crash reporter crashed: http://pastebin.com/UkhERvaA The underlying reported error is * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'condition "wrong extraction: File:///"' Interesting that it's an asynchronous cr…

You can use TextExpander to work around it temporarily. Just map {The bad string that starts with 'F' that I cannot type here} to file:/// and it seems to add some protection.

Re: Do Not Type "File:///" in OS X

#169
post #141

There was an x-ray machine called "Therac-25" which had a chance of killing you if the operator typed a specific (non-lethal) configuration too fast. http://en.wikipedia.org/wiki/Therac-25 That was a disaster. This is a bug.

This is why I never want to work in dev or qa for medical machines. If I were involve in this product's design, the guilt would destroy me.

Re: Do Not Type "File:///" in OS X

#170
post #147

Can someone explain this error to me simply, like one might talk to a golden retriever?

Somewhere in the system is a friendly program called "DataDetectors", which sniffes at text so find out if there are links in it which should be highlighted by the application handling the text. Now the programmer who developed DataDetectors wanted to make sure (maybe for tests) that a subcomponent was fed only valid file-urls (that is: file:/// is OK, File:/// not) and therefore inserted an assert-statement. Asserti…

Thank you, iSnow! Makes perfect sense.
Post reply on HN