Typing These 8 Characters Will Crash Almost Any App On Your Mountain Lion Mac
An anonymous reader writes "All software has bugs, but this one is a particularly odd one. If you type "File:///" (no quotes) into almost any app on your Mac, it will crash. The discovery was made recently and a bug report was posted to Open Radar. First off, it’s worth noting that the bug only appears to be present in OS X Mountain Lion and is not reproducible in Lion or Snow Leopard. That’s not exactly good news given that this is the latest release of Apple’s operating system, which an increasing number of Mac users are switching to. ... A closer look shows the bug is inside Data Detectors, a feature that lets apps recognize dates, locations, and contact data, making it easy for you to save this information in your address book and calendar."
C-strings strike again.
You're doing it wrong.
no big deal.
Steve
BRB, heading down to the Apple Store...
const int one = 65536; (Silvermoon, Texture.cs)
SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
- An obscure library bug triggered by a magic string.
- In the latest version.
And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
No one should ever need to type file:///
There are no bugs. You're doing it wrong
Ah, did manage to replicate it. Despite what the long article says, it does seem to be case sensitive. Very odd bug. The truly worrisome thing is that this would seem to indicate that even the most basic of text editors is capable of running scripts from plain text (as opposed to apple script). Not sure what the ramifications of that are, but it seems like a potential vector for malware.
"Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
Talk about over-egging the pudding. You're talking as if it's a fundamental flaw that ruins the whole operating system. It's a bug. Of course it's not good news, but it's not certain doom for Mountain Lion either.
Bogtha Bogtha Bogtha
Landon Fuller has posted a gist on GitHub with an explanation of the bug and a binary patch to the affected library.
This sig is umop apisdn.
http://kleinschmidt.wordpress.com/2006/07/03/i-cannot-be-played-on-record-player-x/
The bug is case sensitive; as the bug report says "The capital 'F' is important."
Please do not bother posting something so quickly, without looking into it.
This is the stack trace mentioned in the article:
http://pastebin.com/UkhERvaA
Doesn't look like a c-string or printf issue to me at all.
There's no -1 for "I don't get it."
I tried this in Safari on Lion. Capital F required, but indeed just "File:/// " crashes it.
Then you get a pop-up asking if you want to report the problem to Apple? Sure.
But then that crashes with a pop-up reporting that crash reporter has crashed. Bonus!
"Education is not the filling of a pail, but the lighting of a fire." -- William Butler Yeats
You used to be able to BSOD a Windows 95 or 98 machine by trying to read C:\con\con, and this included any web pages that requested file://C:/con/con.
Oh, wait, capitol F. That does cause a crash. Since when has a Mac been case sensitive? I guess that's what they get for listening to all those hackers complain about case insensitivity. ;)
From a comment above, the problem is that it's not case sensitive, except for an internal sanity check which is.
E.g. the dispatching code said "the user typed File:/// and I have a handler for file:///, so I'll call it", but then the handler had what was basically an case-insensitive comparison assert(url.startswith("file:///")).
So the problem isn't case sensitivity or insensitivity -- it's that it was being inconsistent about it.
If this is an assert as it appears to be, my question is, why is it in shipping code. Normally asserts are controlled by the NDEBUG symbol (or equivalent) which is undefined in optimized builds. In my opinion asserts should not be in shipping code. You should have something more solid in place.
Ok, I didn't believe this, I thought it might be a hoax so I wanted to try this and typed it into a file in the TextEdit.app, and it crashed the TextEdit.app completely!!!!! I had a 10 page paper that I was writing in there opened and it hadn't failed yet. The paper is due tomorrow!! is there a way to sue apple for damages over this?!!?!!!!??
Even more interesting is that fact it didn't prevent you from making that post.
Let me guess. The Google search box in Firefox was not implemented using Apple's Cocoa widget Framework.
File:/// Or whatever.
After trying this in every app I could think of, and failing to crash them, it turns out that this is case sensitive.
Some dude has done a more detailed analysis over on github but the long and short of it is that there is a specific check in the code for 'file://' and any other case will cause it to crash. All caps - crash. Capital F and the rest in lower-case - crash. All lower-case and a capital L - crash.
Specialist Mac support for creative pros, Melbourne
You are holding it right. The others aren't.
"Doctor, it hurts when I do this... Can you help me?"
"Sure, don't to that."
I'm going to give some free advice to users of Apple's OSX Mountain Lion: Don't do that.
You are welcome on my lawn.
It's a commented assembly listing with a proposed hacky fix in assembly.
It's kind of fantastic, actually. Someone sends you an email saying, "let's meet for lunch tomorrow", or "my new phone number is ...", etc., and these become clickable to enter a calendar appointment, or address book entry, etc.
These trace back to the Newton, and were a huge part of that device's "magic". And when you get an email with a UPS tracking number as plain text (instead of a hyperlink), and it becomes clickable and asks if you want to track your shipment, you get one of those, "oh, now that's cool!" moments.
Google does something similar in search results. If you put in a UPS tracking number, the top result is for you to track the shipment, etc.
It just works...
I thought everyone knew File:/// is the new Command-Q