Issues with Java app using JavaFX and xwayland frame timer
Hi,
I am using an app that is based on Java and JavaFX. It is using xwayland.
It works very well when it is visible on screen, but when the window is off screen (for example, in another virtual desktop), the following happens:
- Memory usage starts growing. Cannot say if it is on the window manager side or the app side. In less than a minute, the OOM kills the app
- When I switch back to the app, a series of "frame updates" happen in a "fast forward" style
I am using kde (kwin_wayland), and made several tests:
- using kwin with explicit sync patch backported
- using xwayland branch 24
- kwin without explicit sync
- using xwayland branch 23
From my tests, using kwin with or without explicit sync is the same. Explicit sync can be ruled out as possible cause. Using xwayland branch 23 the bug does not happen. When using xwayland from branch 24 the bug happens.
When using xwayland from branch 24, but changing the file:
-
hw/xwayland/xwayland-present.c
anddefine TIMER_LEN_FLIP 1000
to, for exampledefine TIMER_LEN_FLIP 17
, the issue disappears and everything works fine!
The bug is completely reproducible, and can be tested rather quickly. The issue is that the app is a proprietary app.
If more info or tests are needed, feel free to ask!
Thank you!