[OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux

2021-06-23 Thread Maxim Kartashev
Added an `ExceptionCheck()` followed by `ExceptionDescribe()` and `ExceptionClear()` immediately after the Java calls made from the callback function `ReadTTFontFileFunc()` in `freetypeScaler.c`. The exception(s) need to be cleared because we're not returning immediately to Java that would've

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v2]

2021-06-30 Thread Maxim Kartashev
On Wed, 30 Jun 2021 00:08:22 GMT, Phil Race wrote: >> Maxim Kartashev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Addressed PR comments >> >> 1. Allowed test to run on any platform. >&g

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v2]

2021-06-30 Thread Maxim Kartashev
mediately > to Java that would've been able to handle them gracefully. And in order not > to loose the exception entirely (even though the return value would also > indicate an error condition), print out the exception with > `ExceptionDescribe()` to aid in debugging. Maxim K

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v2]

2021-06-30 Thread Maxim Kartashev
On Tue, 29 Jun 2021 23:19:43 GMT, Sergey Bylokhov wrote: >> Maxim Kartashev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Addressed PR comments >> >> 1. Allowed test to run on any platform. >

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v2]

2021-07-07 Thread Maxim Kartashev
On Fri, 2 Jul 2021 04:02:45 GMT, Sergey Bylokhov wrote: > Looks fine to me, I'll run the tests. @mrserb Any news on that front? - PR: https://git.openjdk.java.net/jdk/pull/4572

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v3]

2021-07-13 Thread Maxim Kartashev
mediately > to Java that would've been able to handle them gracefully. And in order not > to loose the exception entirely (even though the return value would also > indicate an error condition), print out the exception with > `ExceptionDescribe()` to aid in debugging. Maxim K

Re: [OpenJDK 2D-Dev] FYI: A CFD for a Wayland project has been posted to disc...@openjdk.java.net

2021-07-15 Thread Maxim Kartashev
> At that time Java for Linux will "mostly" run via the X11 compatibility layer There's a quality-of-service problem with running via the compatibility layer as under certain circumstances native X windows look blurry. Users with small(ish) HiDPI displays tend to enable fractional scaling and wit

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v3]

2021-07-19 Thread Maxim Kartashev
On Sat, 17 Jul 2021 03:03:41 GMT, Sergey Bylokhov wrote: >> Maxim Kartashev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 1. Marked the test as headful so that it doesn't fail on a headless >> sys

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v3]

2021-07-23 Thread Maxim Kartashev
On Sat, 17 Jul 2021 03:05:35 GMT, Sergey Bylokhov wrote: >> Maxim Kartashev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 1. Marked the test as headful so that it doesn't fail on a headless >> sys

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v4]

2021-08-04 Thread Maxim Kartashev
On Mon, 19 Jul 2021 09:38:27 GMT, Maxim Kartashev wrote: >> Added an `ExceptionCheck()` followed by `ExceptionDescribe()` and >> `ExceptionClear()` immediately after the Java calls made from the callback >> function `ReadTTFontFileFunc()` in `freetypeScaler.c`. >>

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v3]

2021-08-13 Thread Maxim Kartashev
On Thu, 12 Aug 2021 21:57:58 GMT, Sergey Bylokhov wrote: >> Yes, the `ExceptionCheck()` call will silence the warnings from >> `-Xcheck:jni`. > > Does it actually suppress the "Xcheck:jni" or it clears a raised exception? > If an exception is still "raised" after this call we should do some >

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v5]

2021-08-13 Thread Maxim Kartashev
mediately > to Java that would've been able to handle them gracefully. And in order not > to loose the exception entirely (even though the return value would also > indicate an error condition), print out the exception with > `ExceptionDescribe()` to aid in debugging. Maxim K

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v4]

2021-08-13 Thread Maxim Kartashev
On Thu, 12 Aug 2021 21:57:37 GMT, Phil Race wrote: >> Maxim Kartashev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Addressed PR comments >> >> 1. Added CHECK_NULL() to awt_Component.cpp

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v4]

2021-08-13 Thread Maxim Kartashev
On Fri, 13 Aug 2021 00:07:56 GMT, Phil Race wrote: >> test/jdk/java/awt/font/JNICheck/FreeTypeScalerJNICheck.java line 29: >> >>> 27: * @summary Verifies that -Xcheck:jni issues no warnings from >>> freetypeScaler.c >>> 28: * @library /test/lib >>> 29: * @key headful >> >> What about this t

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v4]

2021-08-16 Thread Maxim Kartashev
On Fri, 13 Aug 2021 14:28:53 GMT, Phil Race wrote: >> But `getFontMetrics()` is the primary "entry point" that generated all the >> JNI warnings in the first place. And I'm also not sure that we could've >> gotten all the warnings on Windows without `JFrame`. > > So what's wrong with > g2d.setF

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v3]

2021-08-16 Thread Maxim Kartashev
On Fri, 13 Aug 2021 18:50:01 GMT, Sergey Bylokhov wrote: >> Yes, the exception will still be "raised" after this call. Since there are >> no JNI calls (at least those that are forbidden to make with an exception >> pending) between here and return back to Java, I believe no additional steps >>

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v6]

2021-08-16 Thread Maxim Kartashev
mediately > to Java that would've been able to handle them gracefully. And in order not > to loose the exception entirely (even though the return value would also > indicate an error condition), print out the exception with > `ExceptionDescribe()` to aid in debugging. Maxim K

Re: [OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v6]

2021-08-17 Thread Maxim Kartashev
On Mon, 16 Aug 2021 18:52:26 GMT, Sergey Bylokhov wrote: > Will the updated test case cover the same code paths where the bugs were > found and fixed by this change? I believe so - on Linux. Windows-specific changes are mostly covered (I verified `Java_java_awt_Component_initIDs()` (from `awt_

[OpenJDK 2D-Dev] Integrated: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux

2021-08-23 Thread Maxim Kartashev
On Wed, 23 Jun 2021 09:19:16 GMT, Maxim Kartashev wrote: > Added an `ExceptionCheck()` followed by `ExceptionDescribe()` and > `ExceptionClear()` immediately after the Java calls made from the callback > function `ReadTTFontFileFunc()` in `freetypeScaler.c`. > > The exceptio