Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8161914

XOrg Resource Leak under Linux when running a JavaFx application

XMLWordPrintable

    • x86
    • linux

      FULL PRODUCT VERSION :
      Oracle JDK 8u91; OpenJDK 1.8.0_91 and OpenJfx 8

      ADDITIONAL OS VERSION INFORMATION :
      Debian 8.5 (64 bit); Ubuntu 15.10 (64 bit and 32 bit); Ubuntu 16.04 (64 bit); Manjaro (64 bit)

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Tested Hardware: Intel CPU with Intel CPU graphics; Intel CPU and AMD graphic card

      A DESCRIPTION OF THE PROBLEM :
      Symptom: Running a JavaFx application under Linux causes Xorg Resource Leaks and as a consequence increasing CPU load by the java process and by the process Xorg.

      The resource leak can be observed using the Linux tool xrestop

      When stopping the application the resources are freed and the CPU load of the Xorg process is normal.

      On Windows machines On Windows machines the JavaFx application run without problems. Even on a Linux guest running in VmWare under a windows host, the JavaFx application run without a resource leak.

      The resource leak appears on every change on the GUI, even if you use constants objects and change the visibility of these objects.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Start a JavaFx application, that changes some GUI items frequently (see example application) and monitor Xorg resources with tool "xrestop" and monitor CPU load with tool "top".

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Expected result would be a constant resource usage and a constant cpu load of the JavaFx application and of the process Xorg.
      ACTUAL -
      The resource usage increases constantly and the cpu load too. This leads at the end to a system with 100% cpu load.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      There are no error messages.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class HelloWorld extends Application {

      public static void main(String[] args) {
      Application.launch(args);
      }


      @Override
      public void start(Stage stage) {
      Label lblTick = new Label("Tick");

      GridPane pane = new GridPane();
      pane.add(lblTick, 0, 0);

      KeyFrame kf = new KeyFrame(Duration.millis(100), e -> lblTick.setVisible(!lblTick.isVisible()));

      Timeline tl = new Timeline(kf);
      tl.setCycleCount(Animation.INDEFINITE);
      tl.play();

      Scene scene = new Scene(pane, 30, 30);
      stage.setScene(scene);
      stage.show();
      }
      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Until now, I don't know any workaround.

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: