Closed
Bug 101514
Opened 24 years ago
Closed 24 years ago
[FIX]crash when cancelling out of Print dialog
Categories
(Core :: Printing: Output, defect, P1)
Tracking
()
VERIFIED
DUPLICATE
of bug 101221
mozilla0.9.5
People
(Reporter: rods, Assigned: rods)
References
Details
(Keywords: crash, regression, Whiteboard: Fix in hand)
| Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Keywords: crash,
regression
Priority: -- → P1
Target Milestone: --- → mozilla0.9.5
| Assignee | ||
Comment 1•24 years ago
|
||
I can't figure out when this started or why it started.
| Assignee | ||
Comment 2•24 years ago
|
||
It start with mkaply's check in 1.148 of the nsDocumentViewer.cpp for
Roland.Mainz@informatik.med.uni-giessen.de.
The problem is these lines:
factory->CreateDeviceContextSpec(mWindow, devspec, aSilent);
if (nsnull != devspec) {
got changed to:
rv = factory->CreateDeviceContextSpec(mWindow, devspec, aSilent);
if (NS_SUCCEEDED(rv)) {
And on Window the CreateDeviceContextSpec call is not passing back error codes.
THIS SHOULD HAVE BEEN TESTED ON Windows before being checked in, Don should have
done that before giving it an r=
The solution is for the factory to pass back the correct error codes which will
also help with Bug 101289.
Here is the patch:
Index: nsDeviceContextSpecFactoryW.cpp
===================================================================
RCS file: /cvsroot/mozilla/gfx/src/windows/nsDeviceContextSpecFactoryW.cpp,v
retrieving revision 3.20
diff -u -r3.20 nsDeviceContextSpecFactoryW.cpp
--- nsDeviceContextSpecFactoryW.cpp 2001/09/18 22:02:30 3.20
+++ nsDeviceContextSpecFactoryW.cpp 2001/09/25 12:24:12
@@ -653,7 +653,11 @@
//don't free the DEVMODE because the device context spec now owns it...
::GlobalUnlock(prntdlg.hDevNames);
::GlobalFree(prntdlg.hDevNames);
+ } else {
+ rv = NS_ERROR_FAILURE;
}
+ } else {
+ rv = NS_ERROR_ABORT;
}
return rv;
| Assignee | ||
Updated•24 years ago
|
Summary: crash when cancelling out of Print dialog → [FIX]crash when cancelling out of Print dialog
Whiteboard: Fix in hand
Comment 3•24 years ago
|
||
> THIS SHOULD HAVE BEEN TESTED ON Windows before being checked in, Don should
> have done that before giving it an r=
The patch was tested on windows (printing itself works), however noone of us
tested the "cancel the print dialog" codepath on windows (I don't have a Win32
build machine myself)... looks I blindly trusted that the tester checked that,
too ...
_SORRY_ ... ;-(
Comment 4•24 years ago
|
||
Uhm... isn't this a DUPLICATE of bug 101221 ("regression: cancelling printing a
page crashes - Trunk [@ nsDeviceContextWin::GetDeviceContext") ?
| Assignee | ||
Comment 5•24 years ago
|
||
Roland, thanks for the dup, I am behind on looking at the bugs I am copied on.
*** This bug has been marked as a duplicate of 101221 ***
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Comment 6•24 years ago
|
||
rods:
bug 101221 has already a sr=kin, I only need an r= from you and someone who
checks the patch "in", please ...
You need to log in
before you can comment on or make changes to this bug.
Description
•