Sometimes I have next exception in log file:
Code: Select all
[0924/172024.468:ERROR:CEF4Delphi(1)] TCefApplication.InitializeLibrary error : Access violation at address 0050CF76 in module 'chromium_client.exe'. Read of address 00000000
Code: Select all
[0924/172024.468:ERROR:CEF4Delphi(1)] TCefApplication.InitializeLibrary error : Access violation at address 0050CF76 in module 'chromium_client.exe'. Read of address 00000000
Code: Select all
GlobalCEFApp.LogFile := 'debug.log';
GlobalCEFApp.LogSeverity := LOGSEVERITY_ERROR; // use LOGSEVERITY_VERBOSE if you want more details
Ok, will do it. In my tests the problem occurs most when i close my app and is triggered on this line :salvadordf wrote: Fri Oct 06, 2017 7:50 pm Add uCEFConstants to the uses and set these properties in the DPR before the GlobalCEFApp.StartMainProcess call :If you want to add custom error messages in the log use the CefLog or OutputDebugMessage functions from uCEFMiscFunctions.pasCode: Select all
GlobalCEFApp.LogFile := 'debug.log'; GlobalCEFApp.LogSeverity := LOGSEVERITY_ERROR; // use LOGSEVERITY_VERBOSE if you want more details
Most of the times you will be getting those AVs because you need to close all the browsers properly before closing your app.
Check the code comments in the MDIBrowser demo.
If your app crashes too often and you had to kill it several times, you may need to delete the cache and cookies directories.
Code: Select all
// This is the destruction sequence when you remove a tab sheet:
// 1. RemoveTabBtnClick calls TChromium.CloseBrowser of the selected tab which triggers a TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROYWNDPARENT message to destroy TCEFWindowParent in the main thread which triggers a TChromium.OnBeforeClose event.
// 3. TChromium.OnBeforeClose sends a CEFBROWSER_DESTROYTAB message to destroy the tab in the main thread.
If you only have 1 TChromium in the main form, it's becoming rarer to get AV errors thanks to all the fixes made to CEF4Delphi with the help of all the forum members.thefunkyjoint wrote: Sat Oct 07, 2017 2:58 pm My app usually has only one form opened when i close the app ; in this case i need to do something besides make sure there is no child forms opened ?
Another relevant info is that i usually create 3-4 TChromium in my apps, to do different things. Having multiple instances of TChromium could be a cause of issues ?
Crashes during its use? That's very unusual.thefunkyjoint wrote: Sun Oct 08, 2017 12:48 pm I'm still having this issue of the app does not close properly, but what is bothering more is some random AV and crashes of the app during its use, and this did not happen with DCEF3.
I'm activating the verbose logfile to try to find out something.