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.

AV when exit app using cef4delphi

Post Reply
dominicelliott
Posts: 6
Joined: Tue Mar 26, 2024 4:30 am

AV when exit app using cef4delphi

Post by dominicelliott »

When I create an app, using CEF4Delphi, and I exit the app, I get an AV which I cannot resolve.
But when I disable madExcept dfor that Project, there is no AV, all works fine. The moment I enable madExcept, I again get the AV on exit.

I did not get any issue with Delphi 10.x, only with 11.x and the updated madExcept.

This is a sample code:

Code: Select all

uses
  madExcept,
  madLinkDisAsm,
  madListHardware,
  madListProcesses,
  madListModules,
  Winapi.Windows,
  Vcl.Forms,
  uCEFApplication,
  Unit1 in 'Unit1.pas' {Form1};

{$R *.res}

begin
  GlobalCEFApp := TCefApplication.Create;

  GlobalCEFApp.FrameworkDirPath     := '.\cef';
  GlobalCEFApp.ResourcesDirPath     := '.\cef';
  GlobalCEFApp.LocalesDirPath       := '.\cef\locales';
  GlobalCEFApp.EnableGPU            := True;      // Enable hardware acceleration
  GlobalCEFApp.cache                := '.\cef\cache';
  GlobalCEFApp.UserDataPath         := '.\cef\User Data';

  if GlobalCEFApp.StartMainProcess then
  begin
//	  Application.Initialize;
//  	Application.MainFormOnTaskbar := True;
//	  Application.CreateForm(TForm1, Form1);
//		Application.Run;
  end;

  GlobalCEFApp.Free;	// <= crash with AV, but only when madExcept is enabled
end.
dominicelliott
Posts: 6
Joined: Tue Mar 26, 2024 4:30 am

Re: AV when exit app using cef4delphi

Post by dominicelliott »

Does anyone help me
dominicelliott
Posts: 6
Joined: Tue Mar 26, 2024 4:30 am

Re: AV when exit app using cef4delphi

Post by dominicelliott »

help me
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: AV when exit app using cef4delphi

Post by salvadordf »

Hi,

I'm busy these days but I'll take a look as soon as I can. I've never used madExcept and I need to learn a few things first.
dominicelliott
Posts: 6
Joined: Tue Mar 26, 2024 4:30 am

Re: AV when exit app using cef4delphi

Post by dominicelliott »

salvadordf wrote: Wed Mar 27, 2024 7:05 am Hi,

I'm busy these days but I'll take a look as soon as I can. I've never used madExcept and I need to learn a few things first.
Thank you
dominicelliott
Posts: 6
Joined: Tue Mar 26, 2024 4:30 am

Re: AV when exit app using cef4delphi

Post by dominicelliott »

salvadordf wrote: Wed Mar 27, 2024 7:05 am Hi,

I'm busy these days but I'll take a look as soon as I can. I've never used madExcept and I need to learn a few things first.
Hope to hear from you soon!
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: AV when exit app using cef4delphi

Post by salvadordf »

Hi,

I installed the latest madExcept in Delphi 12 Pro. I use the latest CEF4Delphi version available at GitHub.

I enabled madExcept in the following demos : SimpleBrowser, MiniBrowser and MDIBrowser.

I couldn't reproduce the AV in any of those demos. madExcept didn't detect any crashes or leaks.

Please, update CEF4Delphi and use one of the demos as a template for your application.
Post Reply