Terminating CEF simpleApp from a thread

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: Terminating CEF simpleApp from a thread

Postby HarmlessDave » Fri May 13, 2016 1:52 pm

In Windows programming it's common to create either one "mainframe" window that controls the others, or sometimes an invisible "listener" window for message handling. Using one of those for the CEF thread might make sense. Then it doesn't matter how you shuffle and close the other windows, the mainframe or listener persists until the application is closed.
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm

Re: Terminating CEF simpleApp from a thread

Postby ratin3 » Mon May 16, 2016 12:59 pm

Well its the same with Linux, you can create a root window and a bunch of child windows and CEF could be loaded in one of these child windows, you can propagate input events to child windows from master window and vice-versa (option chosen during the creation of the child window). The only problem is that CEF is not supported on Linux to be run from a separate thread than the main application thread, due to some other reason which i dont comprehend. I get this when I try to instantiate the thread in a dynamic manner:

[0516/074332:ERROR:proxy_service_factory.cc(130)] Cannot use V8 Proxy resolver in single process mode.
[0516/074332:WARNING:histograms.cc(40)] Started multiple compositor clients (Browser, Renderer) in one process. Some metrics will be disabled.
[0516/074333:ERROR:shell.cc(293)] Error: Instance: exe:chrome attempting to register an instance for a process it created for target: exe:chrome_renderer without the mojo:shell{client_process} capability class.

It then crashes with the text "Alarm clock" printed on the console

May be it gets a SIGALRM (I know my application generates timer events) and that interferes with the CEF.


But then if I restart the app, it works (even when CEF is launched in a thread, but this time thread is launched immediately when the app launches). Basically it works when I launch the CEF thread from the get-go, when I start the app. But if I load the thread in a delayed manner, manually with a button from UI etc, it throws that message. I am yet to solve this puzzle.
ratin3
Techie
 
Posts: 22
Joined: Wed Apr 20, 2016 1:15 pm

Previous

Return to Support Forum

Who is online

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