Page 1 of 1

Update to CEF 3.3325.1756.g6d8faa4

Posted: Sat Mar 31, 2018 4:11 pm
by salvadordf
Hi,

I've updated CEF4Delphi to CEF 3.3325.1756.g6d8faa4.

This is what's new :
  • Now all the demos destroy the browsers following the destruction sequence. This is what the official CEF demo does and it's a necessary step to have a clean shutdown.
  • New GlobalCEFApp.WidevinePath property and GlobalCEFApp.OnCDMRegistrationComplete event to register Widevine automatically.
  • New TChromium.OnBrowserCompMsg, TChromium.OnWidgetCompMsg and TChromium.OnRenderCompMsg events to intercept all missing messages. The MiniBrowser demo uses one of them to show the mouse coordinates in real time. This feature uses the code given by Winexcel. Thanks! :D
  • New GlobalCEFApp.ChildProcessesCount property in case you want to delay the GlobalCEFApp destruction if there are still some running child processes.
The CEF3 libraries used in this update are :

Re: Update to CEF 3.3325.1756.g6d8faa4

Posted: Sun Apr 01, 2018 10:42 am
by salvadordf
Winexcel wrote: Sun Apr 01, 2018 5:39 am Could you explain what was the reason for the shutdown crash?
I still haven't found the reason but destroying the browsers before closing the main form is recommended by CEF3.
In fact, every time someone reports a shutdown crash in the official CEF3 forum you will see the same recommendations :
  • Check if you release all interfaces.
  • Wait until you receive the OnBeforeClose event before shutting down.

Winexcel wrote: Sun Apr 01, 2018 6:09 am Salvador, I've just gotten the shutdown crash. I recorded a video with the bug below.
https://www.youtube.com/watch?v=pMUFBO2YW1E
The MiniBrowser demo uses the same EXE for all subprocesses and the code before GlobalCEFApp.StartMainProcess is executed by all the processes.

In this case, the browser, render and GPU processes will have the memory leak induced by the AllocMem(10) line and FastMM will try to report the leak in all processes with a modal dialog (MessageBoxA).

This is not the first bug report that shows a crash when the app has a ReportMemoryLeaksOnShutdown set to TRUE. Other user showed a similar crash when he used ReportMemoryLeaksOnShutdown after GlobalCEFApp.StartMainProcess.

Perhaps there's a compatibility problem between FastMM and CEF3.

Re: Update to CEF 3.3325.1756.g6d8faa4

Posted: Sun Apr 01, 2018 9:24 pm
by thefunkyjoint
Great job Salvador :D

Re: Update to CEF 3.3325.1756.g6d8faa4

Posted: Mon Apr 02, 2018 12:58 pm
by salvadordf
I made a small change to subclass the CEF windows only once because TChromium.OnRenderViewReady is called again if you load a different website.

If I allow to subclass the windows a second time then CallWindowProc causes an access violation. :o

Re: Update to CEF 3.3325.1756.g6d8faa4

Posted: Thu Apr 05, 2018 6:38 pm
by salvadordf
I'm very busy again... :(

I'll try to figure out what's going on with those events in a few days.

Re: Update to CEF 3.3325.1756.g6d8faa4

Posted: Fri Apr 06, 2018 9:03 am
by salvadordf
I will add it.

Thanks! :D