On Thu, 11 Jun 2020 19:04:47 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> This addresses https://bugs.openjdk.java.net/browse/JDK-8246348
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/font/freetype/PangoGlyphLayout.java
>  line 148:
> 
>> 147:         long utflen = OSPango.g_utf8_strlen(str,-1);
>> 148:         long end = OSPango.g_utf8_offset_to_pointer(str, utflen);
>> 149:         long runs = OSPango.pango_itemize(context, str, (int)(start - 
>> str), (int)(end - start), attrList, 0);
> 
> Since you are now creating `n` native strings, 1 per substring based on the 
> `TextRun`, rather than 1 for the entire
> String, isn't the `start` pointer wrong? Unless I am missing something, I 
> would think that `start` should be set to
> `str`.

I did a quick test, and setting `start = str` fixes the spurious assertions and 
intermittent crash.

-------------

PR: https://git.openjdk.java.net/jfx/pull/249

Reply via email to