We face many crashes during the initilization of CEF but it only happens at customer side, not at R&D, so it's difficult to debug them.
Involved CEF version can be 142 or 144, depending on the customer.
OS is windows
Particular configuration : OSR mode + multi_threaded_message_loop==true
We have captured (minidump) the callstack for the crash, in the CEFUIThread :
- Code: Select all
[Inline Frame] std::__Cr::unique_ptr<...>::reset Line 285 C++
[Inline Frame] std::__Cr::unique_ptr<...>::operator= Line 225 C++
ChromeContentBrowserClient::SetSamplingProfiler Line 8764 C++
[Inline Frame] CefMainRunner::BeforeUIThreadInitialize Line 453 C++
[Inline Frame] CefMainRunner::ContentMainRun::<lambda> Line 311 C++
[Inline Frame] base::internal::DecayedFunctorTraits<...>::Invoke Line 648 C++
[Inline Frame] base::internal::InvokeHelper<...>::MakeItSo Line 922 C++
[Inline Frame] base::internal::Invoker<...>::RunImpl Line 1059 C++
base::internal::Invoker<...>::RunOnce Line 972 C++
[Inline Frame] base::OnceCallback<...>::Run Line 155 C++
CefUIThread::ThreadMain Line 98 C++
base::`anonymous namespace'::ThreadFunc Line 105 C++
This task has been initiated in the main thread method CefMainRunner::ContentMainRun with the call
- Code: Select all
if (multi_threaded_message_loop_) {
...
if (!CreateUIThread(base::BindOnce(
[](CefMainRunner* runner, base::WaitableEvent* event,
int* exit_code) {
runner->BeforeUIThreadInitialize();
...
}
and here below the code of method BeforeUIThreadInitialize
- Code: Select all
void CefMainRunner::BeforeUIThreadInitialize() {
static_cast<ChromeContentBrowserClient*>(
CefAppManager::Get()->GetContentClient()->browser())
->SetSamplingProfiler(
std::make_unique<MainThreadStackSamplingProfiler>());
I guess the method GetContentClient()->browser() returns nullptr but after having debugged a normal scenario (i.e. that not crashes), I didn't succeed to imagine conditions where this method returns a nullptr.
any idea is welcome ...
