Exceptions after a touchpad gesture on macOS

  • b19
  • os_x

    IssueFix VersionAssigneePriorityStatusResolutionResolved In Build
    JDK-827536517.0.2 Philip RaceP4ResolvedFixedb03
    JDK-827534111.0.14-oracle Philip RaceP4ResolvedFixedb02
    JDK-827549211.0.14 Jonathan DowlandP4ResolvedFixedb01
    JDK-82755058u321 Suman Rajkumaar KodandaramaP4ResolvedFixedb02

      With latest JDK version, performing touchpad gestures over a Java application's window causes error messages to be printed to console.
      To reproduce, launch the sample program (with source code given below) on a MacBook, and perform a magnification (two-finger pinch) gesture over the
      opened window. The following messages appear in console:

      2021-10-12 13:52:37.454 java[25747:1001960] Bad JNI lookup handleGestureFromNative
      2021-10-12 13:52:37.455 java[25747:1001960] (
      0 libawt_lwawt.dylib 0x000000010c0110d0 -[AWTWindow_Normal postGesture:as:a:b:] + 944
      1 AppKit 0x00007fff22f444e8 forwardMethod + 204
      2 AppKit 0x00007fff22ebb578 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 6482
      3 AppKit 0x00007fff22eb9a06 -[NSWindow(NSEventRouting) sendEvent:] + 347
      4 libawt_lwawt.dylib 0x000000010c010d07 -[AWTWindow_Normal sendEvent:] + 87
      5 AppKit 0x00007fff234aa954 routeGestureEvent + 389
      6 AppKit 0x00007fff22eb8803 -[NSApplication(NSEvent) sendEvent:] + 2895
      7 libosxapp.dylib 0x0000000105f38765 -[NSApplicationAWT sendEvent:] + 437
      8 AppKit 0x00007fff23190be1 -[NSApplication _handleEvent:] + 65
      9 AppKit 0x00007fff22d20c8e -[NSApplication run] + 623
      10 libosxapp.dylib 0x0000000105f38369 +[NSApplicationAWT runAWTLoopWithApp:] + 169
      11 libawt_lwawt.dylib 0x000000010c068830 +[AWTStarter starter:headless:] + 496
      12 libosxapp.dylib 0x0000000105f3a03f +[ThreadUtilities invokeBlockCopy:] + 15
      13 Foundation 0x00007fff212d8b81 __NSThreadPerformPerform + 204
      14 CoreFoundation 0x00007fff205292bc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
      15 CoreFoundation 0x00007fff20529224 __CFRunLoopDoSource0 + 180
      16 CoreFoundation 0x00007fff20528fa4 __CFRunLoopDoSources0 + 242
      17 CoreFoundation 0x00007fff205279cc __CFRunLoopRun + 893
      18 CoreFoundation 0x00007fff20526f8c CFRunLoopRunSpecific + 563
      19 libjli.dylib 0x0000000105a280b2 CreateExecutionEnvironment + 386
      20 libjli.dylib 0x0000000105a23c15 JLI_Launch + 1413
      21 java 0x0000000105a11c11 main + 401
      22 libdyld.dylib 0x00007fff2044cf3d start + 1
      )
      Exception in thread "AppKit Thread" java.lang.NoSuchMethodError: Lcom/apple/eawt/event/GestureHandler;.handleGestureFromNative(Ljava/awt/Window;IDDDD)V

      The issue is reproducible for JDK 17 and 11.0.12 versions, but not for 16.0.2 or 11.0.11 versions.

      ----------- Sample program source code start -----------
      import javax.swing.*;

      public class JFrameTest {
          public static void main(String[] args) {
              SwingUtilities.invokeLater(() -> {
                  JFrame f = new JFrame();
                  f.setBounds(300, 300, 300, 300);
                  f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
                  f.setVisible(true);
              });
          }
      }
      ----------- Sample program source code end -----------

        backported by

        Backport - A issue that is required to port a Bug or Feature into another product release. This issue type is generally associated with the main Bug/Feature to represent each individual release of the port.JDK-8275341Exceptions after a touchpad gesture on macOS

        • P4 - Minor loss of function, or other problem where easy workaround is present.
        • Resolved

        Backport - A issue that is required to port a Bug or Feature into another product release. This issue type is generally associated with the main Bug/Feature to represent each individual release of the port.JDK-8275365Exceptions after a touchpad gesture on macOS

        • P4 - Minor loss of function, or other problem where easy workaround is present.
        • Resolved

        Backport - A issue that is required to port a Bug or Feature into another product release. This issue type is generally associated with the main Bug/Feature to represent each individual release of the port.JDK-8275492Exceptions after a touchpad gesture on macOS

        • P4 - Minor loss of function, or other problem where easy workaround is present.
        • Resolved

        Backport - A issue that is required to port a Bug or Feature into another product release. This issue type is generally associated with the main Bug/Feature to represent each individual release of the port.JDK-8275505Exceptions after a touchpad gesture on macOS

        • P4 - Minor loss of function, or other problem where easy workaround is present.
        • Resolved
        links to

        CommitCommitopenjdk/jdk11u-dev/2847e345

          CommitCommitopenjdk/jdk17u/ddb89c35

            CommitCommitopenjdk/jdk/89999f70

              ReviewReviewopenjdk/jdk11u-dev/531

                ReviewReviewopenjdk/jdk17u/199

                  ReviewReviewopenjdk/jdk/5910

                    (5 links to)