SendMouseClickEvent segmentation fault on ARM

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.

SendMouseClickEvent segmentation fault on ARM

Postby maierht » Wed Nov 25, 2015 8:58 am

I build CEF Release 2526 and I am on a CuBox-i 4x4 running armbian 4.5 (Debian Jessie Desktop) I have a headless browser which displays the content. I capture the created browser in the OnAfterCreated() method. When i get the browser host and i want to send mouse events i get an segmentation fault.
Calling SendMouseEvent within the OnPaint method (OSR) works! Any suggestions?
Code: Select all
    CefMouseEvent mouseEvent;
    mouseEvent.modifiers = eventFlags;
    mouseEvent.x = mouseX;
    mouseEvent.y = mouseY;

    if (BrowserHandlerSingleton::CurrentBrowser != NULL)
    {
        CefBrowserHost * host = BrowserHandlerSingleton::CurrentBrowser->GetHost();
        // host->Invalidate(BrowserHandlerSingleton::PaintElementType::PET_VIEW);
        host->SendMouseMoveEvent(mouseEvent, false);
    }
maierht
Newbie
 
Posts: 2
Joined: Wed Nov 25, 2015 8:38 am

Re: SendMouseClickEvent segmentation fault on ARM

Postby magreenblatt » Wed Nov 25, 2015 12:43 pm

What is the symbolized call stack for the crash?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: SendMouseClickEvent segmentation fault on ARM

Postby maierht » Thu Nov 26, 2015 3:26 am

I have found a solution:
CefBrowserHost * host = BrowserHandlerSingleton::CurrentBrowser->GetHost();
must be replaced with
CefRefPtr<CefBrowserHost> host = BrowserHandlerSingleton::CurrentBrowser->GetHost();

I think it is an issue with the reference counting
maierht
Newbie
 
Posts: 2
Joined: Wed Nov 25, 2015 8:38 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 107 guests