Describe the bug
While running a JCEF-based application, I noticed some unexpected messages being written to the STDERR stream (System.err)
These messages simply read Exception in thread "AWT-EventQueue-0"
After a significant amount of effort, I tracked these down to an unreported StackOverflowError, being triggered by CefClient.onGotFocus
To Reproduce
Steps to reproduce the behavior:
- Use the Simple example application
- Update
useOsr to true in the main method of the MainFrame class
- Run the app as normal (ensuring the necessary
--add-exports parameters are included for Java 9+)
- Observe the
System.err log output contains multiple instances of Exception in thread "AWT-EventQueue-0"
Expected behavior
We shouldn't see unexpected errors...
Versions (please complete the following information):
- OS: Windows
- Java Version: OpenJDK 17
- JCEF Version: 99c2f7a
- CEF Version: 127.3.1
Additional context
Putting a breakpoint in CefClient.onGotFocus reveals that this method is triggered repeatedly, with the following stack:
onGotFocus:461, CefClient (org.cef) [39]
N_SetFocus:-1, CefBrowser_N (org.cef.browser)
setFocus:497, CefBrowser_N (org.cef.browser)
onGotFocus:461, CefClient (org.cef) [38]
...
Describe the bug
While running a JCEF-based application, I noticed some unexpected messages being written to the STDERR stream (
System.err)These messages simply read
Exception in thread "AWT-EventQueue-0"After a significant amount of effort, I tracked these down to an unreported
StackOverflowError, being triggered byCefClient.onGotFocusTo Reproduce
Steps to reproduce the behavior:
useOsrtotruein themainmethod of theMainFrameclass--add-exportsparameters are included for Java 9+)System.errlog output contains multiple instances ofException in thread "AWT-EventQueue-0"Expected behavior
We shouldn't see unexpected errors...
Versions (please complete the following information):
Additional context
Putting a breakpoint in
CefClient.onGotFocusreveals that this method is triggered repeatedly, with the following stack: