JDK-8135302 : JavaNativeException raised from MacOSXKeyHandler
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 8u60
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: os_x
  • CPU: x86
  • Submitted: 2015-09-08
  • Updated: 2016-11-17
  • Resolved: 2016-11-17
Related Reports
Relates :  
Description
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.


Comments
Closing this as Cannot Reproduce as submitter confirmed that the issue did not occur for clearing the cache.
17-11-2016

Received following response from the submitter: ============================================================ On 9/9/2015 8:24 PM,......... wrote: > Hi .........., > > Thank you for your message on this issue. > Unfortunately I am not experiencing the issue by myself. > I am working in the support team of my company, and this issue was > reported by one of our customer. > > I was able to reproduce it on my machine with the public beta of Mac OS X > 10.11 "El Capitan��, but after cleaning the java cache the issue was > resolved. > Note that this cleaning cache solution only worked for me, it did not on > my customer machine (the ��crash�� popup appears later, but it still > appears). > > As you suggested I tried to install the JDK9 on this machine, but the > issue did not occur. > > > Best regards, ============================================================
10-09-2015

According to submitter the issue seems restricted to Safari 8.0.8 on Mac OS X 10.10.5 Yosemite. This need to be verified with the particular applet that reproduces the crash. Writing back to the submitter to provide more information including applet url to be able to analyze this in house. ================================================================ On 9/9/2015 2:30 PM, .......... wrote: > Hi .........., > > Is it possible for you to share more information including the applet url for us to analyze this issue better. > Further it would be interesting to know if you are able to reproduce this issue with early access version of JRE 9. > You can download the same from: > https://jdk9.java.net/download/ > > Thank You, > .............. ==============================================================
09-09-2015