CEF application with Ozone porting on Linux crashes
Posted: 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
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