none
Crash occurs in mshtml when trying to print the contents of a WebBrowser(ActiveX Control), in MFC Applications using ExecWB RRS feed

  • Question

  • The crash occurs when we print the contents of a WebBrowser(ActiveX Control), in MFC Applications.

    1) The print dialog is not opening.

    For printing from webbrowser, we call the below function
    ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER, NULL, NULL);

    2) The crash starts from preview.js (CPrintDoc_RectComplete method) of ieframe.dll.
    3) It is crashing in mshtml, "mshtml!Tree::CIE9DocumentLayout::HandleLayoutBuilderError+0xc6"
    4) It is giving "Break instruction exception - code 80000003" .

    Could you please let us know if there is any hotfix available for this callstack.

    The call stack of the crashing thread is 

    00 000000ea`2e697dc0 00007ffb`483c4097 mshtml!Tree::CIE9DocumentLayout::HandleLayoutBuilderError+0xc6
    01 000000ea`2e697e00 00007ffb`47cea9fc mshtml!CMarkupPageLayout::CalcPageLayoutSize+0xa09bcf
    02 000000ea`2e697f90 00007ffb`489a6b86 mshtml!CMarkupPageLayout::CalcTopLayoutSizeWithDefault+0x1c
    03 000000ea`2e697fc0 00007ffb`47b13a7f mshtml!CContainerLayout::CalcSizeVirtual+0x166
    04 000000ea`2e6980c0 00007ffb`4806969e mshtml!CLayout::CalcSize+0x247
    05 000000ea`2e698270 00007ffb`480694a8 mshtml!CFlowLayout::MeasureSite+0x42b
    06 000000ea`2e6983f0 00007ffb`4806936f mshtml!CFlowLayout::GetSiteWidth+0x123
    07 000000ea`2e6984a0 00007ffb`48069959 mshtml!CLSMeasurer::GetSiteWidth+0xaf
    08 000000ea`2e698520 00007ffb`4806b97b mshtml!CLineServices::VerticalAlignOneObjectFast+0x443
    09 000000ea`2e6985f0 00007ffb`4806ea8a mshtml!CLineServices::VerticalAlignObjectsFast+0x2da
    0a 000000ea`2e698730 00007ffb`483648f0 mshtml!CLSMeasurer::Measure+0x3c6
    0b 000000ea`2e6987c0 00007ffb`48273b4d mshtml!CLSMeasurer::MeasureLine+0x3c
    0c 000000ea`2e698810 00007ffb`4806b01f mshtml!CRecalcLinePtr::MeasureLine+0x2a6
    0d 000000ea`2e698980 00007ffb`4806e3ea mshtml!CDisplay::RecalcLinesWithMeasurer+0x2f2
    0e 000000ea`2e698ae0 00007ffb`4806d555 mshtml!CDisplay::RecalcLines+0x6a
    0f 000000ea`2e698d20 00007ffb`48057c51 mshtml!CDisplay::RecalcView+0x54
    10 000000ea`2e698d60 00007ffb`4803af3d mshtml!CFlowLayout::CalcTextSize+0x303
    11 000000ea`2e698ed0 00007ffb`4805a85d mshtml!CFlowLayout::CalcSizeCoreCompat+0x4a9
    12 000000ea`2e699440 00007ffb`47b13a7f mshtml!CFlowLayout::CalcSizeVirtual+0x89
    13 000000ea`2e6994d0 00007ffb`4806969e mshtml!CLayout::CalcSize+0x247
    14 000000ea`2e699680 00007ffb`480694a8 mshtml!CFlowLayout::MeasureSite+0x42b
    15 000000ea`2e699800 00007ffb`4806936f mshtml!CFlowLayout::GetSiteWidth+0x123
    16 000000ea`2e6998b0 00007ffb`48071555 mshtml!CLSMeasurer::GetSiteWidth+0xaf
    17 000000ea`2e699930 00007ffb`511539fe mshtml!CEmbeddedILSObj::Fmt+0x261
    18 000000ea`2e699a50 00007ffb`51154acf msls31!ProcessOneRun+0x2f1
    19 000000ea`2e699ba0 00007ffb`511544fb msls31!FetchAppendEscCore+0x11f
    1a 000000ea`2e699ca0 00007ffb`511543bf msls31!FiniFormatGeneralCase+0x11b
    1b 000000ea`2e699d70 00007ffb`51153bef msls31!CreateLineCore+0x837
    1c 000000ea`2e699f10 00007ffb`4806e2e7 msls31!LsCreateLine+0x11f
    1d 000000ea`2e699fa0 00007ffb`480727c9 mshtml!CLSMeasurer::LSDoCreateLine+0x1c3
    1e 000000ea`2e69a170 00007ffb`4806ebf8 mshtml!CLSMeasurer::LSMeasure+0x79
    1f 000000ea`2e69a290 00007ffb`483648f0 mshtml!CLSMeasurer::Measure+0x160
    20 000000ea`2e69a320 00007ffb`48273b4d mshtml!CLSMeasurer::MeasureLine+0x3c
    21 000000ea`2e69a370 00007ffb`4806b01f mshtml!CRecalcLinePtr::MeasureLine+0x2a6
    22 000000ea`2e69a4e0 00007ffb`4806e3ea mshtml!CDisplay::RecalcLinesWithMeasurer+0x2f2
    23 000000ea`2e69a640 00007ffb`4806d555 mshtml!CDisplay::RecalcLines+0x6a
    24 000000ea`2e69a880 00007ffb`48057c51 mshtml!CDisplay::RecalcView+0x54
    25 000000ea`2e69a8c0 00007ffb`4803af3d mshtml!CFlowLayout::CalcTextSize+0x303
    26 000000ea`2e69aa30 00007ffb`4805a85d mshtml!CFlowLayout::CalcSizeCoreCompat+0x4a9
    27 000000ea`2e69afa0 00007ffb`47b13a7f mshtml!CFlowLayout::CalcSizeVirtual+0x89
    28 000000ea`2e69b030 00007ffb`4806969e mshtml!CLayout::CalcSize+0x247
    29 000000ea`2e69b1e0 00007ffb`480694a8 mshtml!CFlowLayout::MeasureSite+0x42b
    2a 000000ea`2e69b360 00007ffb`4806936f mshtml!CFlowLayout::GetSiteWidth+0x123
    2b 000000ea`2e69b410 00007ffb`48069959 mshtml!CLSMeasurer::GetSiteWidth+0xaf
    2c 000000ea`2e69b490 00007ffb`4806b97b mshtml!CLineServices::VerticalAlignOneObjectFast+0x443
    2d 000000ea`2e69b560 00007ffb`4806ea8a mshtml!CLineServices::VerticalAlignObjectsFast+0x2da
    2e 000000ea`2e69b6a0 00007ffb`483648f0 mshtml!CLSMeasurer::Measure+0x3c6
    2f 000000ea`2e69b730 00007ffb`48273b4d mshtml!CLSMeasurer::MeasureLine+0x3c
    30 000000ea`2e69b780 00007ffb`48078d35 mshtml!CRecalcLinePtr::MeasureLine+0x2a6
    31 000000ea`2e69b8f0 00007ffb`48065115 mshtml!CDisplay::RecalcLines+0x51f
    32 000000ea`2e69c4a0 00007ffb`4807ea6c mshtml!CDisplay::UpdateView+0x1cc
    33 000000ea`2e69c670 00007ffb`48059fde mshtml!CFlowLayout::CommitChanges+0xcb
    34 000000ea`2e69c770 00007ffb`4803af3d mshtml!CFlowLayout::CalcTextSize+0x51c
    35 000000ea`2e69c8e0 00007ffb`4805a85d mshtml!CFlowLayout::CalcSizeCoreCompat+0x4a9
    36 000000ea`2e69ce50 00007ffb`47b13a7f mshtml!CFlowLayout::CalcSizeVirtual+0x89
    37 000000ea`2e69cee0 00007ffb`48059e0c mshtml!CLayout::CalcSize+0x247
    38 000000ea`2e69d090 00007ffb`480547b7 mshtml!CFlowLayout::DoLayout+0x461
    39 000000ea`2e69d200 00007ffb`4797eea9 mshtml!CView::ExecuteLayoutTasks+0xe3
    3a 000000ea`2e69d290 00007ffb`4820e9da mshtml!CView::EnsureView+0x43f
    3b 000000ea`2e69d370 00007ffb`48356a72 mshtml!CElement::EnsureRecalcNotify+0xa4
    3c 000000ea`2e69d3b0 00007ffb`47d095ff mshtml!CElement::EnsureRecalcNotify+0x1e
    3d 000000ea`2e69d3f0 00007ffb`47d04046 mshtml!CDisplayPointer::MoveToMarkupPointer+0xaf
    3e 000000ea`2e69d460 00007ffb`47d0446a mshtml!CSelectionManager::CreateTrackerForContext+0x19e
    3f 000000ea`2e69d500 00007ffb`47d0434b mshtml!CSelectionManager::SetEditContext+0xe6
    40 000000ea`2e69d580 00007ffb`47d04e65 mshtml!CSelectionManager::SetEditContextFromElement+0x18b
    41 000000ea`2e69d670 00007ffb`47d07764 mshtml!CSelectionManager::SetInitialEditContext+0x45
    42 000000ea`2e69d6b0 00007ffb`47d086bc mshtml!CSelectionManager::Initialize+0x2a8
    43 000000ea`2e69d6e0 00007ffb`47a45272 mshtml!CHTMLEditor::Initialize+0x15c
    44 000000ea`2e69d760 00007ffb`47cefa20 mshtml!CDoc::GetHTMLEditor+0x11a
    45 000000ea`2e69d7a0 00007ffb`47c43116 mshtml!CElement::InjectInternal+0x807
    46 000000ea`2e69d960 00007ffb`47cc5b29 mshtml!CElement::InjectTextOrHTML+0x38d
    47 000000ea`2e69da40 00007ffb`47d4fc7d mshtml!CElement::put_innerText+0x29
    48 000000ea`2e69da80 00007ffb`47c48429 mshtml!GS_BSTR+0x12b
    49 000000ea`2e69daf0 00007ffb`47cdfed0 mshtml!CBase::ContextInvokeEx+0x658
    4a 000000ea`2e69dc10 00007ffb`4820d0bd mshtml!CElement::VersionedInvokeEx+0xb7
    4b 000000ea`2e69dcc0 00007ffb`465fa1e4 mshtml!CBase::PrivateInvokeEx+0x179
    4c 000000ea`2e69dd40 00007ffb`466df12e jscript9!HostDispatch::CallInvokeEx+0x1b6
    4d 000000ea`2e69de10 00007ffb`466df05b jscript9!HostDispatch::PutValueByDispId+0xb6
    4e 000000ea`2e69ded0 00007ffb`466df00f jscript9!HostDispatch::PutValue+0x37
    4f 000000ea`2e69df10 00007ffb`46734757 jscript9!HostDispatch::SetPropertyCore+0x6a
    50 000000ea`2e69df40 00007ffb`4656420c jscript9!Js::JavascriptOperators::OP_SetProperty+0x2f8
    51 000000ea`2e69dfd0 00007ffb`465644a2 jscript9!Js::JavascriptOperators::PatchPutValueNoFastPath+0x80
    52 000000ea`2e69e050 00007ffb`4650e240 jscript9!Js::InterpreterStackFrame::Process+0x5553
    53 000000ea`2e69e390 000000ea`217d0ddb jscript9!Js::InterpreterStackFrame::InterpreterThunk<1>+0x386
    54 000000ea`2e69e680 00007ffb`46509eb3 js!CPrintDoc_RectComplete [res://ieframe.dll/preview.js @ 2660,1]
    55 000000ea`2e69e6b0 00007ffb`4672ae52 jscript9!amd64_CallFunction+0x93
    56 000000ea`2e69e710 00007ffb`4650e240 jscript9!Js::InterpreterStackFrame::Process+0x1071
    57 000000ea`2e69ea50 000000ea`217d0dfb jscript9!Js::InterpreterStackFrame::InterpreterThunk<1>+0x386
    58 000000ea`2e69ec90 00007ffb`46509eb3 js!OnRectCompleteNext [res://ieframe.dll/preview.js @ 742,1]
    59 000000ea`2e69ecc0 00007ffb`4672ae52 jscript9!amd64_CallFunction+0x93
    5a 000000ea`2e69ed30 00007ffb`4650e240 jscript9!Js::InterpreterStackFrame::Process+0x1071
    5b 000000ea`2e69f070 000000ea`217d0de3 jscript9!Js::InterpreterStackFrame::InterpreterThunk<1>+0x386
    5c 000000ea`2e69f2e0 00007ffb`46509eb3 js!anonymous [Unknown script code @ 1,1]
    5d 000000ea`2e69f310 00007ffb`46509af1 jscript9!amd64_CallFunction+0x93
    5e 000000ea`2e69f360 00007ffb`46509cfe jscript9!Js::JavascriptFunction::CallFunction<1>+0x6d
    5f 000000ea`2e69f3a0 00007ffb`46509dff jscript9!Js::JavascriptFunction::CallRootFunction+0x110
    60 000000ea`2e69f480 00007ffb`46509d58 jscript9!ScriptSite::CallRootFunction+0x63
    61 000000ea`2e69f4e0 00007ffb`46623c42 jscript9!ScriptSite::Execute+0x122
    62 000000ea`2e69f570 00007ffb`46658594 jscript9!JavascriptDispatch::InvokeOnSelf+0x102
    63 000000ea`2e69f5f0 00007ffb`466586ab jscript9!JavascriptDispatch::InvokeEx+0x1e4
    64 000000ea`2e69f700 00007ffb`480d43a9 jscript9!JavascriptDispatch::Invoke+0x7b
    65 000000ea`2e69f750 00007ffb`47c84e73 mshtml!CWindow::ExecuteCallbackScript+0x144
    66 000000ea`2e69f8d0 00007ffb`4797e57e mshtml!CWindow::FireTimeOut+0x295
    67 000000ea`2e69f960 00007ffb`486236a1 mshtml!CPaintBeat::ProcessTimers+0x327
    68 000000ea`2e69fa00 00007ffb`47a45ee9 mshtml!CPaintBeat::OnWMTimer+0x61
    69 000000ea`2e69fa30 00007ffb`4796e166 mshtml!FormsOnTimer+0x9f
    6a 000000ea`2e69fa80 00007ffb`7ad324fd mshtml!GlobalWndProc+0x1c6
    6b 000000ea`2e69fb00 00007ffb`7ad32357 user32!UserCallWinProcCheckWow+0x149
    6c 000000ea`2e69fbd0 00007ffb`48667b84 user32!DispatchMessageWorker+0x1a7
    6d 000000ea`2e69fc50 00007ffb`785513f2 mshtml!ModelessThreadProc+0x1c4
    6e 000000ea`2e69fce0 00007ffb`7aec54f4 kernel32!BaseThreadInitThunk+0x22
    6f 000000ea`2e69fd10 00000000`00000000 ntdll!RtlUserThreadStart+0x34
    Thursday, August 1, 2019 10:29 AM

All replies

  • Hi Anitha NK,

    Only description and some log will not help us to find the cause for the issue.

    If possible for you than please try to provide any sample code with detailed steps to produce the issue.

    Also inform us, which OS and which exact build of OS you are using to make this test?

    It can be helpful for us to understand the issue in better way.

    Thanks for your understanding.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, August 2, 2019 7:49 AM
    Moderator