Page 1 of 1

Error on StartMainProcess

Posted: Wed Feb 23, 2022 1:29 pm
by FelipeIwata
Hello,

I just updated my component on RAD 10.3 to the new cef 4 delphi's version 98.2 but I'm obtaining an error on GlobalCEFApp.StartMainProcess:

Debugger Exception Notification
Project IntegradorNew.exe raised exception class $C000001D with message 'system exception (code 0xc000001d) at 0x53ddd98a'.


And this is my code on dpr file:

GlobalCEFApp := TCefApplication.Create;

GlobalCEFApp.FrameworkDirPath := 'cef';
GlobalCEFApp.ResourcesDirPath := 'cef';
GlobalCEFApp.LocalesDirPath := 'cef\locales';
GlobalCEFApp.cache := 'cef\cache';
GlobalCEFApp.UserDataPath := 'cef\User Data';
GlobalCEFApp.LogFile := 'debug.log';

If GlobalCEFApp.StartMainProcess then
Begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TFrmMenu, FrmMenu);
Application.CreateForm(TDM, DM);
Application.CreateForm(TDmWeb, DmWeb);
Application.Run;
End;

GlobalCEFApp := nil;
GlobalCEFApp.Free;

I have already updated the binaries files also !

PS.: My project was develop under the 90.5 cef4delphi's version, I don't know if it makes any difference.

Thanks,

Re: Error on StartMainProcess

Posted: Wed Feb 23, 2022 5:45 pm
by salvadordf
If you're upgrading from an old CEF4Delphi version Delphi may be using old BPL and DCU files.

Follow these instructions to uninstall and install CEF4Delphi again :
https://www.briskbard.com/forum/viewtopic.php?f=8&t=772#p3481

Some users had to delete the DCU files generated for their application too.

Re: Error on StartMainProcess

Posted: Wed Feb 23, 2022 6:12 pm
by FelipeIwata
I uninstalled Delphi and installed again just in case, but I didn't try to delete the .dcu files. I'll try this and then I'll reply again

Re: Error on StartMainProcess

Posted: Wed Feb 23, 2022 6:25 pm
by FelipeIwata
I tried to delete the .dcu files, the .bpl file but the same issue is still happening

Re: Error on StartMainProcess

Posted: Wed Feb 23, 2022 8:28 pm
by salvadordf
The usual culprits for these kind of errors are :
  • Old BPL and DCU files. You already checked this.
  • Incorrect version of the CEF binaries.
  • Incomplete set of the CEF binaries.
  • Trying to use the debug version of the CEF binaries instead of the release version.

Re: Error on StartMainProcess

Posted: Wed Feb 23, 2022 9:13 pm
by FelipeIwata
I'm gonna try to use the debug version of the CEF binaries and then i'll reply again !

Re: Error on StartMainProcess

Posted: Fri Feb 25, 2022 1:10 pm
by FelipeIwata
Before replacing the binaries, I unnistalled Delphi again, deleted the .bpl file and .dcu files on my project.

Then, I installed Delphi and the new version of CEF using the Debug binaries but same error is still occuring.

Re: Error on StartMainProcess

Posted: Fri Feb 25, 2022 1:41 pm
by salvadordf
I just built the SimpleBrowser2 demo using the latest CEF4Delphi version 98.2.0

Download it from here :
https://www.briskbard.com/cef/SimpleBrowser2.zip

Decompress it and run it. It should run without problems unless there's a hardware compatibility problem or the antivirus gives a false positive and deletes some file.

Build your application in 32 bits and copy all the files inside SimpleBrowser2.zip to the "cef" directory that is used by your application for the CEF binaries.

Re: Error on StartMainProcess

Posted: Fri Feb 25, 2022 3:47 pm
by FelipeIwata
Thanks for the help salvador ! I'll try this and then i'll reply again !

Re: Error on StartMainProcess

Posted: Fri Feb 25, 2022 7:41 pm
by FelipeIwata
It works perfectly ! Thank you very much salvador, I really appreciated your help !