I have some problem with embedding cef to unreal engine 4 on macosx. The development environment is as follows.
- Unreal Engine Version : 4.26.2
- Operating System : Monterey 12.6.4
- Xcode : 14.2
- CEF Version : cef_binary_91.1.23+g04c8d56+chromium-91.0.4472.164_macosx64
- Execution type of CEF : Subprocess
the point that always occurred crash is cefinitialize function. callStack ends with a function named cef_time_delta when crash occurred.
I have 2 questions. first one is how to use dSYM file for debugging to unreal engine 4 on macosx? it is required to get more information to solve this crash issue through the process of debugging using dSYM.
and last one is why crash occurred at the function named cef_time_delta. I referenced initializing sequence of sample project(cefsimple), the sequence look like CefScopedLibraryLoader::LoadInMain should be called before CefInitialize function call. so I just follow that.
below code block show that the sequence of initialzing cef subprocess I used.
if anyone has solution to solve this crash issue, let me know how to deal with it, please ~
thanks to read this post
- Code: Select all
#if WITH_WEBUI_CEF3
// The FWebBrowserSingleton must be initialized on the game thread
check(IsInGameThread());
#if PLATFORM_MAC
CefScopedLibraryLoader library_loader;
if (!library_loader.LoadInMain()) {
UE_LOG( LogTemp, Error, TEXT("Can't Initialize CEF Library!!!") );
}
#endif
// Provide CEF with command-line arguments.
#if PLATFORM_WINDOWS
CefMainArgs MainArgs(hInstance);
#else
CefMainArgs MainArgs;
#endif
// Specify CEF global settings here.
CefSettings Settings;
Settings.no_sandbox = true;
#if !PLATFORM_LINUX
Settings.external_message_pump = true;
#endif
//@todo change to threaded version instead of using external_message_pump & OnScheduleMessagePumpWork
Settings.multi_threaded_message_loop = false;
Settings.windowless_rendering_enabled = true;
// Something to do......
// Specify path to sub process exe
FString SubProcessPath(FPaths::Combine(*FPaths::ProjectDir(), TEXT("Binaries"), CEF3_SUBPROCESS_EXE));
SubProcessPath = FPaths::ConvertRelativePathToFull(SubProcessPath);
if (!IPlatformFile::GetPlatformPhysical().FileExists(*SubProcessPath))
{
UE_LOG(LogWebInterfaceBrowser, Error, TEXT("CEFSubProcess not found, check that this program has been built and is placed in: %s."), *SubProcessPath);
}
CefString(&Settings.browser_subprocess_path) = TCHAR_TO_WCHAR(*SubProcessPath);
// Initialize CEF.
bool bSuccess = CefInitialize(MainArgs, Settings, CEFBrowserApp.get(), nullptr);
check(bSuccess);