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

JavaNativeException raised from MacOSXKeyHandler

XMLWordPrintable

    • x86
    • os_x

      FULL PRODUCT VERSION :
      JRE 8u60

      ADDITIONAL OS VERSION INFORMATION :
      Mac OS X 10.10.5 Yosemite

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Safari 8.0.8

      A DESCRIPTION OF THE PROBLEM :
      When starting a Java Applet with Safari, Mac OS show an "Internal Error" error window with the following text, and this option to "Crash" or "Continue".


      Internal Error
      An uncaught exception was raised. Choose "Continue" to continue running in an inconsistent state. Choose "Crash" to halt the application and file a bug with Crash Reporter. Choosing "Crash" will result in the loss of all unsaved data.


      As a result:
      - Choosing Crash crash the JVM.
      - Choosing Continue allow the applet to run with no issue.


      The "show detail" button, show the following information:


      Exception Name: JavaNativeException
      Description: java.lang.NullPointerException
      at sun.awt.SunToolkit.getSystemEventQueueImplPP(SunToolkit.java:1090)
      at sun.awt.SunToolkit.getSystemEventQueueImplPP(SunToolkit.java:1085)
      at sun.awt.SunToolkit.getSystemEventQueueImpl(SunToolkit.java:1080)
      at java.awt.Toolkit.getEventQueue(Toolkit.java:1734)
      at java.awt.EventQueue.invokeLater(EventQueue.java:1264)
      at sun.plugin2.main.client.MacOSXKeyHandler.notifyFlagsChangedFromNative(Unknown Source)

      User Info: (null)

      0 CoreFoundation 0x00007fff8ea8903c __exceptionPreprocess + 172
      1 libobjc.A.dylib 0x00007fff9438376e objc_exception_throw + 43
      2 CoreFoundation 0x00007fff8ea88bd9 -[NSException raise] + 9
      3 JavaNativeFoundation 0x00000001206efc3f JNFCallStaticVoidMethod + 213
      4 libnpjp2.dylib 0x0000000122c26d14 flagsChanged + 72
      5 CoreGraphics 0x00007fff9355eee1 processEventTapData + 154
      6 CoreGraphics 0x00007fff9355ed24 _CGYPostEventTapData + 193
      7 CoreGraphics 0x00007fff93566db1 _XPostEventTapData + 89
      8 CoreGraphics 0x00007fff93566e9a CGYEventTap_server + 86
      9 CoreGraphics 0x00007fff9355ee0c eventTapMessageHandler + 46
      10 CoreFoundation 0x00007fff8e9a5dad __CFMachPortPerform + 285
      11 CoreFoundation 0x00007fff8e9a5c79 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
      12 CoreFoundation 0x00007fff8e9a5beb __CFRunLoopDoSource1 + 475
      13 CoreFoundation 0x00007fff8e997767 __CFRunLoopRun + 2375
      14 CoreFoundation 0x00007fff8e996bd8 CFRunLoopRunSpecific + 296
      15 HIToolbox 0x00007fff90af356f RunCurrentEventLoopInMode + 235
      16 HIToolbox 0x00007fff90af31ee ReceiveNextEventCommon + 179
      17 HIToolbox 0x00007fff90af312b _BlockUntilNextEventMatchingListInModeWithFilter + 71
      18 AppKit 0x00007fff8982a8ab _DPSNextEvent + 978
      19 AppKit 0x00007fff89829e58 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
      20 libosxapp.dylib 0x0000000122bbf3aa -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 124
      21 AppKit 0x00007fff8981faf3 -[NSApplication run] + 594
      22 libosxapp.dylib 0x0000000122bbf14d +[NSApplicationAWT runAWTLoopWithApp:] + 156
      23 libawt_lwawt.dylib 0x0000000122b4c517 -[AWTStarter starter:] + 905
      24 Foundation 0x00007fff8df71dd0 __NSThreadPerformPerform + 293
      25 CoreFoundation 0x00007fff8e9a5a01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
      26 CoreFoundation 0x00007fff8e997b8d __CFRunLoopDoSources0 + 269
      27 CoreFoundation 0x00007fff8e9971bf __CFRunLoopRun + 927
      28 CoreFoundation 0x00007fff8e996bd8 CFRunLoopRunSpecific + 296
      29 java 0x0000000104175463 CreateExecutionEnvironment + 871
      30 java 0x00000001041711ac JLI_Launch + 1952
      31 java 0x00000001041774c0 main + 101
      32 java 0x0000000104170a04 start + 52


      Note that:
      - The issue does not occur with Firefox (40.0.3) on the same Mac
      - It does not occur on another Mac with the same java/browser configuration
      - It does not occur on Windows (With Firefox or Internet Explorer)
      - Cleaning the java cache make the error to occur later in the applet usage, but does not prevent it from occurring.

      Googling on this error show several reports of a very similar issue, but no real solution to this problem.
      The SunToolkit.java should handle this NPE with

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Just start the applet, and click around.
      If the Java Console is set to popup, clicking in the console may cause the issue as well.


      REPRODUCIBILITY :
      This bug can be reproduced always.

            pardesha Pardeep Sharma
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: