Page 1 of 1

Strange crash with .. dots in FrameWorkDirPath or ResourcesDirPath

Posted: Fri Sep 20, 2019 12:32 pm
by JanDoggen
- CEF4Delphi is in C:\DelphiLibs\CEF4Delphi-master, so the VCL demos are in C:\DelphiLibs\CEF4Delphi-master\demos\Delphi_VCL\
- The CEF3 files are copied into C:\DelphiLibs\CEF4Delphi-master\demos\Delphi_VCL\cef3

This works:

GlobalCEFApp.FrameworkDirPath := 'C:\DelphiLibs\CEF4Delphi-master\demos\Delphi_VCL\cef3';
GlobalCEFApp.ResourcesDirPath := GlobalCEFApp.FrameworkDirPath;
GlobalCEFApp.LocalesDirPath := GlobalCEFApp.FrameworkDirPath + '\locales';

This fails with an access violation:

GlobalCEFApp.FrameworkDirPath := 'C:\DelphiLibs\CEF4Delphi-master\demos\Delphi_VCL\SimpleBrowser\..\cef3';
GlobalCEFApp.ResourcesDirPath := GlobalCEFApp.FrameworkDirPath;
GlobalCEFApp.LocalesDirPath := GlobalCEFApp.FrameworkDirPath + '\locales';

The error occurs in
GlobalCEFApp.StartMainProcess -> SingleExeProcessing -> InitializeLibrary(TempApp) on the cef_initialize call

Side note:
What I originally intended to do for several demo projects is:

var
lCurrDir: String;

begin
lCurrDir := ExtractFilePath(ParamStr(0));
GlobalCEFApp.FrameworkDirPath := lCurrDir + '\..\cef3';

This is CEF4Delphi version 76.1.13 (?, downloaded 18 sep)

Re: Strange crash with .. dots in FrameWorkDirPath or ResourcesDirPath

Posted: Sat Sep 21, 2019 9:41 am
by salvadordf
Thanks for reporting this issue! :)

I just uploaded the fix for this bug to GitHub. Please, download CEF4Delphi again.

Re: Strange crash with .. dots in FrameWorkDirPath or ResourcesDirPath

Posted: Mon Sep 23, 2019 8:10 am
by JanDoggen
I downloaded the 23/9 ZIP but still get the error

Re: Strange crash with .. dots in FrameWorkDirPath or ResourcesDirPath

Posted: Mon Sep 23, 2019 9:47 am
by salvadordf
I just uploaded a new version and it canonicalizes relative and absolute paths now.

Please, download CEF4Delphi from GitHub again.