Summary
TestFrame's default windowed (non-OSR) browser close handshake hangs indefinitely: after the documented 7-step close sequence (windowClosing -> close(false) -> doClose() cancels -> re-dispatch -> close(true) -> doClose() allows -> native window destroyed), CefLifeSpanHandler.onBeforeClose is never invoked, so any test/app blocking on it (e.g. via a CountDownLatch) hangs forever.
Matches upstream chromiumembedded/java-cef#364 ("CefBrowser_N.doClose() unexpectedly closes the host window"), filed by the JCEF/CEF maintainer -- about the same CefBrowser_N.doClose() -> SwingUtilities.invokeLater -> synthetic WINDOW_CLOSING re-dispatch mechanism.
Reproduction
Confirmed reproducible and independent of environment -- identical symptom under two unrelated X setups:
- WSLg's real X server (has its own window manager).
- A from-scratch
Xvfb + icewm + dbus-launch setup (a real, if virtual, X server + WM).
In both cases: onAfterCreated -> resource load -> terminateTest -> close(false) -> doClose() cancels -> close(true) -> doClose() allows -> Frame.dispose() all fire correctly, then nothing. onBeforeClose/cleanupTest never print. jstack on the hung process shows the main thread parked in CountDownLatch.await() at TestFrame.awaitCompletion.
Impact
This blocks running TestFrameTest/DisplayHandlerTest (or any test using TestFrame's default windowed mode) in any headless/CI environment -- they hang forever rather than failing fast. Worked around in #2 by converting those tests to OSR mode instead (OSR's close handshake is purely Java-side and doesn't depend on native window-destroy notification), but the underlying windowed-mode bug remains unfixed.
Environment
- CEF 146.0.10+g8219561+chromium-146.0.7680.179, linux64
- WSL2 (Ubuntu), and separately bare Xvfb+icewm
Summary
TestFrame's default windowed (non-OSR) browser close handshake hangs indefinitely: after the documented 7-step close sequence (windowClosing->close(false)->doClose()cancels -> re-dispatch ->close(true)->doClose()allows -> native window destroyed),CefLifeSpanHandler.onBeforeCloseis never invoked, so any test/app blocking on it (e.g. via aCountDownLatch) hangs forever.Matches upstream chromiumembedded/java-cef#364 ("CefBrowser_N.doClose() unexpectedly closes the host window"), filed by the JCEF/CEF maintainer -- about the same
CefBrowser_N.doClose()->SwingUtilities.invokeLater-> syntheticWINDOW_CLOSINGre-dispatch mechanism.Reproduction
Confirmed reproducible and independent of environment -- identical symptom under two unrelated X setups:
Xvfb+icewm+dbus-launchsetup (a real, if virtual, X server + WM).In both cases:
onAfterCreated-> resource load ->terminateTest->close(false)->doClose()cancels ->close(true)->doClose()allows ->Frame.dispose()all fire correctly, then nothing.onBeforeClose/cleanupTestnever print.jstackon the hung process shows the main thread parked inCountDownLatch.await()atTestFrame.awaitCompletion.Impact
This blocks running
TestFrameTest/DisplayHandlerTest(or any test usingTestFrame's default windowed mode) in any headless/CI environment -- they hang forever rather than failing fast. Worked around in #2 by converting those tests to OSR mode instead (OSR's close handshake is purely Java-side and doesn't depend on native window-destroy notification), but the underlying windowed-mode bug remains unfixed.Environment