<AWT Dev> [12] Review Request: JDK-8215364: JavaFX crashes on Ubuntu 18.04 with Wayland while using Swing-FX interop

Kevin Rushforth kevin.rushforth at oracle.com
Thu Dec 20 19:33:12 UTC 2018


+1

-- Kevin


On 12/20/2018 11:03 AM, Phil Race wrote:
> +1
>
> -phil.
>
> On 12/14/18 5:48 AM, Pankaj Bansal wrote:
>>
>> Hi All, Please review fix for the below bug jdk12:
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8215364
>>
>> Webrev: http://cr.openjdk.java.net/~pbansal/8215364/webrev.00/ 
>> <http://cr.openjdk.java.net/%7Epbansal/8215364/webrev.00/>
>>
>> Issue:
>>
>> JavaFX uses both X11 and gtk code and gtk3 uses Wayland backend while 
>> running Ubuntu 18.04 in Wayland mode. This results in crash in 
>> JavaFX. This crash is being done under [1] by setting the gtk3 
>> backend to x11 on all systems by setting GDK_BACKEND=x11. This fixes 
>> the JavaFX crash.
>>
>> However, while using the a JFXPanel inside Swing components in 
>> Swing-FX interop with GTKLookAndFeel set as L&F for Swing, the AWT 
>> loads the gtk3 first and as the GDK_BACKEND=x11 is not yet set even 
>> after the fix for [1], the gtk3 starts using the Wayland backend. 
>> Then while initializing the JFXPanel, JavaFX uses the same gtk 
>> library loaded by AWT and this results in crash.
>>
>> Fix:
>>
>> The fix is to set the gtk backend to x11 in AWT as well by setting 
>> the GDK_BACKEND=x11. This fixes the Swing-FX interop crash as well.
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8210411
>>
>> Regards,
>> Pankaj Bansal
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20181220/502a4f1e/attachment.html>


More information about the awt-dev mailing list