Strange Bug Causes Instant App Crashes in Mac OS X by Typing File:///

Feb 2, 2013 - 21 Comments

Crash a Mac App

An unusual Mac bug has surfaced in OS X that causes any application to immediately crash just by typing a short character sequence.

The bug was first reported on OpenRadar and is thought to relate to the spell checking and autocorrection features, though the bug is also replicable in prior versions of Mac OS X suggesting that may not be the case.

If for some reason you want to try this out yourself, just type the following short string into any OS X app that has a text entry field:

File:///

The app will instantly crash, and because newer versions of OS X restore windows on re-open, it can lead to some pretty odd crash loops. The potential for crashing problems is made even worse with apps that sync across to other Macs, like Notes and iMessage, and can actually cause those apps to crash on other Macs.

To test this without the threat of an infinite app crash loop, you can do something like the following:

  • Go to /Applications/ and make a copy of TextEdit.app, renaming the copy to something like “CrashEdit”
  • TextEdit

  • Open both TextEdit apps, but in the copied “CrashEdit” version create a new text file and type the magic crash triple slash
  • After CrashEdit.app has demonstrated the bug by crashing, create a new text document in the original concurrently open TextEdit app to rewrite over the crash-prone save state
  • Delete the CrashEdit.app

Quitting and reopening TextEdit may still contain the File:// crash entry, but so long as you do not place the cursor next to it and hit return you will be able to close that file and avoid any issues.

Technically, File:// followed quickly by any other character other than space makes the crash occur, but the triple /// is what is mentioned in the OpenRadar report.

The brief video below demonstrates the bug bringing down TextEdit:

There is some potential for nefarious misuse and even theoretical DOS attacks from websites that typed the syntax into a text field, but that shouldn’t be a widespread concern.

The unusual bug is gaining significant attention after it appeared on HackerNews and 9to5mac, and it will likely be patched by Apple quickly. If the patch will arrive separately or as part of OS X 10.8.3 remains to be seen, but 10.8.3 is nearing the end of it’s beta development cycle and could easily include a fix before the public release.

.

Related articles:

Posted by: Paul Horowitz in Mac OS, News

21 Comments

» Comments RSS Feed

  1. jji7skyline says:

    Doesn’t work on Lion.

  2. Mac says:

    This is a pretty embarrassing bug. I mean, if this happened on Windows, we’d never let them hear the end of it.

    • Brock says:

      We should not let Apple hear the end of it, either.
      They have been steadily moving away from quality and robustness and into the realm of “toys ‘n’ candy”.

  3. Lexxie says:

    Try F:// and then type directly abc behind the two slashes

  4. Robbertvdd says:

    Now I’m wondering how Paul wrote this article. Did he have to use Windows? :P

  5. Jon says:

    Send ‘file:///’ with a capital F to anyone using messages app on ML and it crashes ^_^

  6. Theo Vosse says:

    It certainly works in Safari under 10.8.2. Slashdot says it’s in ML’s data detector functions.

  7. My best guess is its an interaction between URL checking and spelling checking. Without a capital, file: starts a URL, and that should turn off spelling checks. With a capital, it may not be interpreted as a URL, and the spelling checker may try to be clever and turn it into lowercase f, prompting the URL checker to kick in when it’s not properly initialized.

    More here: https://www.facebook.com/groups/138255792868316/permalink/596570993703458/?comment_id=596636487030242

  8. HeartMan says:

    I’m running 10.8.2. In TextEdit it only crashes sometimes. I really have to annoy TextEdit to crash.

  9. Carl says:

    I can make this happen on every app I’ve tried, except for when typing in the search field of Reeder. That’s a bit odd.

  10. Hi

    I’m running 10.6.8 – and no crash on me in textedit neither writing File, nor file etc makes anu diffence.

    /S

  11. Ade says:

    I’ve just been typing File:/// all over the place and nothing has crashed yet. I want my money back.

  12. Ken says:

    Sorry, quit the app with OPT+CMD+Q so that it forgets its previous state the next time it launches. Not SHIFT.

  13. Ken says:

    You can eliminate the previous state of an app either at launch or on quit.

    If an app crashes, hold down SHIFT as you launch the app the second time. (For example, hold down the shift key as you double-click on a document that comes up in that app.)

    You can quit an app with SHIFT+CMD+Q so that the next time it’s launched, it won’t restore its previous state.

  14. Mike says:

    Funnily it will also crash the error reporter that comes up after the crash if you try to type it in the comments to indicate how to reproduce the problem.

    • Robert says:

      You could always describe it a little differently. When you type “File:” and add three forward slashes “///” after the colon it crashes everything.

  15. carlo says:

    I am sure Apple has been made aware of this problem and a solution will be included in either a security update or general OS X update next week. There is too much room for trouble here, they will fix it quickly.

  16. db says:

    While I am not allowed to confirm anything because it’s still an unreleased product… I can tell you that 10.8.3 (12D61) the “final candidate” version still has the bug.

    Apple’s new norm? If it complies we ship it… We’ll see I guess

  17. Dino Trudel says:

    hmmm does this only work on ML? I have 10.7.5 and its not happening here :(

  18. parakeet says:

    If you DO try this in an iCloud app like Messages, you can fix the loop by trashing plist files for that app in ~/Library/Preferences/

    com.apple.iChat.plist

    com.apple.imessage.plist

    com.apple.Notes.plist

    com.apple.TextEdit.plist

    etc

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site