FCEFWebBrowserWindow::OnKeyDown()
InternalCefBrowser->GetHost()->SendKeyEvent(KeyEvent);
is processed on the UE4 GameThread, inside the Chromium Embedded Framework (CEF) it appears to call a system function that needs to be on the macOS Application Main Thread dispatch queue.
Wrapping that call in a MainThreadCall() then moves the problem over to FCEFBrowserApp::TickMessagePump(), CefDoMessageLoopWork() then crashes with the same thread queue problem.
Finally wrapping that call in a MainThreadCall() leaves the WebBrowser widget in an unusable state. URLs are not loaded correctly.
1) Follow the instructions on:
https://docs.unrealengine.com/en-US/Engine/UMG/UserGuide/WidgetTypeReference/WebBrowser/index.html
To get a simple project and a WebBrowser widget setup.
2) Set the WebBrowser widget initial URL to something like www.google.com
3) PIE and attempt to enter a search term in the Google search box
4) Engine will crash with the specified call stack due to keydown event not processed on macOS main queue in the Chromium Embedded Framework
_dispatch_assert_queue_fail ()
dispatch_assert_queue ()
islGetInputSourceListWithAdditions ()
isValidateInputSourceRef ()
TSMGetInputSourceProperty ()
___lldb_unnamed_symbol129003$$Chromium Embedded Framework ()
___lldb_unnamed_symbol129002$$Chromium Embedded Framework ()
___lldb_unnamed_symbol58013$$Chromium Embedded Framework ()
___lldb_unnamed_symbol58818$$Chromium Embedded Framework ()
___lldb_unnamed_symbol90120$$Chromium Embedded Framework ()
___lldb_unnamed_symbol85868$$Chromium Embedded Framework ()
___lldb_unnamed_symbol161$$Chromium Embedded Framework ()
FCEFWebBrowserWindow::OnKeyDown(FKeyEvent const&) at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/WebBrowser/Private/CEF/CEFWebBrowserWindow.cpp:1023
FWebBrowserViewport::OnKeyDown(FGeometry const&, FKeyEvent const&) at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/WebBrowser/Private/WebBrowserViewport.cpp:107
SViewport::OnKeyDown(FGeometry const&, FKeyEvent const&) at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/Slate/Private/Widgets/SViewport.cpp:253
FSlateApplication::ProcessKeyDownEvent(FKeyEvent const&)::$_35::operator()(FArrangedWidget const&, FKeyEvent const&) const [inlined] at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/Slate/Private/Framework/Application/SlateApplication.cpp:4155
FReply FEventRouter::Route<FReply, FEventRouter::FBubblePolicy, FKeyEvent, FSlateApplication::ProcessKeyDownEvent(FKeyEvent const&)::$_35>(FSlateApplication*, FEventRouter::FBubblePolicy, FKeyEvent, FSlateApplication::ProcessKeyDownEvent(FKeyEvent const&)::$_35 const&) [inlined] at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/Slate/Private/Framework/Application/SlateApplication.cpp:372
FReply FEventRouter::RouteAlongFocusPath<FEventRouter::FBubblePolicy, FSlateApplication::ProcessKeyDownEvent(FKeyEvent const&)::$_35, FKeyEvent>(FSlateApplication*, FEventRouter::FBubblePolicy, FKeyEvent, FSlateApplication::ProcessKeyDownEvent(FKeyEvent const&)::$_35 const&) [inlined] at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/Slate/Private/Framework/Application/SlateApplication.cpp:353
FSlateApplication::ProcessKeyDownEvent(FKeyEvent const&) at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/Slate/Private/Framework/Application/SlateApplication.cpp:4151
FSlateApplication::OnKeyDown(int, unsigned int, bool) at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/Slate/Private/Framework/Application/SlateApplication.cpp:4059
FMacApplication::ProcessKeyDownEvent(FDeferredMacEvent const&, TSharedPtr<FMacWindow, (ESPMode)0>) at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/ApplicationCore/Private/Mac/MacApplication.cpp:1044
FMacApplication::ProcessEvent(FDeferredMacEvent const&) at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/ApplicationCore/Private/Mac/MacApplication.cpp:662
FMacApplication::ProcessDeferredEvents(float) at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/ApplicationCore/Private/Mac/MacApplication.cpp:244
FSlateApplication::TickPlatform(float) at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/Slate/Private/Framework/Application/SlateApplication.cpp:1375
FSlateApplication::Tick(ESlateTickType) at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/Slate/Private/Framework/Application/SlateApplication.cpp:1348
FEngineLoop::Tick() at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/Launch/Private/LaunchEngineLoop.cpp:4585
EngineTick() [inlined] at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/Launch/Private/Launch.cpp:62
GuardedMain(char16_t const*) at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/Launch/Private/Launch.cpp:175
::-[UE4AppDelegate runGameThread:](id) at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/Launch/Private/Mac/LaunchMac.cpp:222
::-[FCocoaGameThread main]() at /Volumes/Samsung-Black/UE4-Release/Engine/Source/Runtime/Core/Private/Mac/CocoaThread.cpp:383
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-88600 in the post.
10 |
Component | UE - Platform - Apple |
---|
Created | Feb 12, 2020 |
---|---|
Resolved | Nov 4, 2020 |
Updated | Apr 17, 2021 |