-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1
-
x86
-
windows_nt
The following application creates a frame that contains a menu whose
item is a null string.
An attempt to show the frame causes a memory reference error on
Windows NT:
The instruction at "0x77a055e6" referenced memory at "0x00000000".
The memory could not be "read".
import java.awt.*;
public class MenuTest extends Frame {
public MenuTest(String title)
{
super(title);
setSize(300, 300);
MenuBar mb = new MenuBar();
Menu m = new Menu("File", false);
String s = null;
System.out.println("Adding null string to menu.. ");
m.add(s);
MenuItem mi = m.getItem(0);
System.out.println("Item 0 is " + mi);
System.out.println("Adding menu to menubar.. ");
mb.add(m);
System.out.println("Setting menubar.. ");
setMenuBar(mb);
}
public static void main(String args[])
{
Frame f = new MenuTest("menu test");
System.out.println("Showing frame.. ");
f.setVisible(true);
}
}
- duplicates
-
JDK-4064202 segfault in win32 awt when a MenuItem with a null label is added to a menu
-
- Closed
-