Closed
Bug 136053
Opened 23 years ago
Closed 23 years ago
A crash occurs if you try to print to a file in a directory where you do not have write permissions [@ nsPostScriptObj::finalize_translation]
Categories
(Core :: Printing: Output, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.0
People
(Reporter: andre.bugs2, Assigned: roland.mainz)
References
Details
(Keywords: crash, regression)
Crash Data
Attachments
(1 file)
479 bytes,
patch
|
Details | Diff | Splinter Review |
[Build-ID: 2002-04-07-13]
This bug is spun off from bug 136036.
It appears as if bug 34706 has regressed, because printing to a file in a
directory where you do not have write permissions will cause mozilla to crash.
Talkback ID is: TB4918385Y
Steps to reproduce:
1) Go to about:blank (or any page) and select File->Print...
2) Check the File radio button after "Print To:".
3) Enter a path to a file in a directory where you don't have write permissions
(eg /usr/local/mozilla/file.ps) in the textfield after "File:".
4) Press Print
Result: Mozilla will crash.
Reporter | ||
Comment 1•23 years ago
|
||
Roland asked me to assign this to him, which I forgot at first.
Assignee: rods → Roland.Mainz
Reporter | ||
Comment 2•23 years ago
|
||
Add rods to CC-list.
Reporter | ||
Updated•23 years ago
|
Keywords: crash,
regression
Assignee | ||
Comment 3•23 years ago
|
||
Can anyone please pull the stack trace from the TalkBack report and attach it
here ?
Updated•23 years ago
|
Severity: normal → critical
nsPostScriptObj::finalize_translation()
nsPostScriptObj::~nsPostScriptObj()
nsDeviceContextPS::~nsDeviceContextPS()
DeviceContextImpl::Release()
nsDeviceContextPS::Release()
nsCOMPtr_base::~nsCOMPtr_base()
nsDeviceContextGTK::GetDeviceContextFor()
DocumentViewerImpl::Print()
XPTC_InvokeByIndex()
XPCWrappedNative::CallMethod()
XPC_WN_CallMethod()
js_Invoke()
js_Interpret()
js_Invoke()
js_InternalInvoke()
JS_CallFunctionValue()
nsJSContext::CallEventHandler()
nsJSEventListener::HandleEvent()
nsEventListenerManager::HandleEventSubType()
nsEventListenerManager::HandleEvent()
nsXULElement::HandleDOMEvent()
PresShell::HandleDOMEventWithTarget()
nsMenuFrame::Execute()
nsMenuFrame::HandleEvent()
PresShell::HandleEventInternal()
PresShell::HandleEvent()
nsViewManager::HandleEvent()
nsView::HandleEvent()
nsViewManager::DispatchEvent()
HandleEvent()
nsWidget::DispatchEvent()
nsWidget::DispatchWindowEvent()
nsWidget::DispatchMouseEvent()
nsWidget::OnButtonReleaseSignal()
nsWindow::HandleGDKEvent()
dispatch_superwin_event()
handle_gdk_event()
libgdk-1.2.so.0 + 0x17457 (0x40344457)
libglib-1.2.so.0 + 0x104d8 (0x403744d8)
libglib-1.2.so.0 + 0x10ae3 (0x40374ae3)
libglib-1.2.so.0 + 0x10c7c (0x40374c7c)
libgtk-1.2.so.0 + 0x8d7e7 (0x402957e7)
nsAppShell::Run()
nsAppShellService::Run()
main1()
main()
libc.so.6 + 0x1d6cf (0x404b86cf)
Assignee | ||
Comment 5•23 years ago
|
||
OK, I can reproduce it:
-- snip --
WEBSHELL- = 4
Reading libgfxps.so
t@1 (l@1) signal SEGV (no mapping at the fault address) in
nsPostScriptObj::finalize_translation at line 507 in file "nsPostScriptObj.cpp"
507 free(mPrintContext->prSetup);
(/opt/SUNWspro/FD7/bin/../YNH/bin/sparcv9/dbx) where
current thread: t@1
=>[1] nsPostScriptObj::finalize_translation(this = 0x334608), line 507 in
"nsPostScriptObj.cpp"
[2] nsPostScriptObj::~nsPostScriptObj(this = 0x334608), line 207 in
"nsPostScriptObj.cpp"
[3] nsDeviceContextPS::~nsDeviceContextPS(this = 0x8145a0), line 93 in
"nsDeviceContextPS.cpp"
[4] __SLIP.DELETER__A(0x8145a0, 0x1, 0xff362520, 0x0, 0x0, 0x0), at 0xfb016ea0
[5] DeviceContextImpl::Release(this = 0x8145a0), line 37 in
"nsDeviceContext.cpp"
[6] nsDeviceContextPS::Release(this = 0x8145a0), line 139 in
"nsDeviceContextPS.cpp"
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-04-05-08-trunk/objdir_ws7ea2_gtk/xpcom/build/nsCOMPtr.o"
dbx: warning: see `help finding-files'
[7] nsCOMPtr_base::~nsCOMPtr_base(0xffbec920, 0x6a8c7c, 0xffbec878,
0xffbec968, 0x6572, 0x0), at 0xff0d1648
[8] nsCOMPtr<nsIDeviceContextPS>::~nsCOMPtr(0xffbec920, 0x6a8c78, 0xffbec968,
0xffbecaa4, 0xffbec8f4, 0x703558), at 0xfc53cd1c
[9] nsDeviceContextGTK::GetDeviceContextFor(this = 0x59dd20, aDevice =
0x6a8c78, aContext = (nil)), line 546 in "nsDeviceContextGTK.cpp"
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-04-05-08-trunk/objdir_ws7ea2_gtk/content/build/nsDocumentViewer.o"
[10] DocumentViewerImpl::Print(0x6e50b0, 0x7e3b60, 0xffbeca50, 0xffbeca3c,
0xffbeca28, 0x59dd20), at 0xfcd5e5bc
[11] XPTC_InvokeByIndex(0x6e50c0, 0x10, 0x2, 0xffbeccb8, 0x80000000,
0x80000001), at 0xff0a7dd8
[12] XPCWrappedNative::CallMethod(ccx = CLASS, mode = ???) (optimized), at
0xfe17009c (line ~2024) in "xpcwrappednative.cpp"
[13] XPC_WN_CallMethod(cx = ???, obj = ???, argc = ???, argv = ???, vp = ???)
(optimized), at 0xfe17c3b8 (line ~1266) in "xpcwrappednativejsops.cpp"
[14] js_Invoke(cx = ???, argc = ???, flags = ???) (optimized), at 0xff1cabec
(line ~788) in "jsinterp.c"
[15] js_Interpret(cx = ???, result = ???) (optimized), at 0xff1d70dc (line
~2745) in "jsinterp.c"
[16] js_Invoke(cx = ???, argc = ???, flags = ???) (optimized), at 0xff1cac60
(line ~805) in "jsinterp.c"
[17] js_InternalInvoke(cx = ???, obj = ???, fval = ???, flags = ???, argc =
???, argv = ???, rval = ???) (optimized), at 0xff1caef8 (line ~880) in
"jsinterp.c"
[18] JS_CallFunctionValue(cx = ???, obj = ???, fval = ???, argc = ???, argv =
???, rval = ???) (optimized), at 0xff19edf4 (line ~3412) in "jsapi.c"
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-04-05-08-trunk/objdir_ws7ea2_gtk/dom/src/build/nsJSEnvironment.o"
[19] nsJSContext::CallEventHandler(0x1c8208, 0x32fb18, 0x32fb28, 0x1,
0xffbed894, 0xffbed55c), at 0xfc2bcd38
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-04-05-08-trunk/objdir_ws7ea2_gtk/dom/src/build/nsJSEventListener.o"
[20] nsJSEventListener::HandleEvent(0x3bc608, 0x6ca498, 0x0, 0xffbed894,
0x80000000, 0xffbed61c), at 0xfc32bb54
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-04-05-08-trunk/objdir_ws7ea2_gtk/content/build/nsEventListenerManager.o"
[21] nsEventListenerManager::HandleEventSubType(0xffbed910, 0x3b6898,
0x6ca498, 0x3bc608, 0x1c5220, 0xfc32b4b0), at 0xfc9b3880
[22] nsEventListenerManager::HandleEvent(0x2fbdf8, 0x0, 0xffbee598,
0xffbee3e8, 0x2fbdc0, 0x0), at 0xfc9b6344
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-04-05-08-trunk/objdir_ws7ea2_gtk/content/build/nsXULElement.o"
[23] nsXULElement::HandleDOMEvent(0x2fbdb8, 0x2cd978, 0xffbee598, 0xffbede94,
0x0, 0xffbee5e0), at 0xfcc0df58
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-04-05-08-trunk/objdir_ws7ea2_gtk/layout/build/nsPresShell.o"
[24] PresShell::HandleDOMEventWithTarget(0x2ceab8, 0x2fbdb8, 0xffbee598,
0xffbee5e0, 0x2fd7a0, 0xfb9e5c74), at 0xfb9e5d18
dbx: warning: can't find file
"/shared/bigtmp2/mozilla/2002-04-05-08-trunk/objdir_ws7ea2_gtk/layout/build/nsMenuFrame.o"
[25] nsMenuFrame::Execute(0x7520b8, 0x1fc808, 0xffbee4f4, 0x2ceab8,
0xffbee4d4, 0xffbee58c), at 0xfbb65c5c
[26] nsMenuFrame::HandleEvent(0x7520b8, 0x2cd978, 0x0, 0x0, 0x12d, 0x6a0c04),
at 0xfbb617a8
[27] PresShell::HandleEventInternal(0x2ceab8, 0xffbeec50, 0x6e7960, 0x1,
0xffbee89c, 0xfbe196fc), at 0xfb9e5bfc
[28] PresShell::HandleEvent(0x2ceab8, 0x6e7960, 0xffbeec50, 0xffbee89c, 0x0,
0xffbee894), at 0xfb9e57c0
[29] nsViewManager::HandleEvent(this = ???, aView = ???, aEvent = ???,
aCaptured = ???) (optimized), at 0xfbe8a08c (line ~2063) in "nsViewManager.cpp"
[30] nsView::HandleEvent(this = ???, aVM = ???, aEvent = ???, aCaptured = ???)
(optimized), at 0xfbe7b914 (line ~305) in "nsView.cpp"
[31] nsViewManager::DispatchEvent(this = ???, aEvent = ???, aStatus = ???)
(optimized), at 0xfbe89a3c (line ~1870) in "nsViewManager.cpp"
[32] HandleEvent(aEvent = ???) (optimized), at 0xfbe7afc4 (line ~80) in
"nsView.cpp"
[33] nsWidget::DispatchEvent(this = ???, aEvent = ???, aStatus = ???)
(optimized), at 0xfc73f0e4 (line ~1483) in "nsWidget.cpp"
[34] nsWidget::DispatchWindowEvent(this = ???, event = ???) (optimized), at
0xfc73ed5c (line ~1371) in "nsWidget.cpp"
[35] nsWidget::DispatchMouseEvent(this = ???, aEvent = STRUCT) (optimized), at
0xfc73f1bc (line ~1510) in "nsWidget.cpp"
[36] nsWidget::OnButtonReleaseSignal(this = ???, aGdkButtonEvent = ???)
(optimized), at 0xfc74027c (line ~2072) in "nsWidget.cpp"
[37] nsWindow::HandleGDKEvent(this = ???, event = ???) (optimized), at
0xfc747154 (line ~4130358) in "nsWindow.cpp"
[38] dispatch_superwin_event(event = ???, window = ???) (optimized), at
0xfc733670 (line ~966) in "nsGtkEventHandler.cpp"
[39] handle_gdk_event(event = ???, data = ???) (optimized), at 0xfc733308
(line ~832) in "nsGtkEventHandler.cpp"
dbx: warning: can't find file
"/home/gisburn/package-builds/gtk+/gtk+-1.2.8/objdir/gdk/gdkevents.lo"
[40] gdk_event_dispatch(0x0, 0xffbef0c0, 0x0, 0xff3e4270, 0xfe56ca24,
0xffbef028), at 0xfea41470
dbx: warning: can't find file
"/home/gisburn/package-builds/glib/glib-1.2.8/objdir/gmain.lo"
[41] g_main_dispatch(0xffbef0c0, 0x1815c8, 0x1, 0x1d1100, 0xfeb5155b, 0x378),
at 0xfe9b6dc8
[42] g_main_iterate(0x1, 0x1, 0x5, 0xff3e4270, 0xfc711947, 0x19), at
0xfe9b7bcc
[43] g_main_run(0x1d10b8, 0x1d10b8, 0x1, 0x0, 0xfc7937e0, 0xff166628), at
0xfe9b7f64
dbx: warning: can't find file
"/home/gisburn/package-builds/gtk+/gtk+-1.2.8/objdir/gtk/gtkmain.lo"
[44] gtk_main(0xc1f30000, 0x14ecc4, 0xfc725108, 0x0, 0x0, 0x79978), at
0xfecd60a0
[45] nsAppShell::Run(this = ???) (optimized), at 0xfc7253ec (line ~364) in
"nsAppShell.cpp"
[46] nsAppShellService::Run(this = ???) (optimized), at 0xfd1b01a4 (line ~308)
in "nsAppShellService.cpp"
[47] main1(argc = ???, argv = ???, nativeApp = ???) (optimized), at 0x19314
(line ~1415) in "nsAppRunner.cpp"
[48] main(argc = ???, argv = ???) (optimized), at 0x19ce8 (line ~1763) in
"nsAppRunner.cpp"
(/opt/SUNWspro/FD7/bin/../YNH/bin/sparcv9/dbx) print mPrintContext
mPrintContext = (nil)
-- snip --
Accepting...
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Assignee | ||
Comment 6•23 years ago
|
||
Updated•23 years ago
|
Summary: A crash occurs if you try to print to a file in a directory where you do not have write permissions → A crash occurs if you try to print to a file in a directory where you do not have write permissions [@ nsPostScriptObj::finalize_translation]
The impact of this bug is increased by the fact that the default for "Print To
File" is mozilla.ps in Mozilla install directory (Linux 2002040808 here), which
makes no sense, and is normally off-limits for normal users. A different choice
entered by the user is not persistent even over the same session. (For example,
the choice for "Save As" is persistent over sessions.)
We need a better "Print To File" default, shall another bug be opened about
this, or can something be done here ?
Comment 9•23 years ago
|
||
> The impact of this bug is increased by the fact that the default for "Print To
> File" is mozilla.ps in Mozilla install directory (Linux 2002040808 here)
That in itself is a regression... There was a bug on this already and it was
marked worksforme at some point when the temp file was coming up in a sane
directory instead of the install dir.
Reporter | ||
Comment 10•23 years ago
|
||
See bug 136036 for the mozilla.ps placement bug.
Comment 11•23 years ago
|
||
I also get a crash with the same stack if I try to print to ~/blah.
(I guess this happens because ~ is not expanded)
I can attach the stack trace if anyone wants it.
(This bug already has some)
Assignee | ||
Comment 12•23 years ago
|
||
Vadim Berezniker wrote:
> I can attach the stack trace if anyone wants it.
Another stack trace may be usefull... but a r= and sr= would be nice, too ...
... rods ? :)
Comment 13•23 years ago
|
||
I'm seeing a similar bug when I try to print to a file in a nonexistant
directory (TB5407522G, TB5407514Y, TB5407503G). Do these have the same
signature, or should I open a new bug?
Comment 14•23 years ago
|
||
I am working to get this checked in under Bug 139369
Comment 15•23 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 16•23 years ago
|
||
To branch or just to trunk?
Comment 17•23 years ago
|
||
looks like trunk. andre, please verify this when u get chance and
mark this verified-fixed...thanks!
Reporter | ||
Comment 18•23 years ago
|
||
Nice, I get a dialog with a rather informative message now instead of crashing.
VERIFIED FIXED with 2002-04-24-21 on Linux.
Status: RESOLVED → VERIFIED
Comment 19•23 years ago
|
||
This also fixes the crash in comment #11. Thanks.
Comment 20•22 years ago
|
||
*** Bug 140056 has been marked as a duplicate of this bug. ***
Updated•14 years ago
|
Crash Signature: [@ nsPostScriptObj::finalize_translation]
You need to log in
before you can comment on or make changes to this bug.
Description
•