JDK-4849111 : Clicking Choice menu, java.lang.NullPointerException are thrown.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.1_03
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris
  • CPU: sparc
  • Submitted: 2003-04-16
  • Updated: 2003-05-07
  • Resolved: 2003-04-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.1_03 03Fixed
Related Reports
Relates :  
Description
==========================================
OS : Solaris sparc 8 and 9 (32bit/64bit)
Browser : Netscape 4.78 / Netscpae 6.2.3
JRE: J2RE 1.4.1_03 ea b01
locale: euc, pck, utf8
==========================================

On Plugin test case, clicking the choice menu, the following exceptions are thrown on Java Console;

java.lang.NullPointerException 
        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:515) 
        at java.awt.Component.dispatchEventImpl(Component.java:3509) 
        at java.awt.Container.dispatchEventImpl(Container.java:1623) 
        at java.awt.Window.dispatchEventImpl(Window.java:1590) 
        at java.awt.Component.dispatchEvent(Component.java:3480) 
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:450) 
        at java.awt.SequencedEvent.dispatch(SequencedEvent.java:93) 
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:448) 
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197) 
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) 
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144) 
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136) 
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:99) 

Alothogh exception throws, apllet works.
I chcked this problem with the following jdk release.
    1.4.1 fcs b21 - NOT reproducible
    1.4.1_01  b01 - NOT reproducible
    1.4.1_02  b01 - NOT reproducible
              b06 - reproducible 
    1.4.1_03 ea b01 - reproducible
    1.4.2 beta b19 - NOT reproducible.

This problem does not occur on jdk1.4.1 and jdk1.4.1_01 b01, thererore, this is a regression.
It seems that this problem is occured between 1.4.1_02 b02 and b06.

* This problem does not occur on Solaris IA.

To reproducee;
1.Install JRE 1.4.1_03 ea b01 on Solaris sparc.
2. setenv NPX_PLUGIN_PATH
3. Invoke Netscape 4.7x browser
4. Go to the URL
   http://i18n-u1-26c.sfbay.sun.com:8080/jaws-i18n/doc/plugin-bat.html
5. Click "I18N Test Case #2 (I18n 2D Test)
   http://i18n-u1-26c.sfbay.sun.com:8080/jaws-i18n/test/bat/basic2d.html
6. test case comes up.
7. Click choice menu(font, style, size etc...)

Then, an exception are thrown on Java Console.

Although this test case exists a stand alone test case which is included in 
GlobalSuite, this problem does not occur.

As this problem occurred only on plugin testing, I filed Category as a "plugin".


[###@###.### 2003-04-16]

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.1_03 FIXED IN: 1.4.1_03 INTEGRATED IN: 1.4.1_03 VERIFIED IN: 1.4.1_03
14-06-2004

SUGGESTED FIX *** 1148,1154 **** int32_t width, height; enum wmgr_t runningWM; jobject winAttrObj; ! static jobject windowClass = NULL; /* Any event handlers which take peer instance pointers as * client_data should check to ensure the widget has not been * marked as destroyed as a result of a dispose() call on the peer --- 1148,1154 ---- int32_t width, height; enum wmgr_t runningWM; jobject winAttrObj; ! /* Any event handlers which take peer instance pointers as * client_data should check to ensure the widget has not been * marked as destroyed as a result of a dispose() call on the peer *************** *** 1231,1251 **** wpeer, mComponentPeerIDs.target); if (peerComp != NULL) { ! // Check that peerComp is top-level ! ! // load class ! if (windowClass == NULL) { ! jobject localWindowClass = (*env)->FindClass(env, "java/awt/Window"); ! windowClass = (*env)->NewGlobalRef(env, localWindowClass); ! (*env)->DeleteLocalRef(env, localWindowClass); ! } ! if ((*env)->IsInstanceOf(env, peerComp, windowClass)) { ! oppositeWindow = peerComp; ! } else { // Opposite object is not Window - there is no opposite window. ! (*env)->DeleteLocalRef(env, peerComp); ! peerComp = NULL; ! } } } } --- 1231,1237 ---- wpeer, mComponentPeerIDs.target); if (peerComp != NULL) { ! oppositeWindow = peerComp; } } } ###@###.### 2003-04-23
23-04-2003

EVALUATION Was able to reproduce the problem and identified a fix. There are some failures from JCK. Sounds like bugs 4452384, 4780941 should be backported too. ###@###.### 2003-04-22 JCK tests passed. Fix has been putback to 1.4.1_03 respin This bug is related to 4784919, 4784698. ###@###.### 2003-04-23
22-04-2003