All users were logged out of Bugzilla on October 13th, 2018

Child process crashes when toggling portrait/landscape mode on Print Preview

RESOLVED DUPLICATE of bug 1365601

Status

()

--
critical
RESOLVED DUPLICATE of bug 1365601
2 years ago
a year ago

People

(Reporter: mlongaray, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20170201175806

Steps to reproduce:

1) Navigate to https://www.wikipedia.org/ or any other link
2) Open print preview
3) Switch _really fast_ between portrait and landscape mode


Actual results:

Content process crashes. Print preview output is either blank or something like an about:crash page.


Expected results:

Content process should not crash and preview should work as expected.
(Reporter)

Comment 1

2 years ago
One thing to be sure is that this issue does not happen if e10s is deactivated (at least from what I tested - deactivated e10s under preferences).
(Reporter)

Comment 2

2 years ago
When the crash is reproduced, console _mainly_ errors out the following message:

###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0082,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv

Some other error messages showed up a few times - maybe it's cascading up the chain:

###!!! [Parent][MessageChannel] Error: (msgtype=0x440052,name=PContent::Msg_ParentActivated) Channel error: cannot send/recv
###!!! [Parent][MessageChannel] Error: (msgtype=0x440050,name=PContent::Msg_Activate) Channel error: cannot send/recv
(Reporter)

Comment 3

2 years ago
As per mconley's request at https://bugzilla.mozilla.org/show_bug.cgi?id=1332386#c15, I attached gdb to the content process to get a backtrace when/where it goes down. Here's the following:

#####
Program received signal SIGSEGV, Segmentation fault.
nsPrintEngine::GetSeqFrameAndCountPagesInternal (aPO=..., aSeqFrame=@0x7fff31c6c788: 0x0, aCount=@0x7fff31c6c8f0: 0) at /home/firefox-dev/mozilla-central/layout/printing/nsPrintEngine.cpp:338
338	    MOZ_DIAGNOSTIC_ASSERT(false,

#####
(gdb) bt full 2

#0  nsPrintEngine::GetSeqFrameAndCountPagesInternal (aPO=..., aSeqFrame=@0x7fff31c6c788: <error reading variable>, aCount=@0x7fff31c6c8f0: <error reading variable>)
    at /home/firefox-dev/mozilla-central/layout/printing/nsPrintEngine.cpp:338
        aPO = <optimized out>
        aSeqFrame = @0x7fff31c6c788: <error reading variable>
        aCount = @0x7fff31c6c8f0: <error reading variable>

#1  0x00007f415f30f178 in nsPrintEngine::GetPrintPreviewNumPages (this=<optimized out>, aPrintPreviewNumPages=<optimized out>) at /home/firefox-dev/mozilla-central/layout/printing/nsPrintEngine.cpp:881
        prt = <optimized out>
        seqFrame = <error reading variable seqFrame (Cannot access memory at address 0x7fff31c6c788)>

#####
(gdb) bt
#0  nsPrintEngine::GetSeqFrameAndCountPagesInternal (aPO=..., aSeqFrame=@0x7ffdd2609218: 0x0, aCount=@0x7ffdd2609380: 0) at /home/firefox-dev/mozilla-central/layout/printing/nsPrintEngine.cpp:338
#1  0x00007fe6400da178 in nsPrintEngine::GetPrintPreviewNumPages (this=<optimized out>, aPrintPreviewNumPages=<optimized out>) at /home/firefox-dev/mozilla-central/layout/printing/nsPrintEngine.cpp:881
#2  0x00007fe63e81345e in NS_InvokeByIndex () at /home/firefox-dev/mozilla-central/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S:88
#3  0x00007fe63eeb0dd8 in Invoke (this=0x7ffdd2609338) at /home/firefox-dev/mozilla-central/js/xpconnect/src/XPCWrappedNative.cpp:2010
#4  Call (this=0x7ffdd2609338) at /home/firefox-dev/mozilla-central/js/xpconnect/src/XPCWrappedNative.cpp:1329
#5  XPCWrappedNative::CallMethod (ccx=..., mode=mode@entry=XPCWrappedNative::CALL_GETTER) at /home/firefox-dev/mozilla-central/js/xpconnect/src/XPCWrappedNative.cpp:1296
#6  0x00007fe63eeb6b8a in GetAttribute (ccx=...) at /home/firefox-dev/mozilla-central/js/xpconnect/src/xpcprivate.h:1679
#7  XPC_WN_GetterSetter (cx=0x7fe639907000, argc=0, vp=0x7ffdd26096e0) at /home/firefox-dev/mozilla-central/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:1019
#8  0x00007fe640b13f26 in CallJSNative (args=..., native=0x7fe63eeb690b <XPC_WN_GetterSetter(JSContext*, unsigned int, JS::Value*)>, cx=0x7fe639907000)
    at /home/firefox-dev/mozilla-central/js/src/jscntxtinlines.h:282
#9  js::InternalCallOrConstruct (cx=cx@entry=0x7fe639907000, args=..., construct=construct@entry=js::NO_CONSTRUCT) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:448
#10 0x00007fe640b144d8 in InternalCall (cx=cx@entry=0x7fe639907000, args=...) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:493
#11 0x00007fe640b14a93 in Call (rval=..., args=..., thisv=..., fval=..., cx=0x7fe639907000) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:512
#12 js::CallGetter (cx=cx@entry=0x7fe639907000, thisv=..., getter=getter@entry=..., rval=...) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:627
#13 0x00007fe640f5ec66 in CallGetter (cx=cx@entry=0x7fe639907000, obj=..., obj@entry=..., receiver=..., receiver@entry=..., shape=..., shape@entry=..., vp=..., vp@entry=...)
    at /home/firefox-dev/mozilla-central/js/src/vm/NativeObject.cpp:1832
#14 0x00007fe640f6ead2 in GetExistingProperty<(js::AllowGC)1> (vp=..., shape=..., obj=..., receiver=..., cx=0x7fe639907000) at /home/firefox-dev/mozilla-central/js/src/vm/NativeObject.cpp:1884
#15 NativeGetPropertyInline<(js::AllowGC)1> (vp=..., nameLookup=NotNameLookup, id=..., receiver=..., obj=..., cx=0x7fe639907000) at /home/firefox-dev/mozilla-central/js/src/vm/NativeObject.cpp:2111
#16 js::NativeGetProperty (cx=cx@entry=0x7fe639907000, obj=..., obj@entry=..., receiver=..., id=..., vp=..., vp@entry=...) at /home/firefox-dev/mozilla-central/js/src/vm/NativeObject.cpp:2145
#17 0x00007fe640afec37 in GetProperty (vp=..., id=..., receiver=..., obj=..., cx=0x7fe639907000) at /home/firefox-dev/mozilla-central/js/src/vm/NativeObject.h:1442
#18 GetProperty (vp=..., name=<optimized out>, receiver=..., obj=..., cx=0x7fe639907000) at /home/firefox-dev/mozilla-central/js/src/jsobj.h:845
#19 js::GetProperty (cx=0x7fe639907000, v=..., name=..., vp=...) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:4307
#20 0x00007fe640b07417 in GetPropertyOperation (vp=..., lval=..., pc=<optimized out>, script=..., fp=<optimized out>, cx=<optimized out>) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:192
#21 Interpret (cx=0x7fe639907000, state=...) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:2671
#22 0x00007fe640b1390d in js::RunScript (cx=0x7fe639907000, state=...) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:394
#23 0x00007fe640b14030 in js::InternalCallOrConstruct (cx=0x7fe639907000, args=..., construct=<optimized out>) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:466
#24 0x00007fe640b06e22 in CallFromStack (args=..., cx=<optimized out>) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:499
#25 Interpret (cx=0x7fe639907000, state=...) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:2954
#26 0x00007fe640b1390d in js::RunScript (cx=0x7fe639907000, state=...) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:394
#27 0x00007fe640b14030 in js::InternalCallOrConstruct (cx=cx@entry=0x7fe639907000, args=..., construct=construct@entry=js::NO_CONSTRUCT) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:466
#28 0x00007fe640b144d8 in InternalCall (cx=cx@entry=0x7fe639907000, args=...) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:493
#29 0x00007fe640b14539 in js::Call (cx=cx@entry=0x7fe639907000, fval=..., fval@entry=..., thisv=..., thisv@entry=..., args=..., rval=..., rval@entry=...)
    at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:512
#30 0x00007fe640e18597 in JS_CallFunctionValue (cx=cx@entry=0x7fe639907000, obj=..., obj@entry=..., fval=..., fval@entry=..., args=..., rval=..., rval@entry=...)
    at /home/firefox-dev/mozilla-central/js/src/jsapi.cpp:2828
#31 0x00007fe63f1be7f2 in nsFrameMessageManager::ReceiveMessage (this=<optimized out>, aTarget=<optimized out>, aTargetFrameLoader=aTargetFrameLoader@entry=0x0, aTargetClosed=<optimized out>, 
    aMessage=..., aIsSync=aIsSync@entry=false, aCloneData=0x7ffdd260b5f0, aCpows=0x7ffdd260b5d0, aPrincipal=0x0, aRetVal=0x0) at /home/firefox-dev/mozilla-central/dom/base/nsFrameMessageManager.cpp:1072
#32 0x00007fe63f1bedcf in nsFrameMessageManager::ReceiveMessage (this=<optimized out>, aTarget=<optimized out>, aTargetFrameLoader=aTargetFrameLoader@entry=0x0, aMessage=..., aIsSync=aIsSync@entry=false, 
    aCloneData=aCloneData@entry=0x7ffdd260b5f0, aCpows=0x7ffdd260b5d0, aPrincipal=0x0, aRetVal=0x0) at /home/firefox-dev/mozilla-central/dom/base/nsFrameMessageManager.cpp:881
#33 0x00007fe63fc18092 in mozilla::dom::TabChild::RecvAsyncMessage(nsString const&, nsTArray<mozilla::jsipc::CpowEntry>&&, IPC::Principal const&, mozilla::dom::ClonedMessageData const&) (
    this=0x7fe62324f000, aMessage=u"Printing:Preview:UpdatePageCount", aCpows=<optimized out>, aPrincipal=..., aData=...) at /home/firefox-dev/mozilla-central/dom/ipc/TabChild.cpp:2156
#34 0x00007fe63ed91134 in mozilla::dom::PBrowserChild::OnMessageReceived (this=0x7fe62324f058, msg__=...) at /home/firefox-dev/mozilla-central/obj-x86_64-pc-linux-gnu/ipc/ipdl/PBrowserChild.cpp:2946
#35 0x00007fe63edf8b71 in mozilla::dom::PContentChild::OnMessageReceived (this=0x7fe649b67020, msg__=...) at /home/firefox-dev/mozilla-central/obj-x86_64-pc-linux-gnu/ipc/ipdl/PContentChild.cpp:5618
#36 0x00007fe63eb80b0d in mozilla::ipc::MessageChannel::DispatchAsyncMessage (this=0x7fe649b67100, aMsg=...) at /home/firefox-dev/mozilla-central/ipc/glue/MessageChannel.cpp:1795
#37 0x00007fe63eb87b61 in mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) (this=this@entry=0x7fe649b67100, 
    aMsg=aMsg@entry=<unknown type in /home/firefox-dev/mozilla-central/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so, CU 0x2771533, DIE 0x283adf0>)
    at /home/firefox-dev/mozilla-central/ipc/glue/MessageChannel.cpp:1730
#38 0x00007fe63eb89750 in mozilla::ipc::MessageChannel::RunMessage (this=0x7fe649b67100, aTask=...) at /home/firefox-dev/mozilla-central/ipc/glue/MessageChannel.cpp:1603
#39 0x00007fe63eb89861 in mozilla::ipc::MessageChannel::MessageTask::Run (this=0x7fe6230979d0) at /home/firefox-dev/mozilla-central/ipc/glue/MessageChannel.cpp:1636
#40 0x00007fe63e8008ba in mozilla::ValidatingDispatcher::Runnable::Run (this=0x7fe6247a6b80) at /home/firefox-dev/mozilla-central/xpcom/threads/Dispatcher.cpp:257
#41 0x00007fe63e80dbb9 in nsThread::ProcessNextEvent (this=0x7fe649b4f030, aMayWait=<optimized out>, aResult=0x7ffdd260bf6f) at /home/firefox-dev/mozilla-central/xpcom/threads/nsThread.cpp:1264
#42 0x00007fe63e80e73b in NS_ProcessNextEvent (aThread=<optimized out>, aThread@entry=0x0, aMayWait=aMayWait@entry=true) at /home/firefox-dev/mozilla-central/xpcom/threads/nsThreadUtils.cpp:389
#43 0x00007fe6409b8b64 in nsPrintingProxy::ShowPrintDialog (this=0x7fe649bf05b0, parent=<optimized out>, webBrowserPrint=<optimized out>, printSettings=0x7fe61b3a10e0)
    at /home/firefox-dev/mozilla-central/toolkit/components/printingui/ipc/nsPrintingProxy.cpp:117
#44 0x00007fe6400e0197 in nsPrintEngine::DoCommonPrint (this=this@entry=0x7fe61b48b1f0, aIsPrintPreview=aIsPrintPreview@entry=true, aPrintSettings=<optimized out>,
    aWebProgressListener=aWebProgressListener@entry=0x7fe61dc275e0, aDoc=0x7fe619dac3e0) at /home/firefox-dev/mozilla-central/layout/printing/nsPrintEngine.cpp:611
#45 0x00007fe6400e05d8 in nsPrintEngine::CommonPrint (this=this@entry=0x7fe61b48b1f0, aIsPrintPreview=aIsPrintPreview@entry=true, aPrintSettings=aPrintSettings@entry=0x7fe61b3a10e0, 
    aWebProgressListener=aWebProgressListener@entry=0x7fe61dc275e0, aDoc=<optimized out>) at /home/firefox-dev/mozilla-central/layout/printing/nsPrintEngine.cpp:394
#46 0x00007fe6400e07b0 in nsPrintEngine::PrintPreview (this=0x7fe61b48b1f0, aPrintSettings=aPrintSettings@entry=0x7fe61b3a10e0, aChildDOMWin=aChildDOMWin@entry=0x7fe62324f820, 
    aWebProgressListener=aWebProgressListener@entry=0x7fe61dc275e0) at /home/firefox-dev/mozilla-central/layout/printing/nsPrintEngine.cpp:811
#47 0x00007fe63ff36973 in nsDocumentViewer::PrintPreview (this=0x7fe61d8fa3e0, aPrintSettings=0x7fe61b3a10e0, aChildDOMWin=0x7fe62324f820, aWebProgressListener=0x7fe61dc275e0)
    at /home/firefox-dev/mozilla-central/layout/base/nsDocumentViewer.cpp:3970
#48 0x00007fe63e81345e in NS_InvokeByIndex () at /home/firefox-dev/mozilla-central/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S:88
#49 0x00007fe63eeb0dd8 in Invoke (this=0x7ffdd260c7d8) at /home/firefox-dev/mozilla-central/js/xpconnect/src/XPCWrappedNative.cpp:2010
#50 Call (this=0x7ffdd260c7d8) at /home/firefox-dev/mozilla-central/js/xpconnect/src/XPCWrappedNative.cpp:1329
#51 XPCWrappedNative::CallMethod (ccx=..., mode=mode@entry=XPCWrappedNative::CALL_METHOD) at /home/firefox-dev/mozilla-central/js/xpconnect/src/XPCWrappedNative.cpp:1296
#52 0x00007fe63eeb68c4 in XPC_WN_CallMethod (cx=0x7fe639907000, argc=3, vp=0x7fe63545b128) at /home/firefox-dev/mozilla-central/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:983
#53 0x00007fe640b13f26 in CallJSNative (args=..., native=0x7fe63eeb66b8 <XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*)>, cx=0x7fe639907000)
    at /home/firefox-dev/mozilla-central/js/src/jscntxtinlines.h:282
#54 js::InternalCallOrConstruct (cx=0x7fe639907000, args=..., construct=<optimized out>) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:448
#55 0x00007fe640b06e22 in CallFromStack (args=..., cx=<optimized out>) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:499
#56 Interpret (cx=0x7fe639907000, state=...) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:2954
#57 0x00007fe640b1390d in js::RunScript (cx=0x7fe639907000, state=...) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:394
#58 0x00007fe640b14030 in js::InternalCallOrConstruct (cx=cx@entry=0x7fe639907000, args=..., construct=construct@entry=js::NO_CONSTRUCT) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:466
#59 0x00007fe640b144d8 in InternalCall (cx=cx@entry=0x7fe639907000, args=...) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:493
#60 0x00007fe640b14539 in js::Call (cx=cx@entry=0x7fe639907000, fval=..., fval@entry=..., thisv=..., thisv@entry=..., args=..., rval=..., rval@entry=...)
    at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:512
#61 0x00007fe640e18597 in JS_CallFunctionValue (cx=0x7fe639907000, obj=..., obj@entry=..., fval=..., fval@entry=..., args=..., rval=..., rval@entry=...)
    at /home/firefox-dev/mozilla-central/js/src/jsapi.cpp:2828
#62 0x00007fe63eeb51f8 in nsXPCWrappedJSClass::CallMethod (this=0x7fe6197fe840, wrapper=<optimized out>, methodIndex=<optimized out>, info_=0x7fe6354cc6c0, nativeParams=<optimized out>)
    at /home/firefox-dev/mozilla-central/js/xpconnect/src/XPCWrappedJSClass.cpp:1214
#63 0x00007fe63e814048 in PrepareAndDispatch (self=0x7fe61f8cb780, methodIndex=<optimized out>, args=<optimized out>, gpregs=0x7ffdd260dd20, fpregs=<optimized out>)
    at /home/firefox-dev/mozilla-central/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp:120
#64 0x00007fe63e8135a7 in SharedStub () from /home/firefox-dev/mozilla-central/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so
#65 0x00007fe63e80dbb9 in nsThread::ProcessNextEvent (this=0x7fe649b4f030, aMayWait=<optimized out>, aResult=0x7ffdd260de9f) at /home/firefox-dev/mozilla-central/xpcom/threads/nsThread.cpp:1264
#66 0x00007fe63e80e73b in NS_ProcessNextEvent (aThread=<optimized out>, aThread@entry=0x0, aMayWait=aMayWait@entry=true) at /home/firefox-dev/mozilla-central/xpcom/threads/nsThreadUtils.cpp:389
#67 0x00007fe6409b8b64 in nsPrintingProxy::ShowPrintDialog (this=0x7fe649bf05b0, parent=<optimized out>, webBrowserPrint=<optimized out>, printSettings=0x7fe61b3a08c0)
    at /home/firefox-dev/mozilla-central/toolkit/components/printingui/ipc/nsPrintingProxy.cpp:117
#68 0x00007fe6400e0197 in nsPrintEngine::DoCommonPrint (this=this@entry=0x7fe61b48b1f0, aIsPrintPreview=aIsPrintPreview@entry=true, aPrintSettings=<optimized out>, 
    aWebProgressListener=aWebProgressListener@entry=0x7fe61dc275e0, aDoc=0x7fe6143113e0) at /home/firefox-dev/mozilla-central/layout/printing/nsPrintEngine.cpp:611
#69 0x00007fe6400e05d8 in nsPrintEngine::CommonPrint (this=this@entry=0x7fe61b48b1f0, aIsPrintPreview=aIsPrintPreview@entry=true, aPrintSettings=aPrintSettings@entry=0x7fe61b3a08c0, 
    aWebProgressListener=aWebProgressListener@entry=0x7fe61dc275e0, aDoc=<optimized out>) at /home/firefox-dev/mozilla-central/layout/printing/nsPrintEngine.cpp:394
#70 0x00007fe6400e07b0 in nsPrintEngine::PrintPreview (this=0x7fe61b48b1f0, aPrintSettings=aPrintSettings@entry=0x7fe61b3a08c0, aChildDOMWin=aChildDOMWin@entry=0x7fe62324f820, 
    aWebProgressListener=aWebProgressListener@entry=0x7fe61dc275e0) at /home/firefox-dev/mozilla-central/layout/printing/nsPrintEngine.cpp:811
#71 0x00007fe63ff36973 in nsDocumentViewer::PrintPreview (this=0x7fe61d8fa3e0, aPrintSettings=0x7fe61b3a08c0, aChildDOMWin=0x7fe62324f820, aWebProgressListener=0x7fe61dc275e0)
    at /home/firefox-dev/mozilla-central/layout/base/nsDocumentViewer.cpp:3970
#72 0x00007fe63e81345e in NS_InvokeByIndex () at /home/firefox-dev/mozilla-central/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S:88
#73 0x00007fe63eeb0dd8 in Invoke (this=0x7ffdd260e708) at /home/firefox-dev/mozilla-central/js/xpconnect/src/XPCWrappedNative.cpp:2010
#74 Call (this=0x7ffdd260e708) at /home/firefox-dev/mozilla-central/js/xpconnect/src/XPCWrappedNative.cpp:1329
#75 XPCWrappedNative::CallMethod (ccx=..., mode=mode@entry=XPCWrappedNative::CALL_METHOD) at /home/firefox-dev/mozilla-central/js/xpconnect/src/XPCWrappedNative.cpp:1296
#76 0x00007fe63eeb68c4 in XPC_WN_CallMethod (cx=0x7fe639907000, argc=3, vp=0x7fe63545b090) at /home/firefox-dev/mozilla-central/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:983
#77 0x00007fe640b13f26 in CallJSNative (args=..., native=0x7fe63eeb66b8 <XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*)>, cx=0x7fe639907000)
    at /home/firefox-dev/mozilla-central/js/src/jscntxtinlines.h:282
#78 js::InternalCallOrConstruct (cx=0x7fe639907000, args=..., construct=<optimized out>) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:448
#79 0x00007fe640b06e22 in CallFromStack (args=..., cx=<optimized out>) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:499
#80 Interpret (cx=0x7fe639907000, state=...) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:2954
#81 0x00007fe640b1390d in js::RunScript (cx=0x7fe639907000, state=...) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:394
#82 0x00007fe640b14030 in js::InternalCallOrConstruct (cx=cx@entry=0x7fe639907000, args=..., construct=construct@entry=js::NO_CONSTRUCT) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:466
#83 0x00007fe640b144d8 in InternalCall (cx=cx@entry=0x7fe639907000, args=...) at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:493
#84 0x00007fe640b14539 in js::Call (cx=cx@entry=0x7fe639907000, fval=..., fval@entry=..., thisv=..., thisv@entry=..., args=..., rval=..., rval@entry=...)
    at /home/firefox-dev/mozilla-central/js/src/vm/Interpreter.cpp:512
#85 0x00007fe640e18597 in JS_CallFunctionValue (cx=0x7fe639907000, obj=..., obj@entry=..., fval=..., fval@entry=..., args=..., rval=..., rval@entry=...)
    at /home/firefox-dev/mozilla-central/js/src/jsapi.cpp:2828
#86 0x00007fe63eeb51f8 in nsXPCWrappedJSClass::CallMethod (this=0x7fe6197fe840, wrapper=<optimized out>, methodIndex=<optimized out>, info_=0x7fe6354cc6c0, nativeParams=<optimized out>)
    at /home/firefox-dev/mozilla-central/js/xpconnect/src/XPCWrappedJSClass.cpp:1214
#87 0x00007fe63e814048 in PrepareAndDispatch (self=0x7fe61f851820, methodIndex=<optimized out>, args=<optimized out>, gpregs=0x7ffdd260fc50, fpregs=<optimized out>)
    at /home/firefox-dev/mozilla-central/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp:120
#88 0x00007fe63e8135a7 in SharedStub () from /home/firefox-dev/mozilla-central/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so
#89 0x00007fe63e80dbb9 in nsThread::ProcessNextEvent (this=0x7fe649b4f030, aMayWait=<optimized out>, aResult=0x7ffdd260fdcf) at /home/firefox-dev/mozilla-central/xpcom/threads/nsThread.cpp:1264
#90 0x00007fe63e80e73b in NS_ProcessNextEvent (aThread=<optimized out>, aThread@entry=0x7fe649b4f030, aMayWait=aMayWait@entry=false)
    at /home/firefox-dev/mozilla-central/xpcom/threads/nsThreadUtils.cpp:389
#91 0x00007fe63eb7e134 in mozilla::ipc::MessagePump::Run (this=0x7fe649b90ab0, aDelegate=0x7ffdd260fff0) at /home/firefox-dev/mozilla-central/ipc/glue/MessagePump.cpp:96
#92 0x00007fe63eb4c828 in RunHandler (this=0x7ffdd260fff0) at /home/firefox-dev/mozilla-central/ipc/chromium/src/base/message_loop.cc:231
#93 MessageLoop::Run (this=0x7ffdd260fff0) at /home/firefox-dev/mozilla-central/ipc/chromium/src/base/message_loop.cc:211
#94 0x00007fe63fd77f5a in nsBaseAppShell::Run (this=0x7fe6320b9da0) at /home/firefox-dev/mozilla-central/widget/nsBaseAppShell.cpp:156
#95 0x00007fe6409cd9b2 in XRE_RunAppShell () at /home/firefox-dev/mozilla-central/toolkit/xre/nsEmbedFunctions.cpp:854
#96 0x00007fe63eb4c828 in RunHandler (this=0x7ffdd260fff0) at /home/firefox-dev/mozilla-central/ipc/chromium/src/base/message_loop.cc:231
#97 MessageLoop::Run (this=this@entry=0x7ffdd260fff0) at /home/firefox-dev/mozilla-central/ipc/chromium/src/base/message_loop.cc:211
#98 0x00007fe6409cdd7e in XRE_InitChildProcess (aArgc=13, aArgv=0x7ffdd2610318, aChildData=<optimized out>) at /home/firefox-dev/mozilla-central/toolkit/xre/nsEmbedFunctions.cpp:686
#99 0x000000000040588a in content_process_main (bootstrap=0x7fe649b8b0a8, argc=16, argv=0x7ffdd2610318) at /home/firefox-dev/mozilla-central/browser/app/../../ipc/contentproc/plugin-container.cpp:64
#100 0x000000000040541d in main (argc=16, argv=0x7ffdd2610318, envp=0x7ffdd26103a0) at /home/firefox-dev/mozilla-central/browser/app/nsBrowserApp.cpp:286
(Reporter)

Updated

2 years ago
Flags: needinfo?(mconley)

Updated

2 years ago
Severity: normal → critical
Has STR: --- → yes
Component: Untriaged → Print Preview
Product: Firefox → Core
Summary: Child process crashes when toggling portrait/landscape mode on Preview → Child process crashes when toggling portrait/landscape mode on Print Preview
Looks like we're failing this diagnostic assertion: http://searchfox.org/mozilla-central/rev/ca7015fa45b30b29176fbaa70ba0a36fe9263c38/layout/printing/nsPrintEngine.cpp#338-339

Added in bug 1141756 by bobowen, so ni?ing bobowen to see what he thinks of this.
Flags: needinfo?(mconley) → needinfo?(bobowencode)

Comment 5

2 years ago
(In reply to Mike Conley (:mconley) (Catching up on reviews and needinfos) from comment #4)
> Looks like we're failing this diagnostic assertion:
> http://searchfox.org/mozilla-central/rev/
> ca7015fa45b30b29176fbaa70ba0a36fe9263c38/layout/printing/nsPrintEngine.
> cpp#338-339
> 
> Added in bug 1141756 by bobowen, so ni?ing bobowen to see what he thinks of
> this.

Yes it would have failed with a null dereference before that, so it looks like we are still getting this issue and fixing that other listener removal issue in bug 1141756, didn't stop it.

That's mainly why I added the diagnostic assert so we would still see the crashes on Aurora and Nightly.

Matheus, would you mind trying to reproduce on current Beta, the diagnostic assert won't cause a crash there, but it would be interesting to see if it is causing any other problems.

Either way we should leave this open as a new bug to track the fact that nsPrintEngine::GetSeqFrameAndCountPagesInternal is getting called at incorrect times.
Flags: needinfo?(bobowencode) → needinfo?(mlongaray)
(Reporter)

Comment 6

2 years ago
Here's what I got trying to reproduce the issue on current Beta.

e10s _off_: no crash nor any other printing-related error.

e10s _on_: no diagnostic assert crash, however there's _what I think is_ a related error to comment 3. Following is what I got from Browser Console.


NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebBrowserPrint.printPreviewNumPages] chrome://global/content/browser-content.js :: _updatePageCount_ :: line 728


If we push a bit further, we get the following error in which ends up crashing our preview browser (I think it's cascading the above error up the chain):

[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebBrowserPrint.printPreview]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/browser-content.js :: enterPrintPreview :: line 654"  data: no]
Flags: needinfo?(mlongaray)
Flags: needinfo?(mconley)
Flags: needinfo?(bobowencode)

Comment 7

2 years ago
(In reply to Matheus Longaray (:mlongaray) from comment #6)

> If we push a bit further, we get the following error in which ends up
> crashing our preview browser (I think it's cascading the above error up the
> chain):
> 
> [Exception... "Component returned failure code: 0x80004005
> (NS_ERROR_FAILURE) [nsIWebBrowserPrint.printPreview]"  nsresult: "0x80004005
> (NS_ERROR_FAILURE)"  location: "JS frame ::
> chrome://global/content/browser-content.js :: enterPrintPreview :: line 654"
> data: no]

Hmm, thanks, I'll look into this when I get a chance.

Looks like I need to try and reproduce this on Linux, I couldn't on Windows.
Leaving the NI as I'm working on a few other things and I don't want to forget about this.
Apologies for unresponsiveness - I'm at an off-site this week, and will be back Monday.
Hey mlongaray:

I assume you're running Ubuntu on bare metal, and not in a VM. Is that correct?

If so, are you willing to try reproducing the crash under rr[1]? If so, I can try to guide you on how to interpret the rr trace. rr is basically gdb, but you record a trace once, then replay and debug that trace as many times as you need (with time travel!)

If rr isn't a thing you're comfortable using, I can try to get rr working here in Toronto, but it might take me a few more days before I can focus on this.

[1]: See http://rr-project.org/ and in particular, https://github.com/mozilla/rr/wiki/Recording-Firefox for recording Firefox.
Flags: needinfo?(mconley) → needinfo?(mlongaray)
(Reporter)

Comment 10

2 years ago
Ouch, I'm actually running Ubuntu in a VM. Would that be a problem? I see there's a few rr issues when running under VM. I'll try to setup up rr anyway and see what I can trace back. I'll also try to reproduce this bug on bare metal Ubuntu (not sure if this is somehow related to VM - it has just hit to me).
Flags: needinfo?(mlongaray)
(Reporter)

Comment 11

2 years ago
So, as a matter of fact, I could _not_ reproduce this bug on bare metal Ubuntu. Maybe this is only happening on VMs environments? Specific device limitations, processing capabilities, etc?

Just to make sure, can one of you guys also try to reproduce it using Ubuntu (not under VM)?

Sorry I hopped you into this.
Flags: needinfo?(mconley)

Comment 12

2 years ago
Unfortunately I can't reproduce this on Ubuntu 14.04 on a VM (VirtualBox).

When you say "crashing our preview browser", does the content process actually crash?
If so would you be able to report the crash (if it isn't already) from about:crashes and post a link, thanks.
Flags: needinfo?(bobowencode)
(Reporter)

Comment 13

2 years ago
Created attachment 8856517 [details]
Preview Crash - Screen #1
(Reporter)

Comment 14

2 years ago
Created attachment 8856518 [details]
Preview Crash - Screen #2
(Reporter)

Comment 15

2 years ago
Created attachment 8856519 [details]
Preview Crash - about:healthreport tab
(Reporter)

Comment 16

2 years ago
Created attachment 8856520 [details]
Preview Crash - about:crashes tab
(Reporter)

Comment 17

2 years ago
Hey bobowen, I attached a few screenshots for better clarification. I think content process is crashing, given that parent fails to contact the child because the IPC pipe has gone down.

Sometimes it can be quite hard to reproduce this issue. When I'm able to, I often see two kinds of tab scenarios. See attachment 8856517 [details] and attachment 8856518 [details].

Attachment 8856519 [details] shows my local about:healthreport tab. Altough there's no crash report submitted on about:crashes tab (attachment 8856520 [details]), there's a few crashes related to this issue on about:healthreport tab.
I'm afraid I'm having no luck reproducing this on the Ubuntu machine with rr. :(
Flags: needinfo?(mconley)
(In reply to Matheus Longaray (:mlongaray) from comment #6)
...
> [Exception... "Component returned failure code: 0x80004005
> (NS_ERROR_FAILURE) [nsIWebBrowserPrint.printPreview]"  nsresult: "0x80004005
> (NS_ERROR_FAILURE)"  location: "JS frame ::
> chrome://global/content/browser-content.js :: enterPrintPreview :: line 654"
> data: no]

Further to bug 1365601 comment 9, this appears to be a slightly different but probably related issue.

This appears to be failing during the actual nsPrintEngine::PrintPreview call.
Quite probably because of the repeated calls we make into this.

It's possible that on occasions we hit it at a point which means we get the content crash you appear to be seeing.
What I don't understand is why you don't see that in about:crashes.
(Reporter)

Comment 20

a year ago
Hey bobowen, got some updates on this bug. See the following.

#Release Build#
So, apparently I was the reason why I could not see the crash on about:crashes. Passing --enable-crash-reporter flag when running local build did the work.

Here's the crash signature when running a local release build: https://crash-stats.mozilla.com/report/index/cd4bc339-c231-4b07-bc7b-7391c1170526

#Debug Build#
For debug mode, I reproduced comment #6 and bug 1365601 comment #5. An alert with the message "An error occurred while printing" shows up with the following error on Browser Console.

[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebBrowserPrint.printPreview]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/browser-content.js :: enterPrintPreview/< :: line 662"  data: no]
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebBrowserPrint.printPreviewNumPages]

Furthermore, noticed the following failed true-assertion on my console terminal.

[Child 4817] WARNING: NS_ENSURE_TRUE(mPrintEngine) failed: file /home/firefox-dev/mozilla-central/layout/base/nsDocumentViewer.cpp, line 4251
JavaScript error: chrome://global/content/browser-content.js, line 743: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebBrowserPrint.printPreviewNumPages]

I also managed to crash the tab but could not see it on about:crashes, not even passing --enable-crash-reporter flag when running my local build (altough reproduces same backtrace as reported on comment #3).
(In reply to Matheus Longaray (:mlongaray) from comment #20)
> Hey bobowen, got some updates on this bug. See the following.
> 
> #Release Build#
> So, apparently I was the reason why I could not see the crash on
> about:crashes. Passing --enable-crash-reporter flag when running local build
> did the work.
> 
> Here's the crash signature when running a local release build:
> https://crash-stats.mozilla.com/report/index/cd4bc339-c231-4b07-bc7b-
> 7391c1170526

I've seen that signature before, but haven't had a chance to look into it.
Interesting that this problem might contribute to that.

I've got a couple of more urgent things at the moment, but I will get back to this soon.
(In reply to Matheus Longaray (:mlongaray) from comment #20)
...
> [Exception... "Component returned failure code: 0x80004005
> (NS_ERROR_FAILURE) [nsIWebBrowserPrint.printPreview]"  nsresult: "0x80004005

I worked this out, it is caused by nsIWebBrowserPrint.printPreview getting called recursively, because of nested event loops.
When I've seen it fail it's at [0], and mPrt is null.

I'll tackle this in bug 1365601 as well, so setting this as duplicate.

[0] https://hg.mozilla.org/mozilla-central/file/594cc32b6323/layout/printing/nsPrintEngine.cpp#l627
Status: UNCONFIRMED → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1365601
You need to log in before you can comment on or make changes to this bug.