Closed Bug 424398 Opened 16 years ago Closed 16 years ago

Crash when installing a font when the browser is running

Categories

(Core :: Graphics, defect, P2)

x86
Windows XP
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: polidobj, Assigned: pavlov)

Details

(Keywords: crash, hang)

Attachments

(1 file)

I see some things happening when I install a font into Windows when the browser is running.  First the browser hangs when the font is installed. Second the font used in the menu changed.  I was using a san-serif font.  And the font changed to a serif font.  And another time I crashed when doing installing a font.  

STR:
1. Run the browser.
2. Install font - drag/drop or copy/paste a font to the windows font directory - or use File->Install New Font... from windows explorer when viewing the fonts directory.  

bp-4f5ae863-f772-11dc-afef-001a4bd43ef6

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b5pre) Gecko/2008032106 Minefield/3.0b5pre ID:2008032106
Assignee: nobody → pavlov
Flags: blocking1.9+
Priority: -- → P2
Attached patch fixSplinter Review
This should fix the problem.

I changed 2 real things here:
One, We no longer hold a weak reference to the FontFamily.  When you install new fonts the FontEntry could be held on to but the FontFamily could get deleted.  Instead we store the face name (which in most cases currently will be the same as the FontFamily's name) which is the only thing that is needed from the family.  The Face name could be different, so this is the right change anyways.

Secondly, on installing new fonts we clear out the font cache so that you won't get gfxWindowsFonts holding on to stale FontEntries
Attachment #311047 - Flags: review?(vladimir)
Attachment #311047 - Flags: approval1.9b5?
Comment on attachment 311047 [details] [diff] [review]
fix

a=beltzner, with the usual reminder to add some tests for this if you could!
Attachment #311047 - Flags: approval1.9b5? → approval1.9b5+
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
verified fixed with a test font installation and the steps to reproduce from comment #0 using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008041217 Minefield/3.0pre ID:2008041217

--> Verified fixed
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: