Page 1 of 1

How to turn on SingleProcess Mode

Posted: Tue Dec 08, 2020 7:45 am
by Lingri
Hello!
I using CEF version 87.1.6+g315d248+chromium-87.0.4280.66_windows32

How can I turn on a SingleProcess Mode in a final application correctly?

With this option process of my application stays in Task Manager after closing application.

Re: How to turn on SingleProcess Mode

Posted: Tue Dec 08, 2020 8:57 am
by salvadordf
Hi,

The single process mode is not supported by CEF and it should only be used for debugging purposes.

Please read this for more information :
https://github.com/salvadordf/CEF4Delphi/issues/291

Re: How to turn on SingleProcess Mode

Posted: Tue Dec 08, 2020 10:28 am
by Lingri
Is there any information on whether support for this mode is planned in the future?

Re: How to turn on SingleProcess Mode

Posted: Tue Dec 08, 2020 3:15 pm
by salvadordf
Only Chromium developers know that.

Re: How to turn on SingleProcess Mode

Posted: Wed Jan 27, 2021 1:48 pm
by Pipinux
Hello.
I imported/adapted the delphi component to compile in the C++ Builder 6 environment.
To solve the issue of hanging app I opted to use this line of code before the free of the cefapplication object.

if (Ucefapplication::GlobalCEFApp->SingleProcess)
ExitProcess(0);

Re: How to turn on SingleProcess Mode

Posted: Fri Mar 05, 2021 8:43 am
by dilfich
Quite a useful mode for simple projects where the browser requirements are minimal and you do not need a bunch of unnecessary processes, it is a pity that this direction is not developed.
ExitProcess(0); although a crutch, it really saves you from hanging.

Re: How to turn on SingleProcess Mode

Posted: Fri Feb 25, 2022 10:35 am
by dilfich
Are there any other tricks for this mode? Sometimes it is really convenient for simple one-page projects. It's a pity that they chose one-sided development without a light option. :(

Such errors can be removed from the log like this.. there doesn't seem to be much use, but still.
[0217/094630.820:ERROR:dxva_video_decode_accelerator_win.cc(1427)] DXVAVDA fatal error: Could not load mf.dll: Не найден указанный модуль. (0x7E)
[0217/094630.847:ERROR:system_network_context_manager.cc(679)] Cannot use V8 Proxy resolver in single process mode.

Code: Select all

 GlobalCEFApp.AddCustomCommandLine('--winhttp-proxy-resolver');
 GlobalCEFApp.AddCustomCommandLine('--disable-accelerated-video-decode');
Perhaps something else will help turn it on or off for more stable operation?

Re: How to turn on SingleProcess Mode

Posted: Fri Feb 25, 2022 1:18 pm
by salvadordf
As far as I know there are no plans to support single process mode.
You can also try using a different EXE for the subprocesses to add a simple browser in those applications.