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
JDK-8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows #17224
Conversation
👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into |
Would be nice to get a review, the removed warning message leads to at least -1 failing test in our CI on Windows . |
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.
Looks good to me. Not sure if we really need the logging, since the called method only sets a boolean field.
@MBaesken This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 68 new 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 this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Hi Ralf, thanks for the review ! Any other comments / reviews ? |
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.
+1. I agree with Ralf, logging is not that important. Possibly just add a (c-runtime) assert. Up to you.
Hi Thomas, thanks for the review ! /integrate |
Going to push as commit 71aac7a.
Your commit was automatically rebased without conflicts. |
Mailing list message from Philip Race on client-libs-dev: I have two concerns with this integrated fix (1) Not a single developer who works on the client technology approved (2) This fix was proposed before and discussed here This fix should be backed out. Please send out a PR to do so. -phil. On 1/8/24 3:48 AM, Matthias Baesken wrote: |
Hi Phil, first of all, I guess it was an oversight of Matthias to not wait for some client libs representative to have a look. I agree that the integrated fix is potentially hiding a real issue which should rather be analysed a bit deeper. @MBaesken , can you please take care of the revert and then install a diagnosis patch in our test system that would print the exception and then bail out. That way we could maybe understand more about the actual root cause? |
Okay I can back it out, will created a JBS issue for that, https://bugs.openjdk.org/browse/JDK-8323330 . However the current JNI warning gives us no real info, just creates noise in our test infrastructure; the ExceptionDescribe should be better : "Prints an exception and a backtrace of the stack to a system error-reporting channel, such as stderr. This is a convenience routine provided for debugging." https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/functions.html |
Hi Phil, sorry for this, this was not bad intent, just a plain mistake. It is somewhat difficult to remember the exact review rules per project. Help from Skara would certainly be useful here. Cheers, Thomas |
I checked the new output of the jtr with this change (where ExceptionDescribe is called) but nothing is reported unfortunately.
Without getting the exception (if there is one?) it is hard to propose a fix; it is not even totally clear if there is need for a fix. |
The new test java/awt/font/JNICheck/FreeTypeScalerJNICheck.java introduced with https://bugs.openjdk.java.net/browse/JDK-8269223 adds -Xcheck:jni , and shows on Windows server 2019 the following JNI warning , so the test fails on this Windows version.
stdout: [WARNING in native method: JNI call made without checking exceptions when required to from CallStaticVoidMethodV
at sun.awt.Win32GraphicsEnvironment.initDisplay(java.desktop@23-internal/Native Method)
at sun.awt.Win32GraphicsEnvironment.initDisplayWrapper(java.desktop@23-internal/Win32GraphicsEnvironment.java:95)
at sun.awt.Win32GraphicsEnvironment.(java.desktop@23-internal/Win32GraphicsEnvironment.java:63)
at sun.awt.PlatformGraphicsInfo.createGE(java.desktop@23-internal/PlatformGraphicsInfo.java:34)
at java.awt.GraphicsEnvironment$LocalGE.createGE(java.desktop@23-internal/GraphicsEnvironment.java:93)
at java.awt.GraphicsEnvironment$LocalGE.(java.desktop@23-internal/GraphicsEnvironment.java:84)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(java.desktop@23-internal/GraphicsEnvironment.java:106)
at FreeTypeScalerJNICheck.runTest(FreeTypeScalerJNICheck.java:53)
at FreeTypeScalerJNICheck.main(FreeTypeScalerJNICheck.java:44)
We better add an exception check to get rid of the JNI warning (and also of the test failure) .
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17224/head:pull/17224
$ git checkout pull/17224
Update a local copy of the PR:
$ git checkout pull/17224
$ git pull https://git.openjdk.org/jdk.git pull/17224/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 17224
View PR using the GUI difftool:
$ git pr show -t 17224
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17224.diff
Webrev
Link to Webrev Comment