CEF application on macOS 10.14 (Mojave)

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: CEF application on macOS 10.14 (Mojave)

Postby magreenblatt » Mon Nov 12, 2018 5:25 pm

You can try the usual options: https://www.chromium.org/for-testers/enable-logging

Is the renderer process getting created? Are you getting any load-related callbacks?
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: CEF application on macOS 10.14 (Mojave)

Postby charles » Mon Nov 12, 2018 6:39 pm

Just jumping in here as I'm experiencing similar issues on Mojave when compiling with Xcode 10.1 after adding the sandbox and dynamic loading functionality. The page "started loading" / "finished loading" (HTTP 200) callbacks are being received, but no actual pixel data is being returned. Code has been working fine on both Windows and Mac for years before, so a bit odd.

I'm getting the same warning upon running. Also, when the app is running and I check the processes using “ps -ax | grep", I'm seeing both the main process and the included helper.

The included Cefclient and Cefsimple apps however are working.
charles
Techie
 
Posts: 15
Joined: Wed Apr 01, 2015 6:59 am

Re: CEF application on macOS 10.14 (Mojave)

Postby magreenblatt » Mon Nov 12, 2018 6:51 pm

Can you list all of the code and configuration changes that you’ve made to your app for the 3538 branch update? Perhaps I can point out if you’ve missed something.
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: CEF application on macOS 10.14 (Mojave)

Postby charles » Mon Nov 12, 2018 7:00 pm

Mainly the changes brought up in https://bitbucket.org/chromiumembedded/ ... cv2sandbox

1. linked cef_sandbox into the helper
2. added CefScopedSandboxContext to the helper
3. no longer link directly to the CEF framework, but replaced by dynamic calls on boot -- LoadInMain (in the main app) and LoadInHelper (in the helper)
4. removed rpath adjustments

The added calls are not returning any errors and things are booting up as before. However, when calling CefInitialize the app does return "[ERROR:gpu_process_transport_factory.cc(990)] Lost UI shared context.". The sample apps that do work also seem to be returning the same error.

Am I missing something obvious here? We're not using UnderlayOpenGLHostingWindow.
charles
Techie
 
Posts: 15
Joined: Wed Apr 01, 2015 6:59 am

Re: CEF application on macOS 10.14 (Mojave)

Postby magreenblatt » Mon Nov 12, 2018 7:23 pm

charles wrote:Mainly the changes brought up in https://bitbucket.org/chromiumembedded/ ... cv2sandbox

1. linked cef_sandbox into the helper
2. added CefScopedSandboxContext to the helper
3. no longer link directly to the CEF framework, but replaced by dynamic calls on boot -- LoadInMain (in the main app) and LoadInHelper (in the helper)
4. removed rpath adjustments

The added calls are not returning any errors and things are booting up as before. However, when calling CefInitialize the app does return "[ERROR:gpu_process_transport_factory.cc(990)] Lost UI shared context.". The sample apps that do work also seem to be returning the same error.

Am I missing something obvious here? We're not using UnderlayOpenGLHostingWindow.

That all sounds correct. I can’t think of anything you’re missing. Are you using windowed or off-screen rendering?
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: CEF application on macOS 10.14 (Mojave)

Postby simonpearce » Mon Nov 12, 2018 7:29 pm

Sounds like we are both struggling with the same thing Charles !

I checked in my code and everything appears to be working normally - callbacks for loading start, load end, title change etc. are all fired.

The only thing not working is the OnPaintOverride().

I turned on verbose logging too and nothing obvious as an error or warning.
simonpearce
Techie
 
Posts: 36
Joined: Tue Oct 27, 2015 2:32 pm

Re: CEF application on macOS 10.14 (Mojave)

Postby charles » Mon Nov 12, 2018 7:30 pm

Off-screen:

CefWindowInfo window_info;
window_info.SetAsWindowless(nullptr);
window_info.windowless_rendering_enabled = true;

Also setting both the disable-gpu and disable-gpu-compositing flag.

Were there any major changes somewhere, i.e. in the way the event loop is handled? Perhaps some changes were missed over one or multiple CEF updates.
charles
Techie
 
Posts: 15
Joined: Wed Apr 01, 2015 6:59 am

Re: CEF application on macOS 10.14 (Mojave)

Postby magreenblatt » Mon Nov 12, 2018 7:36 pm

charles wrote: CefWindowInfo window_info;
window_info.SetAsWindowless(nullptr);

Cefclient specifies a valid parent NSView: https://bitbucket.org/chromiumembedded/ ... ac.mm-1227. Can you try that?
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: CEF application on macOS 10.14 (Mojave)

Postby charles » Mon Nov 12, 2018 8:01 pm

This doesn't seem to be making much difference, though I am running this from a command line app without visible UI. I'll try adjusting my OpenGL app tomorrow and see what that gives.
charles
Techie
 
Posts: 15
Joined: Wed Apr 01, 2015 6:59 am

Re: CEF application on macOS 10.14 (Mojave)

Postby charles » Tue Nov 13, 2018 5:24 am

Instead of reworking my entire application I did some more testing with the latest Cefclient and discovered that:

1. When I don't pass the NSView to SetAsWindowless, then I no longer receive the onPaint calls. (To be expected)
2. When I set windowless_rendering_enabled to true in combination with the NSView to a nullptr, onPaint calls are received again. (How it has always worked in my app in the past)

For some reason this only seems to be working in the Cefclient and not in my existing codebase. onPaint is never called anymore on Mojave.

The second bit is that it's a bit odd that osr would need a view, as the library wouldn't be useable in command line applications then.
charles
Techie
 
Posts: 15
Joined: Wed Apr 01, 2015 6:59 am

PreviousNext

Return to Support Forum

Who is online

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