Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Reasons for StartMainProcess returning false

Post Reply
fneumann
Posts: 9
Joined: Thu Jan 21, 2021 4:02 pm

Reasons for StartMainProcess returning false

Post by fneumann »

Hi all,

we saw in our application that some (not many but some) users have problems with the CEF-webbrowser. We first ensure that the client has installed Windows 7 or newer and that the directory with the binaries exist.

What might be reasons why method StartMainProcess fails/returns false? And - if not obvious - how can these problems be fixed/prevented?

If you require any more information feel free to ask.

Thank you for any help in advance.
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Reasons for StartMainProcess returning false

Post by salvadordf »

Hi,

That issue could be caused by several things. It would be really helpful if your application could write the CEF debug log file in this case. That log could have important clues about the CEF initialization.

Add the values of GlobalCEFApp.Status and GlobalCEFApp.MissingLibFiles to the log too.

Some of the possible causes :
  • The antivirus blocked the access to some file in the CEF binaries.
  • Hardware incompatibilities. Specially if the application sets GlobalCEFApp.EnabledGPU to true.
  • Unresolved CEF issues. For example :
    • https://bitbucket.org/chromiumembedded/cef/issues/2830/crash-when-using-a-proxy-with-extensions
    • https://bitbucket.org/chromiumembedded/cef/issues/3066/starting-cef-takes-lots-of-cpu-and
fneumann
Posts: 9
Joined: Thu Jan 21, 2021 4:02 pm

Re: Reasons for StartMainProcess returning false

Post by fneumann »

Thank you for your suggestion.

The logfile is really "talkative" for debug-logging. Is there a chance to enable logging only while executing method StartMainProcess (I played around a little but I did not find a way how to disable logging after StartMainProcess has already been called) or only when StartMainProcess returned false? I would like to prevent enabling debug-log for all our customers by default while there is only a small part of users (around 0.1%) who has problems with initialization of the CEF-webbrowser. Unfortunately, I can not contact the affected users because I receive unpersonalized bug-reports only.

Adding the values of GlobalCEFApp.Status and GlobalCEFApp.MissingLibFiles to the log-file of our application sounds fine to me und I will implement that.
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Reasons for StartMainProcess returning false

Post by salvadordf »

CEF only allows you to enable or disable the log when the application is initialized. If you enable it then it will be logging while the application is running.

You can reduce the log size by setting the debugging severity to "info" :

Code: Select all

GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;


If your users have hardware issues or problems with the antivirus I would also log this in case there's a problem :
  • Graphics card brand and model.
  • Antivirus and firewall software installed in the computer.
I would add some code to your application that detects this initialization issue and then enables the debug log for the next time the application is executed.
fneumann
Posts: 9
Joined: Thu Jan 21, 2021 4:02 pm

Re: Reasons for StartMainProcess returning false

Post by fneumann »

Hi again,

just for you as information: Meanwhile we added logging of status and missing libfiles. It looks like that missing lib-files are the main-reason for our problems. As our software update-process returns information which indicate that update could have been installed without any problems we now assume that antivirus software removes some of the lib-files afterwards.
We are going to further investigate this problem, e. g. by checking the lib-files using the VirusTotal API.
Post Reply