Skip to content
This repository

Strange Safari 5.1 Bug #183

Closed
andrewlphilpott opened this Issue · 10 comments

4 participants

Andrew Philpott Tyler Akins Jared Verdi Andrew Dupont
Andrew Philpott

Is anybody having issues with Uniform in Safari 5.1? I'm having the strangest problem and the weird thing is it only happens on one site and it only happens in 5.1 and there are no JS errors.

Here are the details summed up:

A page I'm working on has a form that just has three select elements that are styled with Uniform. In Safari 5.1, if you click on one of those styled elements, the page refreshes itself. Then, it gets even weirder. If you have more than one tab open when this happens and you go to another tab, that tab will also refresh itself.

The only fix I've found is disabling Uniform. I'm pretty sure I'm not crazy, because I've had 3 other people test it on different machines and they all experienced the same thing.

Jared Verdi

I can confirm that I am experiencing the same issue with uniform in Safari 5.1.

For me it is occurring when clicking on a select drop-down.

Andrew Philpott

Thanks, jverdi. It's good to know I'm not alone. Are you running Lion? I haven't tested it in Safari 5.1 on Snow Leopard.

Jared Verdi

Yes, I hit the same issue running on Lion, in Safari 5.1 (7534.48.3).

Jared Verdi

Narrowed this bug a bit further... it occurs for me only when using a custom font-face, and that font is assigned to the select element.

In my particular case, removing the following css rule stopped the crash from occurring:
div.selector select { font-family:'CartoGothicStdBook', Arial, sans-serif !important; }

Jared Verdi

Here's a simplified test case: http://jsfiddle.net/qWbSk/

Andrew Philpott

Ahh, nice find! I'm using a custom font on the page that I'm having this issue with too. Are you using a font service, or are you just embedding a font? I'm using webfonts.fonts.com

Jared Verdi

I'm just embedding myself with a font-face kit from Font Squirrel -- but in that test case I'm using Google Web Fonts. It seems to be a problem either way.

Andrew Dupont

Safari 5.1 uses a separate process (called "Safari Web Content") to render page content. You're seeing the tabs refresh themselves because that process is crashing.

Open up @jverdi's test case, then open Activity Monitor and note the PID of the "Safari Web Content" process. Then run the test case, trigger the page reload, and notice that the process is dead; a new rendering process with a different PID has taken its place. That's why it affects the other tabs as well. I'm still using Snow Leopard, so I can confirm this isn't just a Lion thing.

Now, that's not really an answer, because there's no good reason why this example should crash anything. But here's the log. You can find your own crash logs in ~/Library/Logs/CrashReporter. I'm no Cocoa expert, but this appears to be a memory allocation issue within Safari, one triggered by the specific combination of things that Uniform is doing here.

Andrew Dupont

I tried the test case with a WebKit nightly (August 20th) and there's no crash. I hope they do a bugfix release for Safari 5.1 soon. It's sorely needed.

Tyler Akins
Collaborator

It sounds like the consensus is that this is actually a bug in Safari and that a process is crashing. I'm closing this issue, but will add information about the problem to the README file ini case others have Safari 5.1 with custom fonts. If anyone has a compelling reason for why the issue should be kept open or if they have some trick up their sleeves that helps keep the browser alive, I'd love to hear about it.

Tyler Akins fidian closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.