Closed Taronyu closed 2 months ago
Thanks for the quick fix. While the cefclient example doesn't crash anymore, I have now the issue that the overlay browser is not created. Is this a new issue or am I using it wrong? As far as I see, there is no browser instance created. According to the documentation, the browser instance is created when the overlay view is added to the views hierarchy, which I assumed whould happen when adding the view to the window. See code below (taken from the provided patch file)
// Browser view
CefBrowserSettings settings = {};
browser_view_ = CefBrowserView::CreateBrowserView(
nullptr, "https://bitbucket.org/chromiumembedded/cef/", settings, nullptr,
nullptr, nullptr);
browser_view_controller_ =
window->AddOverlayView(browser_view_, CEF_DOCKING_MODE_CUSTOM, true);
I can create a new issue with the same patch file if it's a new one.
I have now the issue that the overlay browser is not created.
We don't currently test the usage of browser views in overlays. Please add a new issue.
Ok, I created #3790
Describe the bug Since CEF 125, when adding an overlay view the code will crash due to an illegal memory access. I did some debugging with a modified cefclient application. I think it comes down to an invalid
static_cast
.When the overlay view is added, eventually
CefBrowserView::AddedToWidget
is called. This will callCefWidget::GetForWidget
on the suppliedwidget
and there is a check if the view is using Alloy style or Chrome style. In my case the widget is cast toChromeBrowserFrame
but according to the debugger thewidget
is of typeThemeCopyingWidget
. The cast result in an invalid_vfptr
pointer, which is then dereferenced by the caller, causing the crash.To Reproduce Steps to reproduce the behavior:
cefclient_testcode.patch
. This will add an overlay view to the cefclient application.--use-views --hide-frame --hide-controls
CefBrowserViewImpl::AddedToWidget
Expected behavior Application must not crash.
Screenshots Exception: Note that
cef_widget
is a valid pointer but its_vfptr
is null.Invalid type cast: Note that
widget
is of typeThemeCopyingWidget
and cast toChromeBrowserFrame
Versions (please complete the following information):
Additional context cefclient_testcode.patch