Closed Bug 385747 Opened 18 years ago Closed 18 years ago

Crash if I close print window after printing

Categories

(Core :: Printing: Output, defect)

x86
All
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 301560

People

(Reporter: ivan.novikov, Unassigned)

Details

Attachments

(1 file)

(deleted), application/x-bzip
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.8.1) Gecko/20060601 Firefox/2.0 (Ubuntu-edgy) Build Identifier: Mozilla XULRunner 1.8.0.10_0000000000, Mozilla XULRunner 1.9a6pre_2007062108 XUL source: ============ <browser type="html" src="mozdev.org" flex="1" id="browser1"/> <button label="Easy Print" oncommand="EasyPrint()" /> ============ JS source: ============ function EasyPrint() { document.getElementById('browser1').contentWindow.print(); } ============ After print process window with "Preparing..." title doesn't go away, when I try to close it, whole XUL application crashed. Reproducible: Always Steps to Reproduce: 1.Create xul application with browser element. 2.Use method print() in JavaScript. 3.Close "Preparing...." window. Actual Results: Whole xul application crashed (all dialogs and main window). In console: ============ #xulrunner -app /home/1/a/application.ini Segmentation fault # ============ Expected Results: Close print dialog after printing. Windows XP SP2, Ubuntu 6.10, Debian etch, Windows 98 - the same result. Xulrunner 1.8.0.0, 1.8.1.3, 1.9pre - the same result.
Could you attach a testcase, perhaps? Does it also crash on trunk?
Attached file test xul app (deleted) —
work fine if i use var print_wnd=window.openDialog("chrome://a/content/print.xul","download","chrome"); instead var print_wnd=window.openDialog("chrome://a/content/print.xul","download","chrome=yes,modal=yes,resizable=yes,centerscreen=yes");
Thanks for the testcase! I can reproduce the crash with trunk and branch. Talkback ID: TB33443849W nsPrintEngine::ShowPrintProgress [mozilla/layout/printing/nsPrintEngine.cpp, line 1662] nsPrintEngine::Print [mozilla/layout/printing/nsPrintEngine.cpp, line 962] DocumentViewerImpl::Print [mozilla/layout/base/nsDocumentViewer.cpp, line 3488] nsGlobalWindow::Print [mozilla/dom/src/base/nsGlobalWindow.cpp, line 3788] XPTC_InvokeByIndex [mozilla/xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp, line 102] XPCWrappedNative::CallMethod [mozilla/js/src/xpconnect/src/xpcwrappednative.cpp, line 2169] XPC_WN_CallMethod [mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp, line 1455] js_Invoke [mozilla/js/src/jsinterp.c, line 1375] js_Interpret [mozilla/js/src/jsinterp.c, line 3944] js_Invoke [mozilla/js/src/jsinterp.c, line 1394] js_InternalInvoke [mozilla/js/src/jsinterp.c, line 1469] JS_CallFunctionValue [mozilla/js/src/jsapi.c, line 4351] nsJSContext::CallEventHandler [mozilla/dom/src/base/nsJSEnvironment.cpp, line 1493] nsJSEventListener::HandleEvent [mozilla/dom/src/events/nsJSEventListener.cpp, line 195] nsEventListenerManager::HandleEventSubType [mozilla/content/events/src/nsEventListenerManager.cpp, line 1655] nsEventListenerManager::HandleEvent [mozilla/content/events/src/nsEventListenerManager.cpp, line 1762] nsXULElement::HandleDOMEvent [mozilla/content/xul/content/src/nsXULElement.cpp, line 2230] PresShell::HandleDOMEventWithTarget [mozilla/layout/base/nsPresShell.cpp, line 6531] nsButtonBoxFrame::DoMouseClick [mozilla/layout/xul/base/src/nsButtonBoxFrame.cpp, line 181] nsButtonBoxFrame::MouseClicked [mozilla/layout/xul/base/src/nsButtonBoxFrame.h, line 61] PresShell::HandleEventInternal [mozilla/layout/base/nsPresShell.cpp, line 6473] PresShell::HandleEventWithTarget [mozilla/layout/base/nsPresShell.cpp, line 6330] nsEventStateManager::CheckForAndDispatchClick [mozilla/content/events/src/nsEventStateManager.cpp, line 3207] nsEventStateManager::PostHandleEvent [mozilla/content/events/src/nsEventStateManager.cpp, line 2170] PresShell::HandleEventInternal [mozilla/layout/base/nsPresShell.cpp, line 6504] PresShell::HandleEvent [mozilla/layout/base/nsPresShell.cpp, line 6268] nsViewManager::HandleEvent [mozilla/view/src/nsViewManager.cpp, line 2566] nsViewManager::DispatchEvent [mozilla/view/src/nsViewManager.cpp, line 2253] HandleEvent [mozilla/view/src/nsView.cpp, line 174] nsWindow::DispatchEvent [mozilla/widget/src/windows/nsWindow.cpp, line 1319] nsWindow::DispatchMouseEvent [mozilla/widget/src/windows/nsWindow.cpp, line 6329] ChildWindow::DispatchMouseEvent [mozilla/widget/src/windows/nsWindow.cpp, line 6576] nsWindow::WindowProc [mozilla/widget/src/windows/nsWindow.cpp, line 1507] USER32.dll + 0x8709 (0x77d18709) USER32.dll + 0x87eb (0x77d187eb) USER32.dll + 0x89a5 (0x77d189a5) USER32.dll + 0x89e8 (0x77d189e8) nsAppShell::DispatchNativeEvent [mozilla/widget/src/windows/nsAppShell.cpp, line 221] nsContentTreeOwner::ShowAsModal [mozilla/xpfe/appshell/src/nsContentTreeOwner.cpp, line 478] nsWindowWatcher::OpenWindowJS [mozilla/embedding/components/windowwatcher/src/nsWindowWatcher.cpp, line 540] nsGlobalWindow::OpenInternal [mozilla/dom/src/base/nsGlobalWindow.cpp, line 6192] nsGlobalWindow::OpenDialog [mozilla/dom/src/base/nsGlobalWindow.cpp, line 4509] XPTC_InvokeByIndex [mozilla/xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp, line 102] XPCWrappedNative::CallMethod [mozilla/js/src/xpconnect/src/xpcwrappednative.cpp, line 2169] XPC_WN_CallMethod [mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp, line 1455] js_Invoke [mozilla/js/src/jsinterp.c, line 1375] js_Interpret [mozilla/js/src/jsinterp.c, line 3944] js_Invoke [mozilla/js/src/jsinterp.c, line 1394] js_InternalInvoke [mozilla/js/src/jsinterp.c, line 1469] JS_CallFunctionValue [mozilla/js/src/jsapi.c, line 4351] nsJSContext::CallEventHandler [mozilla/dom/src/base/nsJSEnvironment.cpp, line 1493] nsJSEventListener::HandleEvent [mozilla/dom/src/events/nsJSEventListener.cpp, line 195] nsEventListenerManager::HandleEventSubType [mozilla/content/events/src/nsEventListenerManager.cpp, line 1655] nsEventListenerManager::HandleEvent [mozilla/content/events/src/nsEventListenerManager.cpp, line 1762] nsXULElement::HandleDOMEvent [mozilla/content/xul/content/src/nsXULElement.cpp, line 2230] PresShell::HandleDOMEventWithTarget [mozilla/layout/base/nsPresShell.cpp, line 6531] nsButtonBoxFrame::DoMouseClick [mozilla/layout/xul/base/src/nsButtonBoxFrame.cpp, line 181] nsButtonBoxFrame::MouseClicked [mozilla/layout/xul/base/src/nsButtonBoxFrame.h, line 61] PresShell::HandleEventInternal [mozilla/layout/base/nsPresShell.cpp, line 6473] PresShell::HandleEventWithTarget [mozilla/layout/base/nsPresShell.cpp, line 6330] nsEventStateManager::CheckForAndDispatchClick [mozilla/content/events/src/nsEventStateManager.cpp, line 3207] nsEventStateManager::PostHandleEvent [mozilla/content/events/src/nsEventStateManager.cpp, line 2170] PresShell::HandleEventInternal [mozilla/layout/base/nsPresShell.cpp, line 6504] PresShell::HandleEvent [mozilla/layout/base/nsPresShell.cpp, line 6268] This is in fact the same as bug 301560.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Excuse me for duplicate.... Pay your attention on this fact: this is crash code: print_wnd=window.openDialog("chrome://a/content/print.xul","download","chrome=yes,modal=yes,resizable=yes,centerscreen=yes"); and this is valid code: print_wnd=window.openDialog("chrome://a/content/print.xul","download","chrome");
Yeah, that's the difference between a modal and a non-modal dialog.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: