Closed Bug 365578 Opened 18 years ago Closed 17 years ago

Print Preview crashes on any URL in gtk2 builds

Categories

(Core :: Print Preview, defect)

x86
Linux
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

References

()

Details

(Keywords: crash, regression)

Attachments

(3 files)

Print Preview crashes on any URL in gtk2 builds. That is 
ac_add_options --enable-default-toolkit=gtk2
(cairo-gtk2 is not affected)

STEPS TO REPRODUCE
1. load about:blank (or any URL) in a gtk2 build
2. File->Print Preview

ACTUAL RESULT
crash, 100% reproducible

PLATFORMS AND BUILDS TESTED
Bug occurs in SeaMonkey 2006-12-10-01 on Linux
Bug does not occur in SeaMonkey 2006-12-09-01 on Linux
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2006-12-09+00%3A01&maxdate=2006-12-10+02%3A00&cvsroot=%2Fcvsroot
Likely a regression from bug 361844.
Attached file stack #1
We crash because nsRenderingContextGTK::mFontMetrics is really a
nsFontMetricsPS although we have casted it to be a nsIFontMetricsGTK...
Attached file stack #2
... the reason for this is that we have a lingering 'mAltDC' that is a 
nsDeviceContextPS when we call nsRenderingContextGTK::SetFont, so we get
a PS font metrics.
Attached patch Patch rev. 1Splinter Review
Reset 'mAltDC' when we finish Print Preview.
Attachment #250090 - Flags: review?(sharparrow1)
Attachment #250090 - Flags: superreview?(roc)
Attachment #250090 - Flags: review?(sharparrow1)
Attachment #250090 - Flags: review?(roc)
Attachment #250090 - Flags: superreview?(roc)
Attachment #250090 - Flags: superreview+
Attachment #250090 - Flags: review?(roc)
Attachment #250090 - Flags: review+
Checked in to trunk at 2007-01-26 10:26 PST.

-> FIXED
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: