Re: RFR: JDK-8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows

2024-01-10 Thread Matthias Baesken
On Tue, 9 Jan 2024 06:35:12 GMT, Philip Race  wrote:

>reason for the exception which has NEVER been seen in our testing here and 
>once understood

I checked the new output of the jtr with this change (where ExceptionDescribe 
is called) but nothing is reported unfortunately.
So I really wonder - is there a exception present that we could try to 
understand ?

>rather than suppressing it needs an actual fix and yet here it is again in the 
>form previously rejected.

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.

-

PR Comment: https://git.openjdk.org/jdk/pull/17224#issuecomment-1885031083


Re: RFR: JDK-8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows

2024-01-09 Thread Thomas Stuefe
On Tue, 2 Jan 2024 15:03:12 GMT, Matthias Baesken  wrote:

> 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) .

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

-

PR Comment: https://git.openjdk.org/jdk/pull/17224#issuecomment-1883471813


Re: RFR: JDK-8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows

2024-01-09 Thread Matthias Baesken
On Tue, 2 Jan 2024 15:03:12 GMT, Matthias Baesken  wrote:

> 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) .

Okay I can back it out, will create a JBS issue for that.   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

-

PR Comment: https://git.openjdk.org/jdk/pull/17224#issuecomment-1883367630


Re: RFR: JDK-8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows

2024-01-09 Thread Christoph Langer
On Tue, 2 Jan 2024 15:03:12 GMT, Matthias Baesken  wrote:

> 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) .

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?

-

PR Comment: https://git.openjdk.org/jdk/pull/17224#issuecomment-1883120805


Re: RFR: JDK-8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows

2024-01-08 Thread Matthias Baesken
On Tue, 2 Jan 2024 15:03:12 GMT, Matthias Baesken  wrote:

> 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) .

Hi Thomas, thanks for the review !

-

PR Comment: https://git.openjdk.org/jdk/pull/17224#issuecomment-1880845433


Re: RFR: JDK-8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows

2024-01-08 Thread Thomas Stuefe
On Tue, 2 Jan 2024 15:03:12 GMT, Matthias Baesken  wrote:

> 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) .

+1. I agree with Ralf, logging is not that important. Possibly just add a 
(c-runtime) assert. Up to you.

-

Marked as reviewed by stuefe (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17224#pullrequestreview-1808867637


Re: RFR: JDK-8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows

2024-01-08 Thread Matthias Baesken
On Tue, 2 Jan 2024 15:03:12 GMT, Matthias Baesken  wrote:

> 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) .

Hi Ralf, thanks for the review !

Any other comments / reviews ?

-

PR Comment: https://git.openjdk.org/jdk/pull/17224#issuecomment-1880818797


Re: RFR: JDK-8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows

2024-01-08 Thread Ralf Schmelter
On Tue, 2 Jan 2024 15:03:12 GMT, Matthias Baesken  wrote:

> 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) .

Looks good to me. Not sure if we really need the logging, since the called 
method only sets a boolean field.

-

Marked as reviewed by rschmelter (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17224#pullrequestreview-1808402021


Re: RFR: JDK-8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows

2024-01-05 Thread Matthias Baesken
On Tue, 2 Jan 2024 15:03:12 GMT, Matthias Baesken  wrote:

> 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) .

Would be nice to get a review, the removed warning message leads to at least -1 
failing test in our CI on Windows .

-

PR Comment: https://git.openjdk.org/jdk/pull/17224#issuecomment-1878366512


RFR: JDK-8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows

2024-01-02 Thread Matthias Baesken
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) .

-

Commit messages:
 - JDK-8276809

Changes: https://git.openjdk.org/jdk/pull/17224/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk=17224=00
  Issue: https://bugs.openjdk.org/browse/JDK-8276809
  Stats: 8 lines in 1 file changed: 6 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/17224.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17224/head:pull/17224

PR: https://git.openjdk.org/jdk/pull/17224