Closed Bug 87711 Opened 23 years ago Closed 23 years ago

crash after cancelling print job

Categories

(Core :: Printing: Output, defect)

x86
Linux
defect
Not set
major

Tracking

()

VERIFIED FIXED

People

(Reporter: cls, Assigned: dcone)

Details

(Keywords: crash)

To be more specific, crashing after cancelling the _first_ print job of a
multiple message print.  The first jobs is "cancelled", the printer prints out
the about:blank page and mozilla crashes.

(gdb) bt
#0  0x40f6b7bd in CSSLoaderImpl::InsertSheetInDoc (this=0x42d407d8, 
    aSheet=0x3, aDocIndex=-1073745068, aElement=0x40f700c6, 
    aNotify=1091297292, aObserver=0x423b7238)
    at ../../../../../mozilla/content/html/style/src/nsCSSLoader.cpp:1065
#1  0x423bcfe8 in ?? ()
#2  0x40f70150 in IsPseudoClass (aAtom=0x42998840)
    at ../../../../../mozilla/content/html/style/src/nsCSSParser.cpp:1384
#3  0x40f7d0ee in nsPagePrintTimer::Notify ()
    at ../../../../../mozilla/content/html/style/src/nsCSSStyleRule.cpp:360
#4  0x409f936a in nsTimerGtk::FireTimeout ()
   from /usr/cls/moz/main/obj-opt-g/dist/bin/components/libtimer_gtk.so
#5  0x409f95a5 in process_timers ()
   from /usr/cls/moz/main/obj-opt-g/dist/bin/components/libtimer_gtk.so
#6  0x409f9658 in TimeVal::TimeVal (this=0x0, tv=@0x403f3dac)
    at ../../../../../../mozilla/widget/timer/src/unix/gtk/nsTimerGtk.cpp:46
#7  0x403e304d in g_timeout_dispatch () from /usr/lib/libglib-1.2.so.0
#8  0x403e2186 in g_main_dispatch () from /usr/lib/libglib-1.2.so.0
#9  0x403e2751 in g_main_iterate () from /usr/lib/libglib-1.2.so.0
#10 0x403e28f1 in g_main_run () from /usr/lib/libglib-1.2.so.0
#11 0x403065b9 in gtk_main () from /usr/lib/libgtk-1.2.so.0
#12 0x4079dd86 in nsAppShell::Run ()
   from /usr/cls/moz/main/obj-opt-g/dist/bin/components/libwidget_gtk.so
#13 0x407736de in nsAppShellService::Run ()
---Type <return> to continue, or q <return> to quit---
   from /usr/cls/moz/main/obj-opt-g/dist/bin/components/libnsappshell.so
#14 0x805558d in main1 (argc=1, argv=0xbffff804, nativeApp=0x0)
    at ../../../mozilla/xpfe/bootstrap/nsAppRunner.cpp:1161
#15 0x80562c2 in main (argc=1, argv=0xbffff804)
    at ../../../mozilla/xpfe/bootstrap/nsAppRunner.cpp:1464
Keywords: crash
This is a crash in the Linux timers..
i think this is due to a timer not being canceled with a callback into an object 
that has been deleted.  probably a leaked timer that wasn't Cancel()ed.
->Printing.  I agree with pavlov:  this looks like a problem with the timer's
caller.
Assignee: karnaze → dcone
Component: Layout → Printing
QA Contact: petersen → sujay
If you are doing this from mail news, then the second jobs are not cancelable 
since they are submited with the silent parameter(this is a bug mail new has) 
which means all the other jobs will still be printed.

The timers can not be started until after the user can decide to cancel,, which 
means that this object can not go away and leak a timer.

Pavlov.. what is the basis for your determination that a timer is not being 
canceled.  

Reporter can you duplicate this crash consistenly with any mail messages. Is 
there a specific mail message that you print in this batch that does this.
Yes, I can consistently reproduce the crash:
1) In your mail folder, click on this mail message and shift click the one above it.
2) Right-click to bring up the menu-pop up & select "Print..."
3) When the print dialog comes up, hit cancel.
4) Listen for the whirl of the printer as it prints out "about:blank" and watch
mozilla crash.

There dosen't appear to be anything special about the messages that it is
crashing on.

I think the problem may be that in silent mode printing does not have a print 
listener that the Print returns before printing has completed, which means if 
the docshell goes to a new page, the content viewer is destroyed mid-print.  
This is just a theory from looking at it, I will do some research and find out 
more.
fixed with the changes to 90060.  I was almost right, the nsDocumentViewer was 
being destroyed when the print job was still going.  The cleanup for 90060 
should fix this bug also.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Christopher, is this fixed for you now? please try in latest build.
thanks.
Well, the crash is fixed.  The problem of cancelling only the first print job,
bug 87474 , still exists though.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.