Page 1 of 1

Error loading libcef.dll

Posted: Tue Mar 12, 2019 11:00 am
by wolf
It took me a long time until I could figure this out, I only saw this very rarely and it was reported rarely by our users.

When an EXE is started, there are multiple attempts to access the libcef.dll (eg. "if CheckCEFLibrary and LoadCEFlibrary then"). Sometimes we also load multiple instances of our EXE. If a virus scanner or another security suite locks the DLL for example after CheckCEFLibrary for a short time, then LoadCEFlibrary fails. The concrete error message is "Error loading libcef.dll Error code: 0x0000020".

If libcef.dll is locked before calling CheckCEFLibrary, you get "Unsupported CEF version ... Found libcef.dll version: 0.0.0.0".

Not sure if it makes sense to make multiple attempts with a short delay if accessing/loading the DLL fails. I just wanted to report that something like that can happen under rare circumstances.

Re: Error loading libcef.dll

Posted: Tue Mar 12, 2019 11:23 am
by salvadordf
Thanks for reporting this issue!

That error code means ERROR_SHARING_VIOLATION. If you need to show some message in your application when this error occurs you can do this :
  • If GlobalCEFApp.StartMainProcess returns FALSE and GlobalCEFApp.ProcessType is ptBrowser then read the GlobalCEFApp.Status value to show a custom error message.

Re: Error loading libcef.dll

Posted: Tue Mar 12, 2019 11:42 am
by wolf
Thanks for the hint, I'm going to show a custom error message now to point the user into the right direction.

Thank you very much.