cefclient crashes (CEF 103.0.4)

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.

Re: cefclient crashes (CEF 103.0.4)

Postby naoki5 » Tue Jun 21, 2022 1:09 am

I installed the English version of Windows 10 in a virtual machine and tried it.
M103 cefclient has crashed.
The content written to debug.log is the same.
M102 cefclient does not crash.
naoki5
Expert
 
Posts: 105
Joined: Wed Jul 17, 2019 2:44 am

Re: cefclient crashes (CEF 103.0.4)

Postby naoki5 » Mon Jun 27, 2022 2:37 am

I downloaded binary distribution (cef_binary_103.0.7+g8963d1e+chromium-103.0.5060.53_windows32_beta.tar.bz2) and built it.
cefclient starts normally.
When I link the CEF created by this distribution with my application, it starts normally.
Thank you.
naoki5
Expert
 
Posts: 105
Joined: Wed Jul 17, 2019 2:44 am

Re: cefclient crashes (CEF 103.0.4)

Postby Aaaaaaaa » Mon May 01, 2023 11:12 am

I don't have permission to see the bitbucket page, but I guess this bug was never resolved, since I have the exact same issue using the official Debug build of version 111 or 112 (I tried with both)

When using the release/minimal build I get a segmentation fault instead of this message, whereas the OP says it works successfully. Also, this only happens when I build my program as a library and try to LD_PRELOAD it into something else; when building as a standalone exe I don't have any problems.

Is there at least a workaround?
Aaaaaaaa
Techie
 
Posts: 12
Joined: Wed Mar 15, 2023 2:36 pm

Re: cefclient crashes (CEF 103.0.4)

Postby magreenblatt » Mon May 01, 2023 11:18 am

magreenblatt wrote:Thanks, filed as https://bitbucket.org/chromiumembedded/cef/issues/3342

Does the crash reproduce with any other machines on the same network? Do you have a Windows 10 machine, or a non-Japanese language Windows install?

The new issue link is https://github.com/chromiumembedded/cef/issues/3342
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: cefclient crashes (CEF 103.0.4)

Postby Aaaaaaaa » Mon May 01, 2023 11:27 am

Thanks - looks like the only change there was in IS_WIN blocks, so either the issue was fixed only on Windows or I actually have a different issue with the same symptom. It's hard to be certain because the official spotifycdn builds for Linux don't come with debug symbols, at least none that I can find. Any suggestions?
Aaaaaaaa
Techie
 
Posts: 12
Joined: Wed Mar 15, 2023 2:36 pm

Re: cefclient crashes (CEF 103.0.4)

Postby Aaaaaaaa » Mon May 01, 2023 12:04 pm

Something I forgot to mention but which is actually very relevant now that I think about it: this crash happens when calling CefWindow::AddChildView when setting up the window. If I comment out that call, then I instead get a different error after entering CefRunMessageLoop.
Code: Select all
[0501/170214.395690:FATAL:ax_node_data.cc(674)] Check failed: name.empty() == GetNameFrom() == ax::mojom::NameFrom::kAttributeExplicitlyEmpty (1 vs. 0)If the accessible name of Role::kApplication class: '' is being set to an empty string to improve the user experience, call `SetNameExplicitlyEmpty` instead of `SetName`.
Aaaaaaaa
Techie
 
Posts: 12
Joined: Wed Mar 15, 2023 2:36 pm

Re: cefclient crashes (CEF 103.0.4)

Postby Aaaaaaaa » Mon May 01, 2023 1:12 pm

(Edit: I raised this as github issue 3494 so that any further discussion can go there)

Minimal reproduction. Definitely an issue on the CEF side.

foo.so
Code: Select all
#include <thread>
#include <stdlib.h>
#include "include/cef_app.h"

void EntryPoint() {
   CefMainArgs main_args;
   int exit_code = CefExecuteProcess(main_args, nullptr, nullptr);
   assert(exit_code == -1);
   CefSettings settings = CefSettings();
   settings.log_severity = LOGSEVERITY_DISABLE; // needed for cef-based lib to work correctly
   const char* subprocess = "subprocess"; // make sure you set this correctly, it won't warn you if you don't
   cef_string_from_utf8(subprocess, strlen(subprocess), &settings.browser_subprocess_path);
#if defined(OS_LINUX)
   // Unset LD_PRELOAD for current context, to prevent CEF's subprocesses trying to run this same library
   unsetenv("LD_PRELOAD");
#endif
   exit_code = CefInitialize(main_args, settings, nullptr, nullptr);
   assert(exit_code == 0);
   CefRunMessageLoop();
}

std::thread _main;
void __attribute__((constructor)) _init(int argc, char** argv) {
   _main = std::thread(&EntryPoint);
}


subprocess
Code: Select all
#include "include/cef_app.h"
int main(int argc, char* argv[]) {
   CefMainArgs main_args(argc, argv);
   CefExecuteProcess(main_args, nullptr, nullptr);
}


To run, just preload foo.so into any process, like `LD_PRELOAD=foo.so cat`

Produces the same error as reported by OP on any recent debug version of CEF.
Last edited by Aaaaaaaa on Mon May 01, 2023 2:08 pm, edited 1 time in total.
Aaaaaaaa
Techie
 
Posts: 12
Joined: Wed Mar 15, 2023 2:36 pm

Re: cefclient crashes (CEF 103.0.4)

Postby magreenblatt » Mon May 01, 2023 1:51 pm

It looks like you’re calling CefInitialize on a new thread (not the main application thread). That is unsupported.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Previous

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 21 guests