JVM crash when printing PDFs

Having problems with building or using the JCEF Java binding? Ask your questions here.

JVM crash when printing PDFs

Postby Easy1 » Tue Feb 28, 2017 9:24 am

hs_err_win7_ReleaseDLLs_PDB.log
hs_err logfile with EXCEPTION ACCESS VIOLATION in the COMCTL32.dll
(30.55 KiB) Downloaded 538 times
Hi everybody!

We are using JCEF to embed all kinds of web content in our product, especially showing and printing PDF documents.
Now we have the problem that we get sporadically crashes if we cancel the printing dialog with the "cancel" button or via "X". Our application crashes and is closed immediately, but we get an hs_err.logfile with an EXCEPTION ACCESS VIOLATION in the COMCTL32.dll. The problem also occurs if the pdf is printed, not only if I cancel the printing dialog. But unfortunately this usecase (printing the pdf), also crashes sporadically.

I already have posted a part of my problem under this topic viewtopic.php?f=17&t=14750, because I wanted to disable the debug checks within the Debug DLLs.
But after I didn't get any response, and I did some additional analysis, I wanted to describe my problem in a new topic with all the information I could collect so far, I hope that is OK.

Details:
Windows 7 32 bit
JCEF Version = 3.2704.150
CEF Version = 3.2704.1434
Chromium Version = 51.0.2704.103
Used JVM arguments: -Xmx512m
Used Application arguments: --ppapi-flash-path=\\pepflashplayer32.dll --allow-outdated-plugins --noerrdialogs --log-file=D:\Temp\head_ci\CEF_DUMMY.log

Our problem is only reproducible with Windows 7 (32bit), it is not reproducible with Windows 8 (64bit) or with Windows 10 (64bit). Unfortunately we could not test this problem with a Windows 7 64bit oder Windows 10 (32bit), so I don't
know if our problem occurs because of Windows 7 or because of 32bit or because of both (Win 7 and 32bit).

Use case (cancel print dialog) and reproduction with Windows 7:
Open any PDF, click the print button, print dialog is opened. Cancel the print dialog with "Cancel" button or with "X". It does not occur everytime, sometimes I have to click the print button and click the cancel button several times,
before the application crashes and is closed immediately. A hs_err.logfile is created with an EXCEPTION ACCESS VIOLATION in the COMCTL32.dll. See attached hs_err.logfile "hs_err_win7_ReleaseDLLs.log".
Unfortunately I don't get any further information or some stack with the Release pdb file or with the Debug pdb file.

Does anyone know, why I sporadically get such crashes with an EXCEPTION ACCESS VIOLATION in the COMCTL32.dll?

I really would appreciate your help!
Thank you!
Easy1
Newbie
 
Posts: 8
Joined: Mon Feb 20, 2017 8:23 am

Re: JVM crash when printing PDFs

Postby Easy1 » Tue Feb 28, 2017 11:10 am

I did some additional analysis, to get more useful informations and stacks, of the real problem for my JVM crash with the EXCEPTION_ACCESS_VIOLATION in the COMCTL32.dll.
All attached logfiles can be found in "Logfiles_and_hs_err_logfiles.7z".

1.) I used the Debug DLLs and the Debug pdb file to get a native stack, but unfortunately I get some errors, that some symbols could not be initialized, and a DCHECK in "chromium\src\cef\libcef\browser\context.cc" in the method "CefContext::Shutdown()" fails.
The DCHECK fails, because the init thread is not the same as the thread, who shuts down the application. But I don't think that this is the real problem, because at this point, the JVM already crashed, so I think this stack is not really helpful. But I attached the hs_err.logfile with the EXCEPTION_ACCESS_VIOLATION and the logfile with the failing DCHECK anyway. Please see attached "hs_err_win7_DebugDLLs_PDB_Failing_DCHECK.log" and "Win7_DebugDLLs_PDB_Failing_DCHECK_JCEF.log".

Here is the stack from the JCEF-Logfile (Win7_DebugDLLs_PDB_Failing_DCHECK_JCEF.log):

Code: Select all
[0216/143927:WARNING:resource_message_handler.cc(49)] 'Post' message handler failed to complete successfully.
[0216/143928:ERROR:singleton_hwnd.cc(34)] Cannot create windows on non-UI thread!
[0216/143958:ERROR:stack_trace_win.cc(65)] SymInitialize failed: 87
[0216/143958:FATAL:context.cc(322)] Check failed: OnInitThread().
Error initializing symbols (87).  Dumping unresolved backtrace:
   2EAC5E81
   2E9CE18B
   2E5C9F0C
   2E5C789E
   38083AFD
   357B060E
   357B00A3
   357B0153
   357B078A
   3577D68F
   3577D9D0
   35725959
   3572625E
   35726038
   357263FB
   357264FF
   77D18854
   77D1DF7A
   77D1E015
   779FBDF7
   68E97997
   68E97AB0
   68E97B1D
   6176B24D
   6176BE81
   6176EC2D
   617CDF4C
   61708A1E
   61708BA6
   61708C17
   616AD45F
   6172BDDC
   6172BECA
   61770466
   68ECC556
   68ECC600
   779EEF1C
   77D2367A
   77D2364D

[0216/143958:ERROR:render_process_impl.cc(103)] WebFrame LEAKED 1 TIMES
[0216/143958:ERROR:render_process_impl.cc(103)] WebFrame LEAKED 1 TIMES
[0216/143958:FATAL:v8_impl.cc(125)] Check failed: context_map_.empty().
Backtrace:
   base::debug::StackTrace::StackTrace [0x10845E81+33] (d:\git\cef\2704\chromium\src\base\debug\stack_trace_win.cc:215)
   logging::LogMessage::~LogMessage [0x1074E18B+75] (d:\git\cef\2704\chromium\src\base\logging.cc:520)
   `anonymous namespace'::CefV8IsolateManager::~CefV8IsolateManager [0x1032BF60+368] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\v8_impl.cc:126)
   `anonymous namespace'::CefV8IsolateManager::`scalar deleting destructor' [0x1032E6A6+22]
   `anonymous namespace'::CefV8StateManager::DestroyIsolateManager [0x10332FB9+265] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\v8_impl.cc:289)
   CefV8IsolateDestroyed [0x103303C4+20] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\v8_impl.cc:801)
   CefContentRendererClient::OnRenderProcessShutdown [0x1044CA63+19] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\content_renderer_client.cc:333)
   CefRenderProcessObserver::OnRenderProcessShutdown [0x1058836A+26] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\render_process_observer.cc:42)
   content::RenderThreadImpl::Shutdown [0x13FEFE03+115] (d:\git\cef\2704\chromium\src\content\renderer\render_thread_impl.cc:852)
   content::ChildProcess::~ChildProcess [0x145446C3+307] (d:\git\cef\2704\chromium\src\content\child\child_process.cc:71)
   content::RenderProcess::~RenderProcess [0x192BD27F+31] (d:\git\cef\2704\chromium\src\content\renderer\render_process.h:23)
   content::RenderProcessImpl::~RenderProcessImpl [0x192BD376+230] (d:\git\cef\2704\chromium\src\content\renderer\render_process_impl.cc:107)
   content::RendererMain [0x192BCC41+993] (d:\git\cef\2704\chromium\src\content\renderer\renderer_main.cc:211)
   content::RunNamedProcessTypeMain [0x165004E9+169] (d:\git\cef\2704\chromium\src\content\app\content_main_runner.cc:422)
   content::ContentMainRunnerImpl::Run [0x16500396+566] (d:\git\cef\2704\chromium\src\content\app\content_main_runner.cc:789)
   content::ContentMain [0x164FDED0+144] (d:\git\cef\2704\chromium\src\content\app\content_main.cc:19)
   CefExecuteProcess [0x103483E6+342] (d:\git\cef\2704\chromium\src\cef\libcef\browser\context.cc:118)
   cef_execute_process [0x101DC471+273] (d:\git\cef\2704\chromium\src\cef\libcef_dll\libcef_dll.cc:164)
   (No symbol) [0x0133B15E]
   (No symbol) [0x01337985]
   (No symbol) [0x0135EF2E]
   BaseThreadInitThunk [0x779EEF1C+18]
   RtlInitializeExceptionChain [0x77D2367A+239]
   RtlInitializeExceptionChain [0x77D2364D+194]


2.) Because with the Debug DLLs the DCHECK fails, I tried to ignore this DCHECK and added instead of a LOG(FATAL), to get a more useful stack, to get more information about what happens before the crash:

I uncommented this DCHECK in "chromium\src\cef\libcef\browser\context.cc" - Method: CefContext::Shutdown();
Code: Select all
void CefContext::Shutdown() {
  // Must always be called on the same thread as Initialize.
   LOG(INFO) << "Additional logging in context.cc: in method CefContext::Shutdown - ignore DCHECK(OnInitThread())";
    //DCHECK(OnInitThread());
    LOG(FATAL) << "Additional Logging and generate Stack in context.cc in method onInitThread";
   
   shutting_down_ = true;

  if (settings_.multi_threaded_message_loop) {
....
}


Here is the stack from the logfile "Win7_DebugDLLs_PDB_IgnoreDCHECK_LOG(FATAL)_For_Stack.log" . I also attached the hs_err.log "hs_err_Win7_DebugDLLs_PDB_IgnoreDCHECK_LOG(FATAL)_For_Stack".

Code: Select all
Error initializing symbols (87).  Dumping unresolved backtrace:
        18986A71
        1888ED7B
        1848A4CD
        1848789E
        21F4464D
        1F67115E
        1F670BF3
        1F670CA3
        1F6712DA
        1F63ED6F
        1F63F0B0
        1F5E64A9
        1F5E6DAE
        1F5E6B88
        1F5E6F4B
        1F5E704F
        77D18854
        77D1DF7A
        77D1E015
        779FBDF7
        68DA7997
        68DA7AB0
        68DA7B1D
        617AB24D
        617ABE81
        617AEC2D
        6180DF4C
        61748A1E
        61748BA6
        61748C17
        616ED45F
        6176BDDC
        6176BECA
        617B0466
        68DDC556
        68DDC600
        779EEF1C
        77D2367A
        77D2364D


[0222/112016:ERROR:render_process_impl.cc(103)] WebFrame LEAKED 1 TIMES
[0222/112016:ERROR:render_process_impl.cc(103)] WebFrame LEAKED 1 TIMES
C:\CGM\CGM_MPA_314_sap_at>[0222/112016:FATAL:v8_impl.cc(125)] Check failed: context_map_.empty().
Backtrace:
        base::debug::StackTrace::StackTrace [0x10846A71+33] (d:\git\cef\2704\chromium\src\base\debug\stack_trace_win.cc:217)
        logging::LogMessage::~LogMessage [0x1074ED7B+75] (d:\git\cef\2704\chromium\src\base\logging.cc:520)
        `anonymous namespace'::CefV8IsolateManager::~CefV8IsolateManager [0x1032BF60+368] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\v8_impl.cc:126)
        `anonymous namespace'::CefV8IsolateManager::`scalar deleting destructor' [0x1032E6A6+22]
        `anonymous namespace'::CefV8StateManager::DestroyIsolateManager [0x10332FB9+265] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\v8_impl.cc:289)
        CefV8IsolateDestroyed [0x103303C4+20] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\v8_impl.cc:801)
        CefContentRendererClient::OnRenderProcessShutdown [0x1044D1C3+19] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\content_renderer_client.cc:333)
        CefRenderProcessObserver::OnRenderProcessShutdown [0x10588C4A+26] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\render_process_observer.cc:42)
        content::RenderThreadImpl::Shutdown [0x13FF08B3+115] (d:\git\cef\2704\chromium\src\content\renderer\render_thread_impl.cc:852)
        content::ChildProcess::~ChildProcess [0x14545173+307] (d:\git\cef\2704\chromium\src\content\child\child_process.cc:71)
        content::RenderProcess::~RenderProcess [0x192BDDCF+31] (d:\git\cef\2704\chromium\src\content\renderer\render_process.h:23)
        content::RenderProcessImpl::~RenderProcessImpl [0x192BDEC6+230] (d:\git\cef\2704\chromium\src\content\renderer\render_process_impl.cc:107)
        content::RendererMain [0x192BD791+993] (d:\git\cef\2704\chromium\src\content\renderer\renderer_main.cc:211)
        content::RunNamedProcessTypeMain [0x16501039+169] (d:\git\cef\2704\chromium\src\content\app\content_main_runner.cc:422)
        content::ContentMainRunnerImpl::Run [0x16500EE6+566] (d:\git\cef\2704\chromium\src\content\app\content_main_runner.cc:789)
        content::ContentMain [0x164FEA20+144] (d:\git\cef\2704\chromium\src\content\app\content_main.cc:19)
        CefExecuteProcess [0x10348536+342] (d:\git\cef\2704\chromium\src\cef\libcef\browser\context.cc:119)
        cef_execute_process [0x101DC471+273] (d:\git\cef\2704\chromium\src\cef\libcef_dll\libcef_dll.cc:164)
        (No symbol) [0x0111B15E]
        (No symbol) [0x01117985]
        (No symbol) [0x0113EF2E]
        BaseThreadInitThunk [0x779EEF1C+18]
        RtlInitializeExceptionChain [0x77D2367A+239]
        RtlInitializeExceptionChain [0x77D2364D+194]

Backtrace:
Backtrace:
        base::debug::BreakDebugger [0x108469D6+22] (d:\git\cef\2704\chromium\src\base\debug\debugger_win.cc:21)
      cc::SharedBitmap::pixels       
      logging::LogMessage::~LogMessage [0x1074EFF3+707] (d:\git\cef\2704\chromium\src\base\logging.cc:738)
 [0x    `anonymous namespace'::CefV8IsolateManager::~CefV8IsolateManager [0x1032BF60+368] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\v8_impl.cc:126)
13ECD331        `anonymous namespace'::CefV8IsolateManager::`scalar deleting destructor' [0x1032E6A6+22]
+       `anonymous namespace'::CefV8StateManager::DestroyIsolateManager [0x10332FB9+265] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\v8_impl.cc:289)
17      CefV8IsolateDestroyed [0x103303C4+20] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\v8_impl.cc:801)
]       CefContentRendererClient::OnRenderProcessShutdown [0x1044D1C3+19] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\content_renderer_client.cc:333)
 (      CefRenderProcessObserver::OnRenderProcessShutdown [0x10588C4A+26] (d:\git\cef\2704\chromium\src\cef\libcef\renderer\render_process_observer.cc:42)
d:\git\cef\2704\chromium\src\cc\resources\shared_bitmap.h       content::RenderThreadImpl::Shutdown [0x13FF08B3+115] (d:\git\cef\2704\chromium\src\content\renderer\render_thread_impl.cc:852)
:       content::ChildProcess::~ChildProcess [0x14545173+307] (d:\git\cef\2704\chromium\src\content\child\child_process.cc:71)
29      content::RenderProcess::~RenderProcess [0x192BDDCF+31] (d:\git\cef\2704\chromium\src\content\renderer\render_process.h:23)
)
content::RenderProcessImpl::~RenderProcessImpl [0x192BDEC6+230] (d:\git\cef\2704\chromium\src\content\renderer\render_process_impl.cc:107)
                cc::ResourceProvider::CreateBitmapcontent::RendererMain [0x [0x17C7CFA3192BD791++291993]] ( (d:\git\cef\2704\chromium\src\cc\resources\resource_provider.ccd:\git\cef\2704\chromium\src\
content\renderer\renderer_main.cc::211)
556     content::RunNamedProcessTypeMain [0x16501039+169] (d:\git\cef\2704\chromium\src\content\app\content_main_runner.cc:422)
)       content::ContentMainRunnerImpl::Run [0x16500EE6+566] (d:\git\cef\2704\chromium\src\content\app\content_main_runner.cc:789)

        content::ContentMain [0x164FEA20+144] (d:\git\cef\2704\chromium\src\content\app\content_main.cc:19)
                CefExecuteProcess [0x10348536+342] (d:\git\cef\2704\chromium\src\cef\libcef\browser\context.cc:119)
cc::ResourceProvider::CreateResource    cef_execute_process [0x [0x17C7DD69101DC471++489273]] ( (d:\git\cef\2704\chromium\src\cc\resources\resource_provider.ccd:\git\cef\2704\chromium\src\cef\libcef_d
ll\libcef_dll.cc::164)
504     (No symbol) [0x0111B15E]
)       (No symbol) [0x01117985]

        (No symbol) [0x0113EF2E]
                BaseThreadInitThunk [0x779EEF1C+18]
cc::ScopedResource::Allocate     [0xRtlInitializeExceptionChain17DA1C84 [0x+77D2367A436+]239 (]d:\git\cef\2704\chromium\src\cc\resources\scoped_resource.cc
:       25RtlInitializeExceptionChain) [0x
77D2364D        +cc::ResourcePool::AcquireResource194 [0x]17CA08C4
+756] (d:\git\cef\2704\chromium\src\cc\resources\resource_pool.cc:134)
        cc::TileManager::CreateRasterTask [0x17CB8BDC+364] (d:\git\cef\2704\chromium\src\cc\tiles\tile_manager.cc:846)
        cc::TileManager::ScheduleTasks [0x17CBC8C3+1235] (d:\git\cef\2704\chromium\src\cc\tiles\tile_manager.cc:761)
        cc::TileManager::PrepareTiles [0x17CBB892+674] (d:\git\cef\2704\chromium\src\cc\tiles\tile_manager.cc:461)
        cc::LayerTreeHostImpl::PrepareTiles [0x17B80C25+101] (d:\git\cef\2704\chromium\src\cc\trees\layer_tree_host_impl.cc:476)
        cc::LayerTreeHostImpl::CommitComplete [0x17B79DD6+294] (d:\git\cef\2704\chromium\src\cc\trees\layer_tree_host_impl.cc:361)
        cc::ProxyImpl::ScheduledActionCommit [0x17D64C29+1033] (d:\git\cef\2704\chromium\src\cc\trees\proxy_impl.cc:575)
        cc::Scheduler::ProcessScheduledActions [0x17D722F8+536] (d:\git\cef\2704\chromium\src\cc\scheduler\scheduler.cc:696)
        cc::Scheduler::NotifyReadyToCommit [0x17D71285+197] (d:\git\cef\2704\chromium\src\cc\scheduler\scheduler.cc:179)
        cc::ProxyImpl::StartCommitOnImpl [0x17D67336+1350] (d:\git\cef\2704\chromium\src\cc\trees\proxy_impl.cc:275)
        base::internal::RunnableAdapter<void (__thiscall cc::ProxyImpl::*)(cc::CompletionEvent *,cc::LayerTreeHost *,base::TimeTicks,bool)>::Run<cc::CompletionEvent * const &,cc::LayerTreeHost * const
 &,base::TimeTicks const &,bool const &> [0x17C28016+102] (d:\git\cef\2704\chromium\src\base\bind_internal.h:181)
        base::internal::InvokeHelper<1,void,base::internal::RunnableAdapter<void (__thiscall cc::ProxyImpl::*)(cc::CompletionEvent *,cc::LayerTreeHost *,base::TimeTicks,bool)> >::MakeItSo<base::WeakPt
r<cc::ProxyImpl>,cc::CompletionEvent * const &,cc::LayerTreeHos [0x17C2785E+94] (d:\git\cef\2704\chromium\src\base\bind_internal.h:325)
        base::internal::Invoker<base::IndexSequence<0,1,2,3,4>,base::internal::BindState<base::internal::RunnableAdapter<void (__thiscall cc::ProxyImpl::*)(cc::CompletionEvent *,cc::LayerTreeHost *,ba
se::TimeTicks,bool)>,void __cdecl(cc::ProxyImpl *,cc::Completio [0x17D5D3EE+174] (d:\git\cef\2704\chromium\src\base\bind_internal.h:362)
        base::Callback<void __cdecl(void),1>::Run [0x1035145F+47] (d:\git\cef\2704\chromium\src\base\callback.h:397)
        base::debug::TaskAnnotator::RunTask [0x10886913+387] (d:\git\cef\2704\chromium\src\base\debug\task_annotator.cc:53)
        base::MessageLoop::RunTask [0x10782DB9+729] (d:\git\cef\2704\chromium\src\base\message_loop\message_loop.cc:474)
        base::MessageLoop::DeferOrRunPendingTask [0x10780BE4+52] (d:\git\cef\2704\chromium\src\base\message_loop\message_loop.cc:485)
        base::MessageLoop::DoWork [0x1078127D+221] (d:\git\cef\2704\chromium\src\base\message_loop\message_loop.cc:594)
        base::MessagePumpDefault::Run [0x1088FF54+244] (d:\git\cef\2704\chromium\src\base\message_loop\message_pump_default.cc:33)
        base::MessageLoop::RunHandler [0x10782A8E+238] (d:\git\cef\2704\chromium\src\base\message_loop\message_loop.cc:437)
        base::RunLoop::Run [0x107E3CA6+70] (d:\git\cef\2704\chromium\src\base\run_loop.cc:36)
        base::MessageLoop::Run [0x1078294F+239] (d:\git\cef\2704\chromium\src\base\message_loop\message_loop.cc:290)
        base::Thread::Run [0x107FE126+22] (d:\git\cef\2704\chromium\src\base\threading\thread.cc:203)
        base::Thread::ThreadMain [0x107FED08+792] (d:\git\cef\2704\chromium\src\base\threading\thread.cc:254)
        base::`anonymous namespace'::ThreadFunc [0x10778823+243] (d:\git\cef\2704\chromium\src\base\threading\platform_thread_win.cc:84)
        BaseThreadInitThunk [0x779EEF1C+18]
        RtlInitializeExceptionChain [0x77D2367A+239]
        RtlInitializeExceptionChain [0x77D2364D+194]


I don't know if this stack is more useful, but I saw that there are some resource files generated. I added some logging and found out, that with Windows 7, those generated resource files, have the resourcetype = "RESOURCE_TYPE_BITMAP". For comparison I used those Debug DLLs and the Debug pdb file with additional logging with Windows 8 and Windows 10. I could find out, that the generated resource files on Windows 8 and Windows 10 have another resourcetype = "RESOURCE_TYPE_GL_TEXTURE". So the resource files on windows 7 are generated in a different way than the resource files on windows 8 or windows 10.

Is it possible that those resource files are the reason, why I get crashes with Windows 7, but not with Windows 8 or 10. Or is there another reason why I get those crashes with Windows 7?
Or is it some timing problem?
I have a general question about those resource files? What are those files for? And why are they generated differently with Windows 7 and Windows 8/10?

Thank you for your help!
Attachments
Logfiles_and_hs_err_logfiles.7z
Collection of JCEF and hs_err logfiles
(15.83 KiB) Downloaded 498 times
Easy1
Newbie
 
Posts: 8
Joined: Mon Feb 20, 2017 8:23 am


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 14 guests