Hi,
I have a JCEF application on Ubuntu 14 64-bit which crashes and core dumps when I dispose of cef in a shutdown hook. However, if I dipose of the CefApp via a REST service call prior to shutdown, it does not core dump. It seems that there could be some other shutdown hooks, perhaps AWT or JCEF that are leading to this condition.
My shutdown sequence is as follows:
For each browser:
jFrame.dispose();
cefClient.dispose(); // I have one client per browser
Then I call
cefApp.dispose();
And wait for the TERMINATED event in the handler
Looking at the jcef source it seems that the cefApp.dispose() also closes clients, and browsers, so my step seems to be unnecessary, but I get the same result if I don't close the browsers. I've tried invoking shutdown with swing invokeAndWait, but that doesn't affect the outcome.
I'm running jcef 3.1916.1829. Java 1.8.0_20
This is what the shutdown sequence looks like:
INFO [2014-10-08 21:51:09,393] Disposing of cef application
INFO [2014-10-08 21:51:09,394] Calling cef app dispose in thread AWT-EventQueue-0
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 11/11, reusable (open, marked uncloseable): 0, pending (open in creation order): 11)
X11Util: Open X11 Display Connections: 11
X11Util: Open[0]: NamedX11Display[:0, 0x7f8ec0289fc0, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[:0, 0x7f8ecc006ab0, refCount 1, unCloseable false]
X11Util: Open[2]: NamedX11Display[:0, 0x7f8eb843eef0, refCount 1, unCloseable false]
X11Util: Open[3]: NamedX11Display[:0, 0x7f8ec803b390, refCount 1, unCloseable false]
X11Util: Open[4]: NamedX11Display[:0, 0x7f8ebc0273b0, refCount 1, unCloseable false]
X11Util: Open[5]: NamedX11Display[:0, 0x7f8ecc02de20, refCount 1, unCloseable false]
X11Util: Open[6]: NamedX11Display[:0, 0x7f8ec4366500, refCount 1, unCloseable false]
X11Util: Open[7]: NamedX11Display[:0, 0x7f8eb83ad460, refCount 1, unCloseable false]
X11Util: Open[8]: NamedX11Display[:0, 0x7f8ec8061c80, refCount 1, unCloseable false]
X11Util: Open[9]: NamedX11Display[:0, 0x7f8ec0195fd0, refCount 1, unCloseable false]
X11Util: Open[10]: NamedX11Display[:0, 0x7f8eb819e4c0, refCount 1, unCloseable false]
INFO [2014-10-08 21:51:09,431] Waiting for TERMINATED event from cef app handler
INFO [2014-10-08 21:51:09,433] stateHasChanged: app state: SHUTTING_DOWN
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f8ea933deb8, pid=4207, tid=140251474994944
#
# JRE version: Java(TM) SE Runtime Environment (8.0_20-b26) (build 1.8.0_20-b26)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.20-b23 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libjcef.so+0x43eb8] ClientHandler::GetLifeSpanHandler()+0x58
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/andrew/ooluroo-ad-player/bin/hs_err_pid4207.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
Any ideas on what might be going wrong? Thanks