Live data from Hacker News

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

openradar.appspot.com

141–150 of 206 posts

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

#143

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.

[deleted]

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

#144
post #41
post #29

so, uh anyone else sense a zero day exploit? ">click me ... not saying that will work, but usually if you can hard crash something you just found some corruption in memory maybe bad use of memcpy, sprintf instead of snprintf... something along those lines...

Highly unlikely. If you look at the backtrace, it's dying on an assert, not some random memory dereference.

A remote DoS isn't remote code execution, but it's still an exploit.

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

#145
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…

What do you mean "exploited"? It certainly can be exploited to cause a denial of service (like the one at this page: http://gironda.org/this_will_crash_safari.html).

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

#146
post #138

Earlier quoted context omitted.

Backwards compatibility refers to newer software/hardware not supporting older software/hardware. For example, Apple axed the rosetta powerpc support (which allowed you to run older software after apple switched to intel CPUs) in Leopard. I still keep a PowerBook G4 just for MacDraw.

Rosetta is optional but supported on Snow Leopard, and gets downloaded automatically on demand. Seven years of transition (assuming SL stopped to be supported when ML was released) to Intel was more than enough for active software to be ported. You just can't carry legacy code indefinitely, you have to stay focused or you'll be all over the place and suffer death by a thousand cuts.

I intuitively agree as a programmer, but in practise, the focused 10.7/10.8 line has been pretty buggy compared to the legacy-happy 10.6; and the legacy-happy Windows 7 was a smash hit compared to the focused Windows RT. Of course, it might be even worse with Rosetta added to the mix...

I've also given away my Mid-09 MBP because 10.7 Safari was terrible without an SSD ("blank page" bug) :(

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

#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. Assertions stop the program flow if their condition is not met (an exception is thrown) and normally a code block upstream should handle this case.

I can only speculate, but either the assertion was left in the code despite being only intended for debugging/testing (ie. it was meant to be there only temporarily) or the upstream code has a bug that causes it not to catch the exception.

Either way, it is not handled and therefore bubbles up the whole code chain until some monitor in OS X or Objective C terminates the program because it sees a program error.

Someone at Apple forgot a test case feeding text with File:/// to DataDetectors.

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

#148
post #17

Earlier quoted context omitted.

It's quite terrible. I even reported it on bugreport.apple.com on 10.8.0, but neither 10.8.1 nor 10.8.2 fixed it. I can't believe there's no-one at Apple using i18n keyboard layouts and Terminal.app. It's not like typing "~" is an uncommon event on the command line.... Meanwhile, VLC fixed the same bug (typing ~ in the VLC.app UI textfields) in about 30 minutes.

Bug number?

problem id 12024039

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

#149
post #142
post #57

Earlier quoted context omitted.

Did you try some other i18n keyboard layouts, like Norwegian or Swedish?

Mine is Swedish, and I am unable to reproduce it.

It crashes with Swedish layout on 10.8.2 when I type Ctrl + ¨ on my computer. (Alt+~+space seems to work, though)

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

#150
post #139

Earlier quoted context omitted.

Yes because every day one types "File:///". This seems like hardly something that outweighs the massive performance improvements.

improvements ?!

Yes, now you too can drain your battery in just half the time as before! ;-)
Post reply on HN