-
Notifications
You must be signed in to change notification settings - Fork 476
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
8201567: QuantumRenderer modifies buffer in use by JavaFX Application Thread #255
Conversation
👋 Welcome back jgneff! A progress list of the required criteria for merging this PR into |
Webrevs
|
The method This pull request modifies Because the issue only affects the final rendered pixels, I added assertions to catch the error in the Monocle classes
Below are animated images showing a few frames from a JavaFX animation on the Monocle VNC platform before and after the fix. Before the fixAfter the fixBackgroundThe error occurs with software rendering when a subclass of
In the first case, the non-direct byte buffer method In the second case, Most subclasses of Because of implementation choices, only the Monocle platforms end up having visible errors in their rendered pixels. While there are ways to work around the issue just for Monocle, this pull request is an attempt to correct the error at its source. TestingTo reproduce the problem, I used the JavaFX application epd-javafx with the following command: $ java --add-modules=javafx.graphics \
--module-path=$HOME/lib/armv6hf-sdk/lib \
-Dglass.platform=Monocle -Dmonocle.platform=VNC -Dprism.order=sw \
-jar dist/epd-javafx.jar --pattern=3 --loops=0 You can run the command on an actual ARM device or on a QEMU armhf virtual machine running on an amd64 Linux host. I connected to the Monocle VNC server with the Remmina VNC client on port 5901 with 24-bit color and encryption disabled. Even without access to an ARM device or virtual machine, you can capture the error on any Linux desktop by adding similar Let me know if you would like information on installing a QEMU armhf virtual machine, or details on the assertions and |
/reviewers 2 |
@kevinrushforth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first glance the fix looks fine (aside from the assert
statements that need to be removed). It will also need to be tested using the SW pipeline on all platforms.
modules/javafx.graphics/src/main/java/com/sun/glass/ui/Pixels.java
Outdated
Show resolved
Hide resolved
Thanks for the reminder. I managed to build JavaFX on Windows and macOS today, so I'll test this pull request on those platforms in addition to Linux desktop and embedded. |
I tested this pull request on all of the following platforms:
This is a tricky timing problem on most platforms, so I used rather intrusive techniques to catch the error and verify it was fixed. The bug is easily visible only on the Monocle VNC platform. DesktopI tested the desktop platforms as follows:
EmbeddedI tested the embedded platforms as follows:
|
Mailing list message from Ty Young on openjfx-dev: On 6/25/20 10:56 PM, John Neffenger wrote: Does this fix the years old Linux JavaFX buffer reset bug? |
Possibly. This is a race condition that can affect the use of |
This fix might be a candidate for JavaFX 15, so I recommend to not merge the master branch. If we don't spot anything of concern during the review, then we might ask you to retarget your PR to the |
This seems to be a safe fix to me. As mentioned in |
Oh, and regarding the following:
That's a known issue on macOS 10.15: JDK-8231558: [macos 10.15] Platform.exit causes assertion error on macOS Catalina |
I am done with my testing. All looks good. Once this PR is retargeted to |
@jgneff This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type
Since the source branch of this PR was last updated there have been 10 commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge As you are not a known OpenJDK Author, an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@kevinrushforth, @arapte) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/integrate |
/sponsor |
@kevinrushforth @jgneff The following commits have been pushed to jfx15 since your change was applied:
Your commit was automatically rebased without conflicts. Pushed as commit d67c47f. |
Just curious and this may be OBE by now but... I see the check thread but when accessing the buffer itself, should it have some sort of synchronization of some type to make it more thread safe? |
There is no need to synchronize the In any case, this PR has been integrated, so if an additional issue is discovered, a new bug would need to be filed. |
Fixes JDK-8201567.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jfx pull/255/head:pull/255
$ git checkout pull/255