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

Crash pressing Esc using Mac Book Pro Touch bar

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 8u144
    • Fix Version/s: None
    • Component/s: javafx
    • Subcomponent:
    • CPU:
      x86
    • OS:
      os_x

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_144"
      Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      OS X 10.12.6

      A DESCRIPTION OF THE PROBLEM :
      Run my test prog, press the Open FileChooser button, then press the Esc key on the Mac Brook Pro touch bar, it crashes. Using Esc on my key board or press cancel work as expected.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run my test prog, press the Open FileChooser button, then press the Esc key on the Mac Brook Pro touch bar, it crashes. Using Esc on my key board or press cancel work as expected.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      FileChoose dialog to disappear,
      ACTUAL -
      App crasesh

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      2017-08-18 16:29:12.488 java[79303:7675985] *** Assertion failure in -[NSTouch normalizedPosition], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1504.83.101/AppKit.subproj/NSTouch.m:87
      2017-08-18 16:29:12.489 java[79303:7675985] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot get normalizedPosition for this type of NSTouch'
      *** First throw call stack:
      (
      0 CoreFoundation 0x00007fffa43d32cb __exceptionPreprocess + 171
      1 libobjc.A.dylib 0x00007fffb91e348d objc_exception_throw + 48
      2 CoreFoundation 0x00007fffa43d8042 +[NSException raise:format:arguments:] + 98
      3 Foundation 0x00007fffa5e20be0 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
      4 AppKit 0x00007fffa218ecad -[NSTouch normalizedPosition] + 155
      5 libglass.dylib 0x000000012f3191f7 -[GlassTouches(hidden) sendJavaTouchEvent:] + 2023
      6 libglass.dylib 0x000000012f31895c listenTouchEvents + 92
      7 SkyLight 0x00007fffb5de8c80 processDecodedEventRef + 204
      8 SkyLight 0x00007fffb5de846a processEventTapData + 544
      9 SkyLight 0x00007fffb5ebdce1 _XPostEventTapData + 280
      10 SkyLight 0x00007fffb5de81f4 eventTapMessageHandler + 137
      11 CoreFoundation 0x00007fffa43521ed __CFMachPortPerform + 253
      12 CoreFoundation 0x00007fffa43520d9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
      13 CoreFoundation 0x00007fffa4352051 __CFRunLoopDoSource1 + 465
      14 CoreFoundation 0x00007fffa4349cc5 __CFRunLoopRun + 2389
      15 CoreFoundation 0x00007fffa4349114 CFRunLoopRunSpecific + 420
      16 Foundation 0x00007fffa5d5c252 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 277
      17 libglass.dylib 0x000000012f3066d8 +[GlassApplication enterNestedEventLoopWithEnv:] + 136
      18 libglass.dylib 0x000000012f30713a Java_com_sun_glass_ui_mac_MacApplication__1enterNestedEventLoopImpl + 74
      19 ??? 0x000000011a3e79f4 0x0 + 4735269364
      20 ??? 0x000000011a3d8040 0x0 + 4735205440
      )
      libc++abi.dylib: terminating with uncaught exception of type NSException


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      package com.github.liamsharp;

      import javafx.application.Application;
      import javafx.event.ActionEvent;
      import javafx.event.EventHandler;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.layout.GridPane;
      import javafx.stage.FileChooser;
      import javafx.stage.Stage;
       
      public final class FileChooserSample extends Application {
          @Override
          public void start(final Stage stage) {
              final FileChooser fileChooser = new FileChooser();
              final Button openButton = new Button("Open FileChooser");
              openButton.setOnAction(
                  new EventHandler<ActionEvent>() {
                      public void handle(final ActionEvent e) {
                          fileChooser.showOpenDialog(stage);
                      }
                  });

              final GridPane inputGridPane = new GridPane();
              inputGridPane.getChildren().add(openButton);
              stage.setScene(new Scene(inputGridPane));
              stage.show();
          }
       
          public static void main(String[] args)
          {
              System.out.println(System.getProperty("java.version"));
              Application.launch(args);
          }
      }

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

      CUSTOMER SUBMITTED WORKAROUND :
      No workaround, but I've tested with jdk-9+181 and that resolved the issue.

      Any chance of a back port into Java 8? :-)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pmangal Priyanka Mangal (Inactive)
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: