Closed
Bug 95339
Opened 23 years ago
Closed 23 years ago
Choosing File/Print crashes MfcEmbed
Categories
(Core Graveyard :: Embedding: APIs, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla0.9.4
People
(Reporter: chak, Assigned: dcone)
Details
(Keywords: crash)
Attachments
(1 file)
633 bytes,
patch
|
Details | Diff | Splinter Review |
1. Go to any URL 2. Choose File/Print 3. MfcEmbed crashes. Here's the stack trace: nsWebBrowser::Print(nsWebBrowser * const 0x00cbc030, nsIDOMWindow * 0x02fe054c, nsIPrintOptions * 0x00000000, nsIPrintListener * 0x031ad938) line 1592 + 7 bytes CPrintProgressDialog::DoModal() line 181 + 50 bytes CBrowserView::OnFilePrint() line 941 _AfxDispatchCmdMsg(CCmdTarget * 0x00cd9164 {CBrowserView hWnd=0x03620274}, unsigned int 57607, int 0, void (void)* 0x004012f8 CBrowserView::OnFilePrint(void), void * 0x00000000, unsigned int 12, AFX_CMDHANDLERINFO * 0x00000000) line 88 CCmdTarget::OnCmdMsg(unsigned int 57607, int 0, void * 0x00000000, AFX_CMDHANDLERINFO * 0x00000000) line 302 + 39 bytes CBrowserFrame::OnCmdMsg(unsigned int 57607, int 0, void * 0x00000000, AFX_CMDHANDLERINFO * 0x00000000) line 273 + 37 bytes CWnd::OnCommand(unsigned int 57607, long 0) line 2088 CFrameWnd::OnCommand(unsigned int 57607, long 0) line 321 CWnd::OnWndMsg(unsigned int 273, unsigned int 57607, long 0, long * 0x0012fd10) line 1597 + 28 bytes CWnd::WindowProc(unsigned int 273, unsigned int 57607, long 0) line 1585 + 30 bytes AfxCallWndProc(CWnd * 0x00cd8e40 {CBrowserFrame hWnd=0x030e0218}, HWND__ * 0x030e0218, unsigned int 273, unsigned int 57607, long 0) line 215 + 26 bytes AfxWndProc(HWND__ * 0x030e0218, unsigned int 273, unsigned int 57607, long 0) line 368 AfxWndProcBase(HWND__ * 0x030e0218, unsigned int 273, unsigned int 57607, long 0) line 220 + 21 bytes USER32! 77e13eb0() USER32! 77e1401a() USER32! 77e192da() CWinThread::Run() line 487 + 11 bytes CWinApp::Run() line 400 AfxWinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x001330d0, int 10) line 49 + 11 bytes WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x001330d0, int 10) line 30 WinMainCRTStartup() line 330 + 54 bytes KERNEL32! 77e87903()
Comment 1•23 years ago
|
||
Don, Your recent checkin 1.90: PRBool silent = PR_FALSE; aThePrintOptions->GetPrintSilent (&silent); Doesn't check to see if "aThePrintOptions" print options is null Here is the patch: Index: nsWebBrowser.cpp =================================================================== RCS file: /cvsroot/mozilla/embedding/browser/webBrowser/nsWebBrowser.cpp,v retrieving revision 1.92 diff -u -r1.92 nsWebBrowser.cpp --- nsWebBrowser.cpp 2001/07/25 07:51:12 1.92 +++ nsWebBrowser.cpp 2001/08/15 14:33:22 @@ -1589,8 +1589,10 @@ nsresult rv = NS_OK; nsCOMPtr<nsIDOMWindow> thisDOMWin; PRBool silent = PR_FALSE; - aThePrintOptions->GetPrintSilent (&silent); - + + if (aThePrintOptions) { + aThePrintOptions->GetPrintSilent (&silent); + } // XXX this next line may need to be changed // it is unclear what the correct way is to get the document.
Assignee: rods → dcone
Target Milestone: --- → mozilla0.9.4
Assignee | ||
Comment 2•23 years ago
|
||
Comment 3•23 years ago
|
||
Looks good. r=rods
Comment 4•23 years ago
|
||
OK, sorry but, why is aThePrintOptins ever null? Is that legal? Of course, checking for null is generally safe and healthy, but if it should never BE null then we need to figure out why it is first, no?
Comment 5•23 years ago
|
||
rods says that it is OK for the printOptins to be null - please document that in the IDL so others will have a clue. sr=attinasi
Assignee | ||
Comment 6•23 years ago
|
||
fixed
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•23 years ago
|
QA Contact: mdunn → bmartin
Updated•5 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•