Last Comment Bug 671970 - Crash [@ nsPrintEngine::ReflowDocList] with frameset onbeforeprint window.print() in foreignObject
: Crash [@ nsPrintEngine::ReflowDocList] with frameset onbeforeprint window.pri...
: crash, testcase
Product: Core
Classification: Components
Component: Printing: Output (show other bugs)
: Trunk
: x86 Windows 7
-- critical (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Jet Villegas (:jet)
Depends on:
  Show dependency treegraph
Reported: 2011-07-15 14:48 PDT by Martijn Wargers [:mwargers]
Modified: 2011-07-18 04:50 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

testcase (201 bytes, application/xhtml+xml)
2011-07-15 14:48 PDT, Martijn Wargers [:mwargers]
no flags Details
patch (1.96 KB, patch)
2011-07-16 04:05 PDT, Olli Pettay [:smaug] (pto-ish for couple of days)
roc: review+
Details | Diff | Splinter Review

Description User image Martijn Wargers [:mwargers] 2011-07-15 14:48:14 PDT
Created attachment 546233 [details]

See testcase, sometimes it crashes directly when trying to print. Otherwise, you have to try it a few times.

I think I've seen this crash happening before bug 307258 was fixed, but the fix for that bug seems to make it easier to trigger.
0 	xul.dll 	nsPrintEngine::ReflowDocList 	layout/printing/nsPrintEngine.cpp:1832
1 	xul.dll 	nsPrintEngine::ReflowDocList 	layout/printing/nsPrintEngine.cpp:1865
2 	xul.dll 	nsPrintEngine::SetupToPrintContent 	layout/printing/nsPrintEngine.cpp:1669
3 	xul.dll 	nsPrintEngine::DocumentReadyForPrinting 	layout/printing/nsPrintEngine.cpp:1501
4 	xul.dll 	nsPrintEngine::DoCommonPrint 	layout/printing/nsPrintEngine.cpp:736
5 	xul.dll 	nsPrintEngine::CommonPrint 	layout/printing/nsPrintEngine.cpp:444
6 	xul.dll 	nsPrintEngine::Print 	layout/printing/nsPrintEngine.cpp:759
7 	xul.dll 	DocumentViewerImpl::Print 	layout/base/nsDocumentViewer.cpp:3680
8 	xul.dll 	nsGlobalWindow::Print 	dom/base/nsGlobalWindow.cpp:5184
9 	xul.dll 	nsGlobalWindow::Print 	dom/base/nsGlobalWindow.cpp:5149
10 	xul.dll 	NS_InvokeByIndex_P 	xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp:102
11 	xul.dll 	XPC_WN_CallMethod 	js/src/xpconnect/src/xpcwrappednativejsops.cpp:1592
12 	mozjs.dll 	CallCompiler::generateNativeStub 	js/src/methodjit/MonoIC.cpp:813
13 	mozjs.dll 	js::mjit::ic::NativeCall 	js/src/methodjit/MonoIC.cpp:1031
14 	mozjs.dll 	js::mjit::EnterMethodJIT 	js/src/methodjit/MethodJIT.cpp:686
15 	mozjs.dll 	js::mjit::JaegerShot 	js/src/methodjit/MethodJIT.cpp:733
16 	mozjs.dll 	js::RunScript 	js/src/jsinterp.cpp:610
17 	mozjs.dll 	js::Invoke 	js/src/jsinterp.cpp:686
18 	mozjs.dll 	js::ExternalInvoke 	js/src/jsinterp.cpp:805
19 	mozjs.dll 	JS_CallFunctionValue 	js/src/jsapi.cpp:5055
20 	xul.dll 	nsJSContext::CallEventHandler 	dom/base/nsJSEnvironment.cpp:1905
Comment 1 User image Olli Pettay [:smaug] (pto-ish for couple of days) 2011-07-15 15:26:19 PDT
So far no luck with reproducing.
Comment 2 User image Olli Pettay [:smaug] (pto-ish for couple of days) 2011-07-16 04:05:49 PDT
Created attachment 546301 [details] [diff] [review]

Martijn, does this help?
Comment 3 User image Martijn Wargers [:mwargers] 2011-07-17 07:38:43 PDT
Yes, that seems to fix the crash. Thanks.
Comment 4 User image Olli Pettay [:smaug] (pto-ish for couple of days) 2011-07-17 08:44:08 PDT
Comment on attachment 546301 [details] [diff] [review]

This effectively brings back the null check we had before primary frame was
moved to nsIContent.
Comment 5 User image Robert O'Callahan (:roc) (email my personal email if necessary) 2011-07-17 16:34:20 PDT
Comment on attachment 546301 [details] [diff] [review]

Review of attachment 546301 [details] [diff] [review]:
Comment 6 User image Olli Pettay [:smaug] (pto-ish for couple of days) 2011-07-18 04:50:31 PDT

Note You need to log in before you can comment on or make changes to this bug.