when using onKeyEvent stange break/crash occurs

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.

when using onKeyEvent stange break/crash occurs

Postby lolovo » Tue Jul 04, 2017 4:40 am

Hi,

When using in cefsimple onKeyEvent and in window press key (for example, f12) there is a strange break/crash:
Code: Select all
ntdll.dll!_KiRaiseUserExceptionDispatcher@0()


code:
Code: Select all
//SimpleHandler.h
class SimpleHandler : public CefClient,
                      ...
         public CefKeyboardHandler,
...
                      {
 public:
...
  virtual bool SimpleHandler::OnKeyEvent(CefRefPtr<CefBrowser> browser,
     const CefKeyEvent& event,
     CefEventHandle os_event) OVERRIDE;
...

//SimpleHandler.cc
bool SimpleHandler::OnKeyEvent(CefRefPtr<CefBrowser> browser,
   const CefKeyEvent& event,
   CefEventHandle os_event)
{
   if (event.character == 123)//f12
   {
      browser->Reload();
      return true;
   }

   return false;
}
lolovo
Mentor
 
Posts: 67
Joined: Fri Aug 12, 2016 6:11 am

Re: when using onKeyEvent stange break/crash occurs

Postby magreenblatt » Tue Jul 04, 2017 11:47 am

What OS and CEF version? What is the symbolized call stack for the crash?

You can likely avoid the crash by calling Reload asynchronously. See https://bitbucket.org/chromiumembedded/ ... ting-tasks
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: when using onKeyEvent stange break/crash occurs

Postby lolovo » Tue Jul 04, 2017 12:56 pm

OS WIN10 64bit, CEF 3.2987.1601.gf035232 (may be others).
Strange break happened when f12 is pressed in debug mode application run and there is no need to dd onKeyEvent even to obtain this issue.... stack is only this - ntdll.dll!_KiRaiseUserExceptionDispatcher@0() and if press continue run button after it goes forward. When app is running standalone (not in MSVS) there is no any crash. Didn't saw it in win7 when same CEF was used. Exception list/parameters of MSVS2015U3 used by default. It seems for me that it is combination of exception parameters of MSVS + Win10, not CEF...
lolovo
Mentor
 
Posts: 67
Joined: Fri Aug 12, 2016 6:11 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 49 guests