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.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Project crash Delphi in Debug mode

Post Reply
Martin Poulsen
Posts: 1
Joined: Fri Feb 28, 2025 7:28 am

Project crash Delphi in Debug mode

Post by Martin Poulsen »

Hi

I'm new to Cef4Delphi. we are looking for a browser to your win32 app and think Cef4Delphi i interesting.
I downloaded Cef4Delphi and binary Cefsharp, installed it. Builded and run the Demo\Delphi_VCL\simpleBrowser2 it seems fin (without the debugger)

I implemented CreateGlobalCEFApp, GlobalCEFApp.StartMainProcess and DestroyGlobalCEFApp and made a dialog allmost as in SimpleBrowser Demo
And Delphi crashes very hard when I start my win32 app with Debugger
it crashes in
GlobalCEFApp.StartMainProcess
TCefApplicationCore.SingleExeProcessing
TCefApplicationCore.InitializeLibrary
cef_initialize(CefLib.dll) <---- Here something goes wrongs i a thread
I did remember to insert {$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
As in the simpleBrowser2 project the app seems to work when running from explore or Delphi without debugger

I'm using Delphi 11.3 professionel (With Devexpress VCL) on a Windows 11 Pro

Any good ideas?

Best regards

Martin Poulsen
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Project crash Delphi in Debug mode

Post by salvadordf »

Hi,

Please, check that the contents of the "release" and "resources" folders of the CEF binaries are copied to the same directory as the executable.

The CEF binaries for 32 bits in Windows look like this :
Image

All the demos are configured to create the executable inside the CEF4Delphi\bin directory. Copy the CEF binaries into CEF4Delphi\bin directory too.

I just updated the screenshots in the Wiki page :
https://github.com/salvadordf/CEF4Delphi/wiki/Before-you-run-the-demos

Try to run the demos first. Then add the code to your application.

If your application opens databases in the initialization section then you should use a different executable for the CEF subprocesses. See the "SubProcess" demo.
Post Reply