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.

Error loading libcef.dll

Post Reply
wolf
Posts: 20
Joined: Thu Jan 31, 2019 6:36 pm

Error loading libcef.dll

Post 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.
User avatar
salvadordf
Posts: 4037
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Error loading libcef.dll

Post 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.
wolf
Posts: 20
Joined: Thu Jan 31, 2019 6:36 pm

Re: Error loading libcef.dll

Post 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.
Post Reply