crash on mouse wheel

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.

crash on mouse wheel

Postby nickak2003 » Mon Feb 15, 2021 5:11 pm

I try to send mouse wheel event, this code used to work, I think. It results in a exception at send_mouse_wheel_event.
I am doing windowless mode.

Code: Select all
   CefMouseEvent mouse_event;
   mouse_event.x = evt.x;
   mouse_event.y = evt.y;
   mouse_event.modifiers = mCurrentKeyModifiers;

   mBrowser->GetHost()->SendMouseWheelEvent(mouse_event, evt.x, evt.y);

breakpoint in here:
Code: Select all
void CefBrowserHostCToCpp::SendMouseWheelEvent(const CefMouseEvent& event,
                                               int deltaX,
                                               int deltaY) {
  shutdown_checker::AssertNotShutdown();

  cef_browser_host_t* _struct = GetStruct();
  if (CEF_MEMBER_MISSING(_struct, send_mouse_wheel_event))
    return;

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  _struct->send_mouse_wheel_event(_struct, &event, deltaX, deltaY);
}
nickak2003
Techie
 
Posts: 43
Joined: Fri Apr 10, 2015 6:53 pm

Re: crash on mouse wheel

Postby magreenblatt » Mon Feb 15, 2021 5:47 pm

What OS and CEF version? Does the problem reproduce with the cefclient sample application?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: crash on mouse wheel

Postby amaitland » Mon Feb 15, 2021 5:52 pm

You appear to be sending x and y values rather than the delta.

https://github.com/chromiumembedded/cef ... in.cc#L747

From memory delta is in I increments of 120(plus or minus depending on direction).
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am

Re: crash on mouse wheel

Postby nickak2003 » Tue Feb 16, 2021 10:55 am

So, I am using windows 10, latest cef3.

So I have experimented with it some:

deltaX and deltaY is a combination of zero and one, or two ones: results in exception.
deltaX and deltaY is a combination of at least one non-one: results in no exception.

1, 1: exception
1, 120 : no exception
1, 0 : exception
0,0 : no exception
0, 120 : no exception

*does not need to be 120, can be 2
nickak2003
Techie
 
Posts: 43
Joined: Fri Apr 10, 2015 6:53 pm

Re: crash on mouse wheel

Postby magreenblatt » Tue Feb 16, 2021 12:14 pm

If you download symbols you can get a useful stack trace. Also, check the debug log for error messages.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: crash on mouse wheel

Postby wpp » Tue Oct 11, 2022 4:08 am

I also had the same problem, the picture is an error message:
Image
wpp
Newbie
 
Posts: 1
Joined: Sun Oct 09, 2022 8:42 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 79 guests