about standards, webdesign, usability and open source

How to stop Safari from constantly crashing

If you installed Safari on a non-English version of Windows you are probably experiencing quite a lot of crashes. There are many ways to crash the browser: enter text into a form field, add a bookmark or ironically even when you try to report a bug. Luckily it is easy to fix.

After hanging out at #webkit most of the day I know I am not the only one affected by this bug. The one thing that was common between all of these people? They were using a non-English version of Windows.

The problem occurs because there is a bug in Safari that causes a crash when it needs to display some localized information and fails to find the correct localisation information. Given that the beta version only comes with English localisation files, it will crash on any non-English system.

To fix this you need find the location of the directory in which you installed Safari. Usually this is C:\Program Files\Safari.

Then find all English.lproj folders, duplicate them and rename the duplicate to Your language.lproj. On my system I renamed them to Dutch.lproj. German users will need to rename them to German.lproj and French users to French.lproj.

Next find all the en.lproj folders, duplicate them and rename the duplicate to Your isocode.lproj. On my system I renamed them to nl.lproj. German users will need to rename them to de.lproj and french users to fr.lproj.

These are the directories that you must duplicate and rename:

  • CFNetwork.resources/English.lproj
  • PubSub.resources/English.lproj
  • CoreFoundation/en.lproj
  • Safari.resources/en.lproj
  • WebKit.resources/en.lproj

This will ensure that Safari can find localisation files for the language that you are using. They are not the proper files for your language – the browser is still English-only for now, but at least it stops Safari from crashing.

There is also a separate, unrelated rendering issue that users of non-English versions of Windows are experiencing. The solution above does not affect this issue, so Safari is still not really useful on Windows. Given that the WebKit team already announced that they are going to offer nightly builds for Windows I guess this problem will also soon disappear.

Update: I also found a fix for the rendering problem. You can fix this by changing a setting in the Regional and Language Options control panel. Go to the tab Advanced and select English (United States). Now restart and the rendering should be okay. If it isn’t try restarting again, I also had to restart twice.

An updated beta version for both of these show-stopper bugs would be nice too!

6 Responses to “How to stop Safari from constantly crashing”

  1. webkit.org wrote on June 12th, 2007 at 4:02 am

    Safari 3.0 Beta!: As you have no doubt heard by now, the Safari 3 Public Beta is now available for OS X and (surprise!) for Windows XP and Vista. We’re very excited to be bringing the WebKit engine to Windows. CSS shadows, border images, multiple backgrounds, outlines, SVG, AJAX-y goodness, it’s all there! What does this mean for WebKit? Well, it means that we’re making the leap in a big way to another platform,…

  2. Arjan Eising wrote on June 12th, 2007 at 4:55 pm

    When I rename every folder, and restart Safari, an installer will launch and kind of ‘restores’ the old folders…

  3. Alexander wrote on June 13th, 2007 at 5:23 am

    @Arjan Eising:
    Try the “Read-only” option on the folders and files?

  4. Mikael wrote on June 13th, 2007 at 3:22 pm

    “They were using a non-English version of Windows.”

    False. I’m using english windows XP and safari still crashes when trying to add bookmark.

    Also bolded text’s are invisible.

    Though, it’s not crashing THAT much. :-)

  5. Riccardo wrote on June 13th, 2007 at 8:05 pm

    thanks a lot.
    I can post this in Safari at last =)

  6. rakaz wrote on June 13th, 2007 at 9:43 pm

    Mikael: The problem is not limited to non-English versions of Windows. It can also occur on English versions of Windows that are set to a different locale. I guess that is what happening to you.