Why does CefInitialize start another instance of my app?

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.

Why does CefInitialize start another instance of my app?

Postby rdh » Tue Jun 16, 2020 3:36 pm

Warning: I'm new to CEF!

When I fire up my Windows app and later call CefInitialize, that call starts another instance of my app and passes it this command line:

"XXXX.exe" --type=gpu-process --field-trial-handle=4868,10117890558132789303,11035995072505931086,131072 --enable-features=CastMediaRouteProvider --disable-features=OutOfBlinkCors --no-sandbox --log-file="r:\program64\debug.log" --lang=en-US --gpu-preferences=MAAAAAAAAADgAAAwAAAAAAAAAAAAAAAAAABgAAAAAAAQAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAgAAAAAAAAACgAAAAAAAAAMAAAAAAAAAA4AAAAAAAAABAAAAAAAAAAAAAAAAUAAAAQAAAAAAAAAAAAAAAGAAAAEAAAAAAAAAABAAAABQAAABAAAAAAAAAAAQAAAAYAAAA= --log-file="r:\program64\debug.log" --mojo-platform-channel-handle=4876 /prefetch:2

I have tried this passing my HINSTANCE and zero as my HINSTANCE. I have tried the CefSettings.multi_threaded_message_loop set to true and set to false. I have tried "no_sandbox" set to true and to false. Still, this occurs every time I run. The result is the desktop app appears twice. I haven't seen any setting that would indicate I can prevent this. I do see the browser_subprocess_path and am not setting it and I suspect that is the reason. But, what would I set it to? I also see command_line_args_disabled and I set it to 1 to see if the second instance didn't get that command line passed to it but it still did.

I thought I could embed CEF into my existing app and use it to render webpages in one of our windows we display when running one of our commands. Currently we use the Microsoft Web Browser control for that but it is at end of lifetime so we need another solution that I hope CEF will provide. Am I way off base here?

Any suggestions on what I am doing wrong would be so greatly appreciated.
rdh
Techie
 
Posts: 33
Joined: Wed Jun 10, 2020 3:18 pm

Re: Why does CefInitialize start another instance of my app?

Postby magreenblatt » Tue Jun 16, 2020 5:00 pm

magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

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