Strange subprocess behavour on linux

Having problems with building or using CEF? This forum is here to help. Please do not post bug reports or feature requests here.

Strange subprocess behavour on linux

Postby fr3nzy » Thu May 17, 2018 6:06 am

Hello,

I am trying to develop a dynamic library on Ubuntu 16.04.4 x64 Desktop with CEF 3.3359.1768.g8e7c5d6.
Currently i have problems with simple startup and shutdown of the app, which are called from an application linked to my dynamic library which is linked to libcef.so.
When i execute CefQuitMessageLoop the shutdown procedure hangs on CefShutdown.
I need to create a working .so, but i have tried this procedure in a simple application directly linked to libcef.so and it worked, it appears that i'm missing some CEF configuration for dynamic library or it has some behaviour dependant on library/application type. Also I have similar dynamic library for windows and it is working very good. Anyone with the same experience or knowledge, please help.

Edit: I tried to change my library type to static and the application worked as intended. This raises the following quiestion: Is there any restriction on running CEF in shared/dynamic library on linux platform?

Startup and main thread code:
Code: Select all
::XSetErrorHandler(XErrorHandlerImpl);
::XSetIOErrorHandler(XIOErrorHandlerImpl);

CefEnableHighDPISupport();

CefMainArgs mainArgs;

CefSettings settings;
settings.command_line_args_disabled = true;
settings.multi_threaded_message_loop = false;
settings.no_sandbox = true;
CefString(&settings.browser_subprocess_path).FromASCII("./cefprocess");

std::cout << "t1\n";
CefInitialize(mainArgs, settings, nullptr, nullptr);
//signal initialize success to other threads
std::cout << "t2\n";
CefRunMessageLoop();
std::cout << "t3\n";
CefShutdown();
std::cout << "t4\n";
//signal termination


Shutdown code:
Code: Select all
std::cout << "m1\n";
CefPostTask(TID_UI, base::Bind(&CefQuitMessageLoop));
std::cout << "m2\n";
//wait for termination
std::cout << "m3\n";
fr3nzy
Techie
 
Posts: 13
Joined: Tue Sep 12, 2017 5:47 am

Return to Support Forum

Who is online

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