Crash at LogMessage destructor

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Crash at LogMessage destructor

Postby oglo » Thu Jun 17, 2021 10:02 am

Finally, I've build my app with latest stable cef binary for debug mode. But my app crashes when doing
CefInitialize(main_args, settings, app, NULL);
, last function in call stack is ~LogMessage():
Code: Select all
>   libcef.dll!logging::LogMessage::~LogMessage() Line 886   C++
    libcef.dll!logging::LogMessage::~LogMessage() Line 559   C++
    libcef.dll!logging::CheckError::~CheckError() Line 107   C++
    [Inline Frame] libcef.dll!`anonymous namespace'::CefShutdownChecker::~CefShutdownChecker() Line 37   C++
    libcef.dll!`anonymous namespace'::`dynamic atexit destructor for 'g_shutdown_checker'() Line 38   C++
    libcef.dll!_execute_onexit_table::__l2::<lambda>() Line 206   C++
    libcef.dll!__crt_seh_guarded_call<int>::operator()<<lambda_69a2805e680e0e292e8ba93315fe43a8>,int <lambda>(void) &,<lambda_03fcd07e894ec930e3f35da366ca99d6> >(__acrt_lock_and_call::__l2::<lambda_69a2805e680e0e292e8ba93315fe43a8> && setup, _execute_onexit_table::__l2::int <lambda>(void) & action, __acrt_lock_and_call::__l2::<lambda_03fcd07e894ec930e3f35da366ca99d6> && cleanup) Line 204   C++
    [Inline Frame] libcef.dll!__acrt_lock_and_call(const __acrt_lock_id) Line 976   C++
    libcef.dll!_execute_onexit_table(_onexit_table_t * table) Line 231   C++
    libcef.dll!common_exit::__l2::<lambda>() Line 232   C++
    libcef.dll!__crt_seh_guarded_call<void>::operator()<<lambda_03b1d95aef87969028cfba75ccab2455>,void <lambda>(void) &,<lambda_22bdf7517842c4b3e53723af5aa32b9e> >(__acrt_lock_and_call::__l2::<lambda_03b1d95aef87969028cfba75ccab2455> && setup, common_exit::__l2::void <lambda>(void) & action, __acrt_lock_and_call::__l2::<lambda_22bdf7517842c4b3e53723af5aa32b9e> && cleanup) Line 225   C++
    [Inline Frame] libcef.dll!__acrt_lock_and_call(const __acrt_lock_id) Line 976   C++
    libcef.dll!common_exit(const int return_code, const _crt_exit_cleanup_mode cleanup_mode, const _crt_exit_return_mode return_mode) Line 278   C++
    libcef.dll!_cexit() Line 313   C++
    [External Code]   
    [Frames below may be incorrect and/or missing, no symbols loaded for playkit.exe]   Unknown

, lines of destructor are 884-889:
Code: Select all
      // Crash the process to generate a dump.
#if defined(OFFICIAL_BUILD) && defined(NDEBUG)
      IMMEDIATE_CRASH(); // Here
#else
      base::debug::BreakDebugger();
#endif

, it happens with NDEBUG macro defined. Without NDEBUG app crashes showing message that
Exception thrown at 0x7744F583 (ntdll.dll) in project.exe: 0xC0000005: Access violation writing location 0x00000014.

What the problem there may be?
oglo
Newbie
 
Posts: 6
Joined: Fri Jun 11, 2021 7:51 am

Re: Crash at LogMessage destructor

Postby magreenblatt » Thu Jun 17, 2021 11:25 am

What OS and CEF version? Are you using an official build or your own personal build? Does the problem reproduce with the CEF sample applications?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Crash at LogMessage destructor

Postby oglo » Fri Jun 18, 2021 4:43 am

I use Win10, MSVC2017 and "06/17/2021 - 91.1.19+ga92e5d5+chromium-91.0.4472.101 / Chromium 91.0.4472.101". I'm not sure about official build - I'm building libcef_dll_wrapper by my own as a subproject of my app. Yes, "cefclient" and "cefsimple" work correctly in both debug and release modes (I build them through a msvc project, generated by cmake).
Also I've tried the following: I created a new msvc solution from cef binary distribution and added my app as a subproject to it. "cefclient" and "cefsimple" still work, but my app is not, throwing the same exception. The code of my app is legacy and I don't known which version of cef it used before, but it's definitly not the latest, may be problem is here and something needs to be remade. Anyway, I'll be appreciate for any help.
oglo
Newbie
 
Posts: 6
Joined: Fri Jun 11, 2021 7:51 am

Re: Crash at LogMessage destructor

Postby magreenblatt » Fri Jun 18, 2021 9:41 am

It sounds like an issue with your application. I suggest a careful comparison to the CEF sample application code.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 33 guests