-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.3.0
-
x86
-
windows_nt
Name: skT45625 Date: 08/09/2000
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
We use JPopupMenu to show up a scrolled list as it is well-known from JComboBox.
If the popup does not fit into the application frame (and therefore is created
as a heavy-weight WindowPopup), there occur low-level exceptions when moving the
mouse over the menu. The problem turned out to occur only the *SECOND* time, the
popup is displayed, so it may be related to DefaultPopupFactory's recycling
magic.
A similar effect has been reported much earlier with Bug ID 4142486. However,
the problems don't seem to be related. Se the following stack trace for details:
Exception occurred during event dispatching:
java.lang.NullPointerException: null pData
at sun.awt.windows.WInputMethod.handleNativeIMEEvent(Native Method)
at sun.awt.windows.WInputMethod.dispatchEvent(WInputMethod.java:275)
at sun.awt.im.InputContext.dispatchEvent(InputContext.java:202)
at
sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:177)
at java.awt.Component.dispatchEventImpl(Component.java:2529)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2499)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at
java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:2318)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2189)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:912)
at java.awt.Component.dispatchEvent(Component.java:2499)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
Analyzing the code of DefaultPopupFactory, we found a dubious detail in function
createHeavyWeightPopup() which may cause problems. There is an assignment made
to variable popup which refers to a *member* in createHeavyWeightPopup() while
it is declared as a local variable in createLightWeightPopup() and
createMediumWeightPopup(). This will probably mess up the class' logic. However,
it looks like this in JDK 1.2 and 1.2.2 too, which don't cause us any problems.
(Review ID: 108106)
======================================================================
- duplicates
-
JDK-4280243 Kestrel I, jMenu app causes null pointer exceptions
-
- Closed
-