CefBrowserHost::SendKeyEvent crash on MacOS [CEF 84-90]

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.

CefBrowserHost::SendKeyEvent crash on MacOS [CEF 84-90]

Postby Ljuzig » Mon May 23, 2022 6:24 pm

I moved my project from CEF 59 to CEF 84 recently, I managed to fix everything but I keep getting a crash every time the CefBrowserHost::SendKeyEvent(const CefKeyEvent& event) function is called.
The function is called in my rendering thread, the same one in which CefDoMessageLoopWork() is called;
I also tried other versions after 84: 87, 89 and 90 (all latest version as of today). In all of them the same crash occurs.
I'm on MacOS and I'm using CEF with OSR. I tried on a MacPro and on a MacBookPro, BigSur and Monteray, no difference.

Code: Select all
CefRefPtr<CefBrowserHost> Host = InternalCefBrowser->GetHost();
Host->SendKeyEvent(KeyEvent);


There are the value passed, it's just a simple "A" from the keyboard. Same values worked just fine in the old CEF library.
Code: Select all
KeyEvent.type: 0
KeyEvent.native_key_code: 0
KeyEvent.character: 97
KeyEvent.unmodified_character: 97
KeyEvent.windows_key_code: 0
KeyEvent.modifiers: 0
KeyEvent.is_system_key: 0
KeyEvent.focus_on_editable_field: 0


This is the stack trace:
Code: Select all
SIGILL: illegal instruction

_dispatch_assert_queue_fail 0x00007fff2025d25d
dispatch_assert_queue 0x00007fff2025d1f2
islGetInputSourceListWithAdditions 0x00007fff289a8d80
isValidateInputSourceRef 0x00007fff289ab56d
TSMGetInputSourceProperty 0x00007fff289ab435
[Inlined] ui::TranslatedUnicodeCharFromKeyCode(__TISInputSource*, unsigned short, unsigned short, unsigned int, unsigned int, unsigned int*) 0x0000000196478156
ui::(anonymous namespace)::MacKeycodeAndModifiersToCharacter(unsigned short, int, bool*) 0x0000000196478141
ui::DomKeyFromNSEvent(NSEvent*) 0x0000000196477d55
[Inlined] content::(anonymous namespace)::DomKeyFromEvent(NSEvent*) 0x000000019478b0ec
content::WebKeyboardEventBuilder::Build(NSEvent*, bool) 0x000000019478b0e7
[Inlined] content::NativeWebKeyboardEvent::NativeWebKeyboardEvent(NSEvent*) 0x000000019478c9ac
content::NativeWebKeyboardEvent::NativeWebKeyboardEvent(NSEvent*) 0x000000019478c9a5
CefBrowserPlatformDelegateNativeMac::TranslateWebKeyEvent(CefStructBase<CefKeyEventTraits> const&) const 0x00000001958e51a6
CefBrowserPlatformDelegateOsr::SendKeyEvent(CefStructBase<CefKeyEventTraits> const&) 0x000000019586939f
(anonymous namespace)::browser_host_send_key_event(_cef_browser_host_t*, _cef_key_event_t const*) 0x00000001924c6025
WebBrowserWindow::OnKeyDown(FKeyEvent const&) WebBrowserWindow.cpp:1231


Thanks in advance for any help you can provide.
Ljuzig
Newbie
 
Posts: 1
Joined: Mon May 23, 2022 4:19 pm

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 50 guests