Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Bug Desktops (Apple) OS X Apple News

Typing These 8 Characters Will Crash Almost Any App On Your Mountain Lion Mac 425

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."
This discussion has been archived. No new comments can be posted.

Typing These 8 Characters Will Crash Almost Any App On Your Mountain Lion Mac

Comments Filter:
  • printf (Score:2, Funny)

    by Sigvatr ( 1207234 )
    C-strings strike again.
    • by MrEricSir ( 398214 ) on Saturday February 02, 2013 @07:42PM (#42774261) Homepage

      This is the stack trace mentioned in the article:
      http://pastebin.com/UkhERvaA [pastebin.com]

      Doesn't look like a c-string or printf issue to me at all.

    • Re:printf (Score:5, Insightful)

      by fyngyrz ( 762201 ) on Saturday February 02, 2013 @08:00PM (#42774391) Homepage Journal

      C-strings strike again.

      Nope. Lousy programmers strike again. There's nothing at all wrong with c-strings. There is, however, a sufficiency of lousy programmers who lack the skill to handle perfectly simple data structures. Seriously, if you can't handle a zero terminated string or keep from overrunning an array, it's not the string format that's the problem. It's you.

      Assuming the problem here is a string problem may be jumping the gun, too. Could just as easily be something else.

      • Re:printf (Score:5, Funny)

        by Hal_Porter ( 817932 ) on Sunday February 03, 2013 @11:44AM (#42777947)

        I like C, but the problem is that most programmers cause chaos when they write it. C was always meant as a language that people who like assembler will like and use and be more productive. It was not meant as a language that today's script monkeys should use.

        Also Objective C was designed according to the prinicples of Objectivism - i.e. the code of the looters and moochers would crash and burn and bankrupt their companies whereas the code of Great Men would navigate the formidable obstacles of pointers and demonstrate their status as Nietzschean Ubermenschen and be rewarded with tonnes of cash and Patricia Neal, so this is not really surprising.

  • by Anonymous Coward on Saturday February 02, 2013 @07:02PM (#42773971)

    You're doing it wrong.

    no big deal.

    Steve

  • BRB (Score:5, Funny)

    by AmiMoJo ( 196126 ) * on Saturday February 02, 2013 @07:02PM (#42773973) Homepage Journal

    BRB, heading down to the Apple Store...

  • by TapeCutter ( 624760 ) on Saturday February 02, 2013 @07:10PM (#42774019) Journal
    - An obscure library bug triggered by a magic string.

    - In the latest version.
    • by jonadab ( 583620 ) on Saturday February 02, 2013 @07:27PM (#42774145) Homepage Journal
      > An obscure library bug triggered by a magic string.

      The thing is, the magic string in question is not particularly obscure. Any app that normally handles URLs is fairly likely to get that typed into it at some point. Okay, granted, protocols are usually not capitalized, and File:/// is no more common than Http:// or Mailto:, but nonetheless, this is something people are definitely going to run into occasionally.

      (Yes, file protocol terminates the protocol with just two slashes; but, importantly, the next segment of the URL is an absolute path. So while the third slash would be a typo on a multi-rooted system like Windows or VMS, it's pretty much mandatory on a single-rooted system that uses slash as a directory separator -- like, say, anything with Unix underpinnings.)
      • Just a thought, using something like vnc from a mobile device would make it more likely to happen since keyboards on most smartphones/tablets capitalize the first letter in anything it thinks is a sentence.

  • Tried this in every app I could think of and have had no issues (TextEdit, Komodo, iCal, Eclipse, Libra Office, Chrome, FireFox). Not calling shenanigans, but a specific example would be nice.
    • by Kenja ( 541830 ) on Saturday February 02, 2013 @07:16PM (#42774075)
      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.
    • I just crashed it in 10.8.2 by simply typing it (exactly as specified) into the document area in TextEdit.

  • by account_deleted ( 4530225 ) on Saturday February 02, 2013 @07:13PM (#42774047)
    Comment removed based on user account deletion
    • by Vreejack ( 68778 )

      That was sarcasm, right?
      Anyway, I have twelve examples of file:/// in my browser history, all of them automatically generated by scripts. If I ever meet a script that capitalizes "File" then we may be in trouble.

    • No one should ever need to type file:///
      There are no bugs. You're doing it wrong

      Yes, they are doing it wrong, by typing file:/// in lowercase, or not typing it at all. So the obvious question is: "how can I type it right for them?" If I include "File:///" in an email I send to a Mountain Lion user, will it crash his Mail.app? Or if someone quotes it in a reply here?

      That could become a cool little meme.

  • Sure enough (Score:2, Informative)

    by DaMattster ( 977781 )
    I tried it for myself with Google Chrome and Firefox and File:/// does crash the software. Very interesting!
  • So? (Score:5, Insightful)

    by Bogtha ( 906264 ) on Saturday February 02, 2013 @07:29PM (#42774149)

    First off, itâ(TM)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â(TM)s not exactly good news given that this is the latest release of Appleâ(TM)s operating system, which an increasing number of Mac users are switching to.

    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.

  • The cause, and a fix (Score:5, Informative)

    by rsteele19 ( 150541 ) on Saturday February 02, 2013 @07:29PM (#42774157) Homepage

    Landon Fuller has posted a gist on GitHub with an explanation of the bug and a binary patch to the affected library [github.com].

  • Running OS X 10.8.2 here, and I tried it in TextEdit, Mail, and Safari.. no crash.

    • Running 10.8.2 here also and it crashes in TextEdit when simply typing the text into the document - LOL!

      • Just to be sure, I type file:/// into TextEdit or a new Mail message or whatever and it's supposed to crash?

  • We have some text files from a Unix system named aux.something Trying to copy them or open them in Windows causes the whole system to grind to a halt.
  • Confirmed personally. OSX 10.8.2, 2011 mac mini. Entered the text into the search box in finder, crashed. It recovered fully in about 30 seconds though.
  • Tried it, capitals and all, no crash
  • by Wormholio ( 729552 ) on Saturday February 02, 2013 @07:47PM (#42774295)

    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!

  • by Dwedit ( 232252 ) on Saturday February 02, 2013 @07:47PM (#42774305) Homepage

    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.

  • I searched in the Finder (iMac running 10.8.2) and got nothing strange. I tried Chrome, Firefox, Safari, Mail, a few text editors ... nothing. Sorry.

    • 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. ;)

      • by EvanED ( 569694 )

        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.

  • didn't some thing like @sony crash mac os 6?

  • by Branka96 ( 628759 ) on Saturday February 02, 2013 @08:07PM (#42774447)
    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.
    • asserts are there to catch bugs. Not invalid user input or other conditions that you can predict and gracefully handle, but actual programmer bugs - mistakes in the logic of the program.

      If you ship your code with asserts disabled, you are, effectively, asserting that your code is bug-free. If you don't feel confident enough to make such a claim, then leaving them in there is a good idea - you lose a wee bit of perf, yes, but if things do go wrong, the user (and therefore you, when the user files a bug repor

  • It's encouraging that such a minor obscure bug makes a supposedly newsworthy article. That's progress. Back in the day almost anything could crash a Mac (or any other PC), including just leaving it on for a sufficiently long period, so the fact that a crash of this type makes news today shows how much progress we've made.
  • It is case sensitive (Score:4, Informative)

    by PhunkySchtuff ( 208108 ) <kai@automatic[ ]om.au ['a.c' in gap]> on Saturday February 02, 2013 @10:36PM (#42775115) Homepage

    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 [github.com] 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.

  • by PopeRatzo ( 965947 ) on Saturday February 02, 2013 @11:54PM (#42775459) Journal

    "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.

Support bacteria -- it's the only culture some people have!

Working...