CEF in a plugin appplication

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.

CEF in a plugin appplication

Postby Divo » Sun Aug 31, 2014 12:29 pm

HI, sorry my poor English.
I have a simple VST plugin application http://www.steinberg.net/en/company/developers.html and i`am try to inject in plugin window CEF.
VST plugin - it is jest simple dll, on the similarity of MS COM technology.
when plugin window is opening, the Init function is called:
void WebViewLight::Init ()
{
CefMainArgs mainArgs (::GetModuleHandle (nullptr));
void* sandBox = nullptr;

this->appHandler_ = new AppHandler;

if (CefExecuteProcess (mainArgs, this->appHandler_.get (), NULL) >= 0)
return;

CefSettings settings;
CefString (&settings.user_agent) = "user-agent";
CefString (&settings.locales_dir_path) = "resources\\locales";
CefString (&settings.resources_dir_path) = "resources";
CefString (&settings.browser_subprocess_path) = "render.exe";
CefString (&settings.locale) = "ru";
settings.log_severity = LOGSEVERITY_VERBOSE;
settings.no_sandbox = true;
settings.multi_threaded_message_loop = false;

CefInitialize (mainArgs, settings, this->appHandler_.get (), NULL);
this->inited = true;
}
then created Browser Window.
When window is closed, DeInit function called:
CefShutdown ();

Well, in first window open all ok - plugin window is showing with correct CEF window.
when window closing and opening again plugin host application (VST3PluginTestHost in examlple) is crushing on CefInitialize.

in log-file:
[0831/212744:FATAL:content_main_runner.cc(727)] Check failed: InitializeSandbox(params.sandbox_info).

what am i doing wrong?
thanks!
Divo
Newbie
 
Posts: 3
Joined: Sun Aug 31, 2014 12:16 pm

Re: CEF in a plugin appplication

Postby magreenblatt » Sun Aug 31, 2014 9:57 pm

Calling CefInitialize/CefShutdown multiple times in the same process is not supported.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: CEF in a plugin appplication

Postby Divo » Mon Sep 01, 2014 3:02 am

ok, thanks for the answer!
but there is a right solution?
Divo
Newbie
 
Posts: 3
Joined: Sun Aug 31, 2014 12:16 pm

Re: CEF in a plugin appplication

Postby Divo » Mon Sep 01, 2014 8:21 am

update: i can`t close (stop) main process, it is host program, the plugin does not have access to it.
Is there a way to manually release CEF resources?
Divo
Newbie
 
Posts: 3
Joined: Sun Aug 31, 2014 12:16 pm


Return to Support Forum

Who is online

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

cron