This discussion is archived
5 Replies Latest reply: Sep 2, 2013 6:31 AM by deki24 RSS

JavaFX crashes X Server

980581 Newbie
Currently Being Moderated
Background/Context:

I'm currently developing a touch screen application which is aimed to run on Linux. As a development framework I chose JavaFX (jdk1.7.0_10) due to its rapid prototyping easiness. I'm using Arch Linux (kernel 3.6.10-1-ARCH) distribution and since JavaFX needs a head-full environment to run, I installed Xorg on top of the base configuration. Even thought I'm able to run my JavaFX application, I have some issues with popup windows that are being displayed in my application.

When trying to display those popup windows, sometimes they don't respond as expected or event worse, they crash my application. The error I get is the following:

The program 'java' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
+(Details: serial 51101 error_code 9 request_code 62 minor_code 0)+
+(Note to programmers: normally, X errors are reported asynchronously;+
that is, you will receive the error a while after causing it.
+To debug your program, run it with the --sync command line+
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
By the way, when running the same application on Windows (my development machine), everything works fine.

I also tried to run a composite manager ('xcompmgr') since i was also getting some warnings like

Can't create transparent stage, because your screen doesn't support alpha channel. You need to enable XComposite extension.

but it didn't helped.

Question:

Am i missing some files or configurations in order to run smoothly JavaFX in Linux, or has any one encountered the same challenge? Since my main concern is performance (due to limited hardware specs), I don't want to install a full featured Linux distribution. I only need to run my JavaFX application.
  • 1. Re: JavaFX crashes X Server
    jsmith Guru
    Currently Being Moderated
    Is the appropriate version of gtk2 installed?
    JavaFX 2.2 sys requirements: http://docs.oracle.com/javafx/2/system_requirements_2-2/jfxpub-system_requirements_2-2.htm lists:
    gtk2 2.18+

    Try also a jdk8 snapshot release to see if your issue has been fixed in a later build:
    http://jdk8.java.net/download.html

    If it is still an issue, then log it against the runtime project at:
    http://javafx-jira.kenai.com
    When you log it, also state any video card or video drivers being used.

    As a workaround, until your issue is resolved, avoid popups, choiceboxes, comboboxes, tooltips, color choosers, drop down menus and transparent stages in your app and it seems like it should run without issue.
  • 2. Re: JavaFX crashes X Server
    965239 Newbie
    Currently Being Moderated
    Hi,

    This error affect me. I am using Ubuntu 13.04

    ---------------
    java version "1.7.0_21"
    Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
    ---------------

    I run javafx Ensemble.jar. When I tried to search in the top right search box the following error appears:

    The program 'java' received an X Window System error.
    This probably reflects a bug in the program.
    The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
    (Details: serial 536 error_code 9 request_code 55 minor_code 0)
    (Note to programmers: normally, X errors are reported asynchronously;
    that is, you will receive the error a while after causing it.
    To debug your program, run it with the --sync command line
    option to change this behavior. You can then get a meaningful
    backtrace from your debugger if you break on the gdk_x_error() function.)


    Is there something I can do to fix that?
  • 3. Re: JavaFX crashes X Server
    jsmith Guru
    Currently Being Moderated
    Is there something I can do
    Follow my instructions in my earlier post on this thread.
  • 4. Re: JavaFX crashes X Server
    deki24 Newbie
    Currently Being Moderated

    jsmith wrote:

     

    Is the appropriate version of gtk2 installed?
    JavaFX 2.2 sys requirements: http://docs.oracle.com/javafx/2/system_requirements_2-2/jfxpub-system_requirements_2-2.htm lists:
    gtk2 2.18+

    Try also a jdk8 snapshot release to see if your issue has been fixed in a later build:
    http://jdk8.java.net/download.html

     

    We also have this problem with Ubuntu 13.04 (contains libgtk2 2.24.17). I cannot reproduce the issue using JDK 8 Build 104, but it's not an option to update the JRE for our project at the moment. How can we get this fix backported to JDK 7?

  • 5. Re: JavaFX crashes X Server
    deki24 Newbie
    Currently Being Moderated

    It seems that the fix was already applied to JDK 7. I'm fine with JDK 7 EA Build 40 from http://jdk7.java.net.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points