-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.2.0
-
sparc
-
solaris_2.5.1
Using a popup menu in the JNI'd motif/awt causes a core dump.
[ Note, I plan on putting back a temporary fix that will
prevent the crashes, but leaks objects. This needs to
be properly fixed, though! ]
To reproduce, bring up hotjava and run the PopupMenuTest from
the build tree. Another option is to right mouse over an image
and try to select any menu item.
What's happening is that the Popup menu calls dispose on itself
and all its menu items, and then the event loop tries to dispatch
an event from one of the disposed menuitems. In the non JNI code,
this worked because the two events happened so quickly that nothing
had time to be disturbed. The JNI'd code requires the use of global
refs for event dispatching, and these are immediately invalidated
by the call to dispose. The following event dispatch gets a bad
handle to the former menuitem and causes a crash.
I am putting back a temporary fix that prevents the popup menu
from freeing any of its menu items. This should prevent customers
from seeing core dumps in jdk1.2 EA2, but it still needs to be
fixed correctly!
[ Note, I plan on putting back a temporary fix that will
prevent the crashes, but leaks objects. This needs to
be properly fixed, though! ]
To reproduce, bring up hotjava and run the PopupMenuTest from
the build tree. Another option is to right mouse over an image
and try to select any menu item.
What's happening is that the Popup menu calls dispose on itself
and all its menu items, and then the event loop tries to dispatch
an event from one of the disposed menuitems. In the non JNI code,
this worked because the two events happened so quickly that nothing
had time to be disturbed. The JNI'd code requires the use of global
refs for event dispatching, and these are immediately invalidated
by the call to dispose. The following event dispatch gets a bad
handle to the former menuitem and causes a crash.
I am putting back a temporary fix that prevents the popup menu
from freeing any of its menu items. This should prevent customers
from seeing core dumps in jdk1.2 EA2, but it still needs to be
fixed correctly!
- relates to
-
JDK-4136116 Solaris and Solaris x86: SEVERE memory leak when using PopupMenus
-
- Closed
-