Safari 3.1.1 SWF+@font-face Bug #18953

We discovered a crashing bug that arose with Safari 3.1.1 on Windows and the Mac. This is the scenario:

  1. Clear the cache
  2. Visit a page that has a SWF with no @font-face rule applied (although it does exist in the stylesheet)
  3. Then visit another page, with the same stylesheet, that does have a @font-face applied (presence of a SWF does not matter).
  4. Safari crashes.

The crash does not happen, however, if the page with the @font-face is loaded first (with or without the SWF) and then a page. The crash does not happen either if the page with the SWF does not have a stylesheet with the @font-face rule, or if it does have the @font-face rule in the stylesheet and the rule is applied to text on the page.

The following sequences (of visiting the numbered pages below) cause Safari to crash:

If you start with 2 or 3 (a page that has @font-face applied to text), then a crash does not occur no matter what subsequent page is visited. Remember to clear the cache before trying each sequence.

  1. Page with SWF
  2. Page with Web Font
  3. Page with SWF and Web Font
  4. Page with SWF and no Stylesheet

The general condition for the crash to occur is to:

  1. visit a page with a SWF and a stylesheet containing a @font-face rule which does not get applied to any text in the page
  2. then visit any page (with or without SWF) that then applies that @font-face rule to any text and the crash will occur

Weston Ruter, Shepherd Interactive
May 2008