CEF application with Ozone porting on Linux crashes

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.

CEF application with Ozone porting on Linux crashes

Postby vladbezuglyy » Fri Oct 13, 2017 3:09 am

Hi All,

I was wondering if anybody could clarify for me current status of CEF application running on Linux with Ozone as UI interface. I had my own platform (embedded) for which I have implemented Ozone porting. I had used it a long time ago with Chromium 43. I have my app which inherits CefApp, some custom handler and corresponding "main" file which runs everything. This works fine with old version of Chromium/CEF.

Now I wanted to switch to a modern version of CEF/Chromium, I use Chromium 62 and CEF 3202. I can see new concept appearing in chromium for UI, like Mus and Mash. I basically generate build with following arguments (the build is on Linux machine, cross-compiling to arm linux):

gn args out/Release_GN_x64 --args="use_ozone=true enable_package_mash_services=true ozone_platform_myplatform=true" + more parameters to set custom toolchain

and ozone_platform_myplatform is properly defined in gn and gni files and implemented. To build:

ninja -C out/Release_GN_x64 mybrowser

mybrowser target is described in BUILD.gn for CEF next to cefclient and cefsimple.

It builds fine, but when I run it on target device, it basically crashes like this:

#5 0x0000b479daee views::DesktopNativeWidgetAura::InitNativeWidget()
#6 0x0000b4792c76 views::Widget::Init()
#7 0x0000b3691a7e CefWindowDelegateView::Init()
#8 0x0000b368f354 CefBrowserPlatformDelegateNativeLinux::CreateHostWindow()
#9 0x0000b35e8d2a CefBrowserHostImpl::CreateHostWindow()
#10 0x0000b35ed668 CefBrowserHostImpl::CreateInternal()
#11 0x0000b35ed930 CefBrowserHostImpl::Create()
#12 0x0000b35edf6c CefBrowserHost::CreateBrowserSync()
...

InitNativeWidget is in desktop_native_widget_aura.cc and particular line in this function is DesktopWindowTreeHost::Create(native_widget_delegate_, this); Now, the problem is that DesktopWindowTreeHost::Create in desktop_window_tree_host_ozone.cc says that it should not actually reach this point and that "Ozone builds should use DesktopWindowTreeHostMus codepath". I'm very puzzled by this, does it seem that CEF is not aware of MUS/MASH presence? Is it still possible to use Ozone "approach" to have embedded browser?

Much appreciate any input on this problem
Vlad
vladbezuglyy
Newbie
 
Posts: 2
Joined: Fri Oct 13, 2017 2:57 am

Re: CEF application with Ozone porting on Linux crashes

Postby magreenblatt » Fri Oct 13, 2017 4:14 am

CEF does not yet support ozone. See https://bitbucket.org/chromiumembedded/ ... lternative
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: CEF application with Ozone porting on Linux crashes

Postby vladbezuglyy » Fri Oct 13, 2017 4:35 am

Thanks for a quick reply. Would it be fair to say that previously CEF supported Ozone, but not now? Because I know for a fact that my CEF application based on custom ozone platform (not X11) works, with old Chromium and CEF, but indeed some modification was required on my side (to guard from using libX11) and at least first part (Make the X11 dependency a compile-time option.) is done in my case? But that seems not to be enough?
vladbezuglyy
Newbie
 
Posts: 2
Joined: Fri Oct 13, 2017 2:57 am

Re: CEF application with Ozone porting on Linux crashes

Postby magreenblatt » Fri Oct 13, 2017 4:54 am

CEF has never supported Ozone. As you say, it can potentially be made to work with modifications to CEF/Chromium. The linked issue is about getting it working with current CEF/Chromium versions. Contributions to that effort are welcome.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 49 guests