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

Mac: SIGSEGV When Quitting JavaFX application after setScene in OSX 10.9

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P2 P2
    • 8u40
    • 8u5
    • javafx
    • OSX 10.9.2
      java -version
      java version "1.8.0_05"
      Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
      Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

      When quitting a JavaFX application after setting a new Scene (by calling setScene on Stage) using OSX quit command (either through application menu, or Meta+Q).

      Sample from error report:

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00007fff94cfc097, pid=36323, tid=3335
      #
      # JRE version: Java(TM) SE Runtime Environment (8.0_05-b13) (build 1.8.0_05-b13)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.5-b02 mixed mode bsd-amd64 compressed oops)
      # Problematic frame:
      # C [libobjc.A.dylib+0x5097] objc_msgSend+0x17
      #
      # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
      #
      # If you would like to submit a bug report, please visit:
      # http://bugreport.sun.com/bugreport/crash.jsp
      # The crash happened outside the Java Virtual Machine in native code.
      # See problematic frame for where to report the bug.
      #

      --------------- T H R E A D ---------------

      Current thread (0x00007f809908c000): JavaThread "JavaFX Application Thread" [_thread_in_native, id=3335, stack(0x00007fff55dc7000,0x00007fff565c7000)]

      siginfo:si_signo=SIGSEGV: si_errno=0, si_code=0 (SEGV0), si_addr=0x0000000000000000



      **Example Program**
      import javafx.application.Application;
      import javafx.stage.*;
      import javafx.scene.control.*;
      import javafx.scene.layout.*;
      import javafx.scene.*;

      public class Main extends Application
      {
        private Stage stage;

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

        @Override
        public void start(Stage primaryStage) {
          this.stage = primaryStage;
          GridPane pane01 = new GridPane();
          Button setSceneButton = new Button("Set New Scene");
          pane01.add(setSceneButton, 0, 0);
          stage.setScene(new Scene(pane01, 800, 600));
          stage.show();

          setSceneButton.setOnAction(event -> {
            GridPane pane02 = new GridPane();
            Label infoLabel = new Label("Scene has been set.");
            pane02.add(infoLabel, 0, 0);
            stage.setScene(new Scene(pane02, 800, 600));
          });
        }
      }


      Can be compiled and run with:
      javac Main.java
      java Main


      A button is displayed which sets a new scene to the stage. Before firing button, the application can be quit without error using Meta+Q or the application menu. After firing button (which calls setScene on the stage), the error occurs when trying to quit the application in this way.

            anthony Anthony Petrov (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: