Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StackOverflowException when OSR browser gains Focus #489

Open
nprice-flextrade opened this issue Dec 4, 2024 · 0 comments
Open

StackOverflowException when OSR browser gains Focus #489

nprice-flextrade opened this issue Dec 4, 2024 · 0 comments
Labels
bug Bug report

Comments

@nprice-flextrade
Copy link

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:

  1. Use the Simple example application
  2. Update useOsr to true in the main method of the MainFrame class
  3. Run the app as normal (ensuring the necessary --add-exports parameters are included for Java 9+)
  4. 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]
...
@nprice-flextrade nprice-flextrade added the bug Bug report label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

No branches or pull requests

1 participant