Page 1 of 1

AV when exit app using cef4delphi

Posted: Tue Mar 26, 2024 4:36 am
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.

Re: AV when exit app using cef4delphi

Posted: Wed Mar 27, 2024 1:45 am
by dominicelliott
Does anyone help me

Re: AV when exit app using cef4delphi

Posted: Wed Mar 27, 2024 1:45 am
by dominicelliott
help me

Re: AV when exit app using cef4delphi

Posted: Wed Mar 27, 2024 7:05 am
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.

Re: AV when exit app using cef4delphi

Posted: Wed Mar 27, 2024 10:36 am
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

Re: AV when exit app using cef4delphi

Posted: Wed Mar 27, 2024 10:37 am
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!

Re: AV when exit app using cef4delphi

Posted: Wed Mar 27, 2024 2:39 pm
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.