Firefox crashes when cancelling printing since checkin of bug 414314

RESOLVED FIXED

Status

()

RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

({crash})

Trunk
x86
Linux
crash
Points:
---
Bug Flags:
blocking1.9 +
in-litmus +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

11 years ago
Created attachment 303123 [details] [diff] [review]
fix

Steps to reproduce:
  - Ctrl-P to make print dialog appear
  - Click cancel
**crash** in nsDeviceContextSpecGTK::~nsDeviceContextSpecGTK

This is happening because mGtkPageSetup and mGtkPrintSettings are never getting initialized, so they have bogus values (0xa5a5a5a5 I think), and the patch for bug 414314 (understandably) assumes that anything non-null is valid.

Attaching a simple fix, which just initializes these values to nsnull.  It fixes the crash.

The patch also makes a few cosmetic s/NULL/nsnull/ changes to the same file, to match our convention.
Attachment #303123 - Flags: superreview?(roc)
Attachment #303123 - Flags: review?(roc)
(Assignee)

Updated

11 years ago
Summary: Firefox crashes when cancelling printing since checkin of 414314 → Firefox crashes when cancelling printing since checkin of bug 414314
(Assignee)

Updated

11 years ago
Component: Printing → Widget: Gtk
(Assignee)

Updated

11 years ago
Blocks: 414314
Flags: blocking1.9?
Comment on attachment 303123 [details] [diff] [review]
fix

You can just take out the null-setters in the destructor, they're pointless.
Attachment #303123 - Flags: superreview?(roc)
Attachment #303123 - Flags: superreview+
Attachment #303123 - Flags: review?(roc)
Attachment #303123 - Flags: review+
(Assignee)

Comment 2

11 years ago
Created attachment 303137 [details] [diff] [review]
fix for landing (with null-setters in destructor removed)
Attachment #303123 - Attachment is obsolete: true
Attachment #303137 - Flags: superreview+
Attachment #303137 - Flags: review+
Flags: blocking1.9? → blocking1.9+
QA Contact: printing → gtk
(Assignee)

Comment 3

11 years ago
"fix for landing" checked in last night.  Closing.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED

Updated

11 years ago
Flags: in-litmus?
https://litmus.mozilla.org/show_test.cgi?id=5276 added to Litmus.
Flags: in-litmus? → in-litmus+
You need to log in before you can comment on or make changes to this bug.