1

If I set the switch CEF_MULTI_THREADED_MESSAGE_LOOP and CefSingleProcess := True the application will crash everytime CefShutDown is called. Can someone can explain why this happens? It crashes with builds past 15xx.

unit test;

interface

uses
  Winapi.Windows,
  Winapi.Messages,
  System.SysUtils,
  System.Variants,
  System.Classes,
  Vcl.Graphics,
  Vcl.Controls,
  Vcl.Forms,
  Vcl.Dialogs,
  WACefVCL,
  WACefLib;

type
  TForm2 = class(TForm)
    WAChromium1: TWAChromium;
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;
  WAChromium: TWAChromium;

implementation

{$R *.dfm}

procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  WAChromium.Free;
  CefShutDown; // crash on build 1650/1673/1916 works on build 1547
end;

procedure TForm2.FormCreate(Sender: TObject);
begin
  CefSingleProcess := True;
  CefLoadLibDefault;

  //WAChromium1
  WAChromium := TWAChromium.Create(nil);

  //WAChromium1
  WAChromium.Parent := Self;
  WAChromium.Left := 0;
  WAChromium.Top := 0;
  WAChromium.Width := 1024;
  WAChromium.Height := 768;
  WAChromium.DefaultUrl := 'about:blank';
  WAChromium.TabOrder := 0;

  WAChromium.Load('www.google.com');

end;

end.
user3060326
  • 187
  • 2
  • 16
  • Sorry to bother you, i do not know the answer to your question but I thought you might be able to help me. I am trying to run a project using TWAChromium with no success as I receive the following error message: Exception EExternalException in module libcef.dll. Did you n=manage to compile and run a project containing a TWAChromium component successfully? If yes would you be so kind to send me the working DLLs. Thank you for your help – user1536396 Jul 24 '14 at 06:55
  • could you solve that problem? – rouge Sep 05 '14 at 14:19
  • CefSingleProcess := True runs CEF in a single (main app) thread (for debugging) so CEF_MULTI_THREADED_MESSAGE_LOOP is not compatible. – vzamanillo Feb 12 '15 at 17:01

0 Answers0