The default bug view has changed. See this FAQ.

MFCEmbed - Print Preview crashes browser

VERIFIED FIXED

Status

()

Core
Embedding: APIs
VERIFIED FIXED
15 years ago
15 years ago

People

(Reporter: amutch, Assigned: rods (gone))

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

15 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.8) Gecko/20020204
BuildID:    MFCEmbed nightly build 20020220

Selecting Print Preview crashes the browser

Reproducible: Always
Steps to Reproduce:
1. Select File - Print Preview


Actual Results:  Browser crashes with an error reported in gkgfxwin.dll


Expected Results:  Browser should display web page in Print Preview mode.

This has been happening in builds for at least a week.

Comment 1

15 years ago
-> Chak
Assignee: adamlock → chak

Comment 2

15 years ago
Printing related.

->rods
Assignee: chak → rods

Comment 3

15 years ago
The problem is in the CreateBrowser function:

http://lxr.mozilla.org/seamonkey/source/embedding/tests/mfcembed/BrowserView.cpp#271

nsCOMPtr<nsIWebBrowserPrint> print(do_GetInterface(mWebBrowser));
if (print) {
   print->GetNewPrintSettings(getter_AddRefs(m_PrintSettings));
}

"print" is always null.  Perhaps the nsIWebBrowserPrint stuff hasn't been
created/initialized at this point.

One quick hack is to simply add a check for m_PrintSettings in each of the
functions that use it (OnFilePrint, OnFilePrintPreview, and OnFilePrintSetup):

// Get the printer settings
if (!m_PrintSettings)
   print->GetNewPrintSettings(getter_AddRefs(m_PrintSettings));

but I think a cleaner solution would be best.


This is also relevant to bug 126976

Updated

15 years ago
QA Contact: mdunn → depstein
(Reporter)

Comment 4

15 years ago
This seems to be working in MFCEmbed 4/28/2002 nightly build. 

Comment 5

15 years ago
per amutch this bug is fixed. wfm on NT.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED

Comment 6

15 years ago
per amutch, not crashing on XP, verified. Mozilla 1.1a Gecko/20020607 build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.