When user will close that child window by clicking the 'X', we are listen on the WN_CLOSE event in our main window and handling close event and we call cefBrowser.close() before removing the child-window
But we are running into "VM Access Violation" troubles when we are calling cefBrowser.close() and returning "true" in the CefLifeSpanHandler.doClose() method. (See dump_200716_cefBrowser.log)
Return "true" in doClose() means, that we do not want the second WN_CLOSE event from CEFBrowser, because we will close CefBrowser immediately.
Maybe it's an timing problem and we have to wait, while CEF is shutdown?
Or is it the same problem as described in https://bitbucket.org/chromiumembedded/java-cef/issues/226/windows-jvm-crashes-when-closing
I already read the comments in cef_life_span_handler.h and in https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage#markdown-header-browser-life-span, but I cant fix the problem with VM crashes.
It would be very helpful when there is a example, howto handle lifespan "correctly" in the CEF-Browser, when it is parented from another window.
Installing win32 JCEF Version = 3.2704.0 on Windows 10 win32:
- Code: Select all
d:\depot\git-repository\java-cef2\src\tools>run.bat win32 Release detailed
Offscreen rendering disabled
Using:
JCEF Version = 3.2704.0
CEF Version = 3.2704.1427
Chromium Version = 51.0.2704.84
CefApp: INITIALIZING
initialize on Thread[AWT-EventQueue-0,6,main] with library path .\jcef_build\native\Release
Added scheme search://
Added scheme client://
CefApp: INITIALIZED
CefApp: SHUTTING_DOWN
shutdown on Thread[AWT-EventQueue-0,6,main]