-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.4.2
-
x86
-
linux
System.out.println("Error running: start " + uRL.toString());
}
} catch(Exception e) {
e.printStackTrace();
}
}
/** For this to work users must have "start".
* Microsoft Windows users have this by default.
* Unix users will need to have a link to konqueror (for KDE) called "start" in their path.
*/
public void showDocument(java.net.URL uRL, String str) {
//System.out.println("BugMain: not fully implemented: showDocument(uRl, str)");
try {
//System.out.println("BugMain.showDocument: " + "start " + uRL.toString());
java.lang.Process webBrowser = Runtime.getRuntime().exec("start " + uRL.toString());
webBrowser.waitFor();
if (webBrowser.exitValue() != 0) {
System.out.println("Error running: start " + uRL.toString());
}
} catch(Exception e) {
e.printStackTrace();
}
}
public void showStatus(String str) {
// XXX not implemented yet
System.out.println("BugMain: not implemented: showStatus");
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
private void initComponents() {
setTitle("Bug in UNIX not in Windows");
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});
myBug.init();
add(myBug);
pack();
myBug.start();
}
/** Exit the Application */
private void exitForm(java.awt.event.WindowEvent evt) {
System.exit(0);
}
private String currentFolder = ".";
private BugApplet myBug = null;
}
/*
* BugApplet.java
*
* Created on 11 April 2003, 17:00 GMT
*/
import java.awt.*;
import java.io.*;
import java.net.URL;
/** Bug in UNIX but not in Windows
* @author Francois Genolini
* @version 1.0
*/
public final class BugApplet
extends java.applet.Applet {
// Data fields are declared at the end of this class
/** Constructor for applet.
* Do not delete this constructor nor add any parameter
*/
public BugApplet() {
init_data();
}
/** Constructor for application
* @param _BugMain Parent application window (Frame)
*/
public BugApplet(BugMain _bugMain) {
init_data();
isApplication = true;
bugMain = _bugMain;
parent_frame = _bugMain;
}
/** Called automatically by applet viewer (such as Web browser).
* If application is calling class, this method must be called explicitly.
* Create and constrain our widgets
*/
public void init() {
gridBag = new GridBagLayout();
c = new GridBagConstraints();
cp = this;
cp.setLayout(gridBag);
btns = new Panel();
btns.setLayout(gridBag);
cp.setBackground(Color.white);
c.anchor = GridBagConstraints.NORTHWEST;
c.weightx = 0.0;
c.weighty = 0.0;
c.fill = GridBagConstraints.HORIZONTAL;
c.gridwidth = 2;
c.gridheight = 1;
Label l1 = new Label("V1 List of stuff: ", Label.RIGHT);
gridBag.setConstraints(l1, c);
cp.add(l1);
c.gridwidth = GridBagConstraints.REMAINDER;
listStuff = new java.awt.Choice();
gridBag.setConstraints(listStuff, c);
cp.add(listStuff);
}
/** Called automatically by applet viewer (such as Web browser).
* If application is calling class, this method must be called explicitly.
* This is called after init().
*/
public void start() {
Object obj = getParent(); // find the top level frame, it's our dialog parent
while ( (obj != null) && ! (obj instanceof Frame)) {
obj = ( (Component) obj).getParent();
}
if (parent_frame == null) {
parent_frame = (Frame) obj;
}
setupList();
}
/** Initialise data members to null (to be sure)
*/
private void init_data() {
bugMain = null;
parent_frame = null;
isApplication = false;
}
/** Build up choice list with stuff
*/
private void setupList() {
//System.out.println("controller.fill_asset_list");
if (listStuff.getItemCount() > 0) {
listStuff.removeAll();
}
String itemName = "";
for (int i = 0; i < 3; i++) {
itemName = "item #" + i;
listStuff.add(itemName); // not the system or profile dirs
}
}
/** Overriden applet method to transparently cope with invokation as application or as applet.
* @return URL of codebase (current working directory)
*/
public java.net.URL getCodeBase() {
if (isApplication) {
try {
return new java.net.URL("file://" + currentWorkingDirectory + "/");
}
catch (Exception e) {
e.printStackTrace();
return null;
}
}
else {
return super.getCodeBase();
}
}
/** Overriden applet method to transparently cope with invokation as application or as applet.
* @return Return applet context (if invoked as applet) or calling application main frame (if invoked as application)
*/
public java.applet.AppletContext getAppletContext() {
if (isApplication) {
try {
return bugMain;
}
catch (Exception e) {
e.printStackTrace();
return null;
}
}
else {
return super.getAppletContext();
}
}
private Panel btns;
private Choice listStuff;
private Frame parent_frame;
private GridBagConstraints c;
private GridBagLayout gridBag;
private java.awt.Panel cp;
/** Indicates if BugApplet is invoked as application (instead of applet)
*/
public boolean isApplication = false;
public String currentWorkingDirectory = null;
private BugMain bugMain = null;
}
---------- END SOURCE ----------
(Review ID: 183954)
======================================================================
Name: rmT116609 Date: 05/22/2003
FULL PRODUCT VERSION :
java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)
FULL OS VERSION :
Linux prismfw 2.4.19-4GB #1 Mon Oct 14 22:11:39 UTC 2002 i686 unknown
EXTRA RELEVANT SYSTEM CONFIGURATION :
ame of display: :0.0
version number: 11.0
vendor string: The XFree86 Project, Inc
vendor release number: 40300000
XFree86 version: 4.3.0
maximum request size: 4194300 bytes
motion buffer size: 256
bitmap unit, bit order, padding: 32, LSBFirst, 32
image byte order: LSBFirst
number of supported pixmap formats: 7
supported pixmap formats:
depth 1, bits_per_pixel 1, scanline_pad 32
depth 4, bits_per_pixel 8, scanline_pad 32
depth 8, bits_per_pixel 8, scanline_pad 32
depth 15, bits_per_pixel 16, scanline_pad 32
depth 16, bits_per_pixel 16, scanline_pad 32
depth 24, bits_per_pixel 32, scanline_pad 32
depth 32, bits_per_pixel 32, scanline_pad 32
keycode range: minimum 8, maximum 255
focus: window 0x2c00002, revert to PointerRoot
number of extensions: 28
BIG-REQUESTS
DOUBLE-BUFFER
DPMS
Extended-Visual-Information
FontCache
GLX
LBX
MIT-SCREEN-SAVER
MIT-SHM
MIT-SUNDRY-NONSTANDARD
RANDR
RENDER
SECURITY
SGI-GLX
SHAPE
SYNC
TOG-CUP
X-Resource
XC-APPGROUP
XC-MISC
XFree86-Bigfont
XFree86-DGA
XFree86-Misc
XFree86-VidModeExtension
XInputExtension
XKEYBOARD
XTEST
XVideo
default screen number: 0
number of screens: 1
screen #0:
dimensions: 1280x1024 pixels (361x292 millimeters)
resolution: 90x89 dots per inch
depths (7): 24, 1, 4, 8, 15, 16, 32
root window id: 0x3c
depth of root window: 24 planes
number of colormaps: minimum 1, maximum 1
default colormap: 0x20
default number of colormap cells: 256
preallocated pixels: black 0, white 16777215
options: backing-store NO, save-unders NO
largest cursor: 64x64
current input event mask: 0xd84031
KeyPressMask EnterWindowMask LeaveWindowMask
KeymapStateMask SubstructureNotifyMask SubstructureRedirectMask
PropertyChangeMask ColormapChangeMask
number of visuals: 4
default visual id: 0x23
visual:
visual id: 0x23
class: TrueColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
visual:
visual id: 0x24
class: TrueColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
visual:
visual id: 0x25
class: DirectColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
visual:
visual id: 0x26
class: DirectColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
A DESCRIPTION OF THE PROBLEM :
Simple application/applet included in this report crashes when a java.awt.Choice is added to a Panel. Crash in UNIX (Linux or HP-UX), but runs OK in Windows.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the simple application/applet included in this report. The application is in BugMain.java and the applet is in BugApplet.java
EXPECTED VERSUS ACTUAL BEHAVIOR :
In windows, this displays a choice of items for the user to select, in UNIX, this simply crashes the JVM.
crash with log file created
ERROR MESSAGES/STACK TRACES THAT OCCUR :
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4CACB970
Function=XmRenderTableCopy+0x38
Library=/usr/java/j2sdk1.4.2/jre/lib/i386/libawt.so
Current Java thread:
at sun.awt.motif.MChoicePeer.create(Native Method)
at sun.awt.motif.MComponentPeer.init(MComponentPeer.java:222)
at sun.awt.motif.MComponentPeer.<init>(MComponentPeer.java:232)
at sun.awt.motif.MChoicePeer.<init>(MChoicePeer.java:37)
at sun.awt.motif.MToolkit.createChoice(MToolkit.java:203)
at java.awt.Choice.addNotify(Choice.java:125)
- locked <0x44be8f50> (a java.awt.Component$AWTTreeLock)
at java.awt.Container.addNotify(Container.java:2049)
- locked <0x44be8f50> (a java.awt.Component$AWTTreeLock)
at java.awt.Panel.addNotify(Panel.java:71)
- locked <0x44be8f50> (a java.awt.Component$AWTTreeLock)
at java.awt.Container.addNotify(Container.java:2049)
- locked <0x44be8f50> (a java.awt.Component$AWTTreeLock)
at java.awt.Window.addNotify(Window.java:418)
- locked <0x44be8f50> (a java.awt.Component$AWTTreeLock)
at java.awt.Frame.addNotify(Frame.java:482)
- locked <0x44be8f50> (a java.awt.Component$AWTTreeLock)
at java.awt.Window.pack(Window.java:436)
at BugMain.initComponents(BugMain.java:141)
at BugMain.<init>(BugMain.java:29)
at BugMain.main(BugMain.java:37)
Dynamic libraries:
08048000-0804e000 r-xp 00000000 03:06 297897 /usr/java/j2sdk1.4.2/bin/java
0804e000-0804f000 rw-p 00005000 03:06 297897 /usr/java/j2sdk1.4.2/bin/java
40000000-40012000 r-xp 00000000 03:06 8104 /lib/ld-2.2.5.so
40012000-40013000 rw-p 00011000 03:06 8104 /lib/ld-2.2.5.so
40014000-4001c000 r-xp 00000000 03:06 299057 /usr/java/j2sdk1.4.2/jre/lib/i386/native_threads/libhpi.so
4001c000-4001d000 rw-p 00007000 03:06 299057 /usr/java/j2sdk1.4.2/jre/lib/i386/native_threads/libhpi.so
4001d000-40021000 rw-s 00000000 03:06 225555 /tmp/hsperfdata_francois/4465
40021000-40024000 r--s 00000000 03:06 298989 /usr/java/j2sdk1.4.2/jre/lib/ext/dnsns.jar
40024000-40026000 r-xp 00000000 03:06 140891 /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2
40026000-40027000 rw-p 00001000 03:06 140891 /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2
40028000-40036000 r-xp 00000000 03:06 146935 /lib/libpthread.so.0
40036000-4003d000 rw-p 0000e000 03:06 146935 /lib/libpthread.so.0
4003d000-4003f000 r-xp 00000000 03:06 183826 /lib/libdl.so.2
4003f000-40040000 rw-p 00001000 03:06 183826 /lib/libdl.so.2
40040000-40154000 r-xp 00000000 03:06 183825 /lib/libc.so.6
40154000-4015a000 rw-p 00113000 03:06 183825 /lib/libc.so.6
4015e000-40553000 r-xp 00000000 03:06 299029 /usr/java/j2sdk1.4.2/jre/lib/i386/client/libjvm.so
40553000-4056f000 rw-p 003f4000 03:06 299029 /usr/java/j2sdk1.4.2/jre/lib/i386/client/libjvm.so
40581000-40593000 r-xp 00000000 03:06 183828 /lib/libnsl.so.1
40593000-40594000 rw-p 00011000 03:06 183828 /lib/libnsl.so.1
40596000-405b8000 r-xp 00000000 03:06 183827 /lib/libm.so.6
405b8000-405b9000 rw-p 00021000 03:06 183827 /lib/libm.so.6
405b9000-405c9000 r-xp 00000000 03:06 299054 /usr/java/j2sdk1.4.2/jre/lib/i386/libverify.so
405c9000-405cb000 rw-p 0000f000 03:06 299054 /usr/java/j2sdk1.4.2/jre/lib/i386/libverify.so
405cb000-405eb000 r-xp 00000000 03:06 299040 /usr/java/j2sdk1.4.2/jre/lib/i386/libjava.so
405eb000-405ed000 rw-p 0001f000 03:06 299040 /usr/java/j2sdk1.4.2/jre/lib/i386/libjava.so
405ed000-40601000 r-xp 00000000 03:06 299055 /usr/java/j2sdk1.4.2/jre/lib/i386/libzip.so
40601000-40604000 rw-p 00013000 03:06 299055 /usr/java/j2sdk1.4.2/jre/lib/i386/libzip.so
40604000-41f87000 r--s 00000000 03:06 299560 /usr/java/j2sdk1.4.2/jre/lib/rt.jar
41fd1000-41fe7000 r--s 00000000 03:06 299127 /usr/java/j2sdk1.4.2/jre/lib/sunrsasign.jar
41fe7000-420c1000 r--s 00000000 03:06 299120 /usr/java/j2sdk1.4.2/jre/lib/jsse.jar
420c1000-420d2000 r--s 00000000 03:06 299075 /usr/java/j2sdk1.4.2/jre/lib/jce.jar
420d2000-4262b000 r--s 00000000 03:06 299076 /usr/java/j2sdk1.4.2/jre/lib/charsets.jar
446d3000-446e0000 r--s 00000000 03:06 298990 /usr/java/j2sdk1.4.2/jre/lib/ext/ldapsec.jar
4c760000-4c78b000 r--p 00000000 03:06 10057 /usr/lib/locale/en_GB/LC_CTYPE
4c78b000-4c7a7000 r--s 00000000 03:06 298992 /usr/java/j2sdk1.4.2/jre/lib/ext/sunjce_provider.jar
4c7a7000-4c863000 r--s 00000000 03:06 298980 /usr/java/j2sdk1.4.2/jre/lib/ext/localedata.jar
4c863000-4cb2e000 r-xp 00000000 03:06 299032 /usr/java/j2sdk1.4.2/jre/lib/i386/libawt.so
4cb2e000-4cb43000 rw-p 002ca000 03:06 299032 /usr/java/j2sdk1.4.2/jre/lib/i386/libawt.so
4cb69000-4cbbc000 r-xp 00000000 03:06 299049 /usr/java/j2sdk1.4.2/jre/lib/i386/libmlib_image.so
4cbbc000-4cbbd000 rw-p 00052000 03:06 299049 /usr/java/j2sdk1.4.2/jre/lib/i386/libmlib_image.so
4cbbd000-4cbc2000 r--s 00000000 03:06 56525 /usr/lib/gconv/gconv-modules.cache
4cbc2000-4cbc4000 r-xp 00000000 03:06 56524 /usr/lib/gconv/ISO8859-1.so
4cbc4000-4cbc5000 rw-p 00001000 03:06 56524 /usr/lib/gconv/ISO8859-1.so
4cbc5000-4cbce000 r-xp 00000000 03:06 131863 /usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
4cbce000-4cbcf000 rw-p 00008000 03:06 131863 /usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
4cbd1000-4cbd8000 r-xp 00000000 03:06 140900 /usr/X11R6/lib/libXp.so.6.2
4cbd8000-4cbd9000 rw-p 00006000 03:06 140900 /usr/X11R6/lib/libXp.so.6.2
4cbd9000-4cc27000 r-xp 00000000 03:06 140904 /usr/X11R6/lib/libXt.so.6.0
4cc27000-4cc2b000 rw-p 0004d000 03:06 140904 /usr/X11R6/lib/libXt.so.6.0
4cc2b000-4cc38000 r-xp 00000000 03:06 140897 /usr/X11R6/lib/libXext.so.6.4
4cc38000-4cc39000 rw-p 0000c000 03:06 140897 /usr/X11R6/lib/libXext.so.6.4
4cc39000-4cc3d000 r-xp 00000000 03:06 140905 /usr/X11R6/lib/libXtst.so.6.1
4cc3d000-4cc3e000 rw-p 00004000 03:06 140905 /usr/X11R6/lib/libXtst.so.6.1
4cc3e000-4cd04000 r-xp 00000000 03:06 140894 /usr/X11R6/lib/libX11.so.6.2
4cd04000-4cd08000 rw-p 000c6000 03:06 140894 /usr/X11R6/lib/libX11.so.6.2
4cd08000-4cd10000 r-xp 00000000 03:06 140893 /usr/X11R6/lib/libSM.so.6.0
4cd10000-4cd11000 rw-p 00007000 03:06 140893 /usr/X11R6/lib/libSM.so.6.0
4cd11000-4cd25000 r-xp 00000000 03:06 140892 /usr/X11R6/lib/libICE.so.6.3
4cd25000-4cd26000 rw-p 00013000 03:06 140892 /usr/X11R6/lib/libICE.so.6.3
4cd28000-4cde2000 r-xp 00000000 03:06 299036 /usr/java/j2sdk1.4.2/jre/lib/i386/libfontmanager.so
4cde2000-4cdfc000 rw-p 000b9000 03:06 299036 /usr/java/j2sdk1.4.2/jre/lib/i386/libfontmanager.so
4cdfd000-4ce05000 r-xp 00000000 03:06 140896 /usr/X11R6/lib/libXcursor.so.1.0
4ce05000-4ce06000 rw-p 00007000 03:06 140896 /usr/X11R6/lib/libXcursor.so.1.0
4ce06000-4ce0d000 r-xp 00000000 03:06 140903 /usr/X11R6/lib/libXrender.so.1.2
4ce0d000-4ce0e000 rw-p 00006000 03:06 140903 /usr/X11R6/lib/libXrender.so.1.2
4ce0e000-4ce2a000 r-xp 00000000 03:06 140890 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
4ce2a000-4ce2c000 rw-p 0001c000 03:06 140890 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
Heap at VM Abort:
Heap
def new generation total 576K, used 294K [0x446e0000, 0x44780000, 0x44bc0000)
eden space 512K, 44% used [0x446e0000, 0x447198e8, 0x44760000)
from space 64K, 99% used [0x44770000, 0x4477fff8, 0x44780000)
to space 64K, 0% used [0x44760000, 0x44760000, 0x44770000)
tenured generation total 1408K, used 495K [0x44bc0000, 0x44d20000, 0x486e0000)
the space 1408K, 35% used [0x44bc0000, 0x44c3bc50, 0x44c3be00, 0x44d20000)
compacting perm gen total 4096K, used 2591K [0x486e0000, 0x48ae0000, 0x4c6e0000)
the space 4096K, 63% used [0x486e0000, 0x48967c20, 0x48967e00, 0x48ae0000)
Local Time = Fri Apr 11 18:24:26 2003
Elapsed Time = 2
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2-beta-b19 mixed mode)
#
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/*
* BugMain.java
*
* Created on 11 April 2003, 17:00 GMT
*/
/** Main class for bug report if invoked as application
*
* @author Francois Genolini
*/
public class BugMain extends java.awt.Frame implements java.applet.AppletContext {
// Data fields are declared at the end of this class
/** Creates new form BugMain */
public BugMain(String args[]) {
super("Bug in UNIX not Windows");
myBug = new BugApplet(this);
java.io.File curDir = null;
if (args.length == 0) {
curDir = new java.io.File(".");
} else {
curDir = new java.io.File(args[0]);
}
try {
myBug.currentWorkingDirectory = curDir.getCanonicalPath();
} catch(Exception e) {
e.printStackTrace();
}
initComponents();
}
/** Application entry point
* @param args the command line arguments
*/
public static void main(String args[]) {
BugMain myBugMain = null;
myBugMain = new BugMain(args);
myBugMain.show();
}
public java.applet.Applet getApplet(String str) {
// XXX not implemented yet
System.out.println("BugMain: not implemented: getApplet");
return null;
}
public java.util.Enumeration getApplets() {
// XXX not implemented yet
System.out.println("BugMain: not implemented: getApplets");
return null;
}
public java.applet.AudioClip getAudioClip(java.net.URL uRL) {
// XXX not implemented yet
System.out.println("BugMain: not implemented: getAudioClip");
return null;
}
public java.awt.Image getImage(java.net.URL uRL) {
java.awt.Image img = java.awt.Toolkit.getDefaultToolkit().getImage(uRL);
try {
java.awt.MediaTracker tracker = new java.awt.MediaTracker(this);
tracker.addImage(img, 0);
tracker.waitForID(0);
} catch (Exception e) {}
return img;
}
public java.io.InputStream getStream(String str) {
// XXX not implemented yet
System.out.println("BugMain: not implemented: getStream");
return null;
}
public java.util.Iterator getStreamKeys() {
// XXX not implemented yet
System.out.println("BugMain: not implemented: getStreamKeys");
return null;
}
public void setStream(String str, java.io.InputStream inputStream) throws java.io.IOException {
// XXX not implemented yet
System.out.println("BugMain: not implemented: setStream");
}
/** For this to work users must have "start".
* Microsoft Windows users have this by default.
* Unix users will need to have a link to konqueror (for KDE) called "start" in their path.
*/
public void showDocument(java.net.URL uRL) {
//System.out.println("BugMain: not fully implemented: showDocument(uRL)");
try {
//System.out.println("BugMain.showDocument: " + "start " + uRL.toString());
java.lang.Process webBrowser = Runtime.getRuntime().exec("start " + uRL.toString());
webBrowser.waitFor();
if (webBrowser.exitValue() != 0) {
}
} catch(Exception e) {
e.printStackTrace();
}
}
/** For this to work users must have "start".
* Microsoft Windows users have this by default.
* Unix users will need to have a link to konqueror (for KDE) called "start" in their path.
*/
public void showDocument(java.net.URL uRL, String str) {
//System.out.println("BugMain: not fully implemented: showDocument(uRl, str)");
try {
//System.out.println("BugMain.showDocument: " + "start " + uRL.toString());
java.lang.Process webBrowser = Runtime.getRuntime().exec("start " + uRL.toString());
webBrowser.waitFor();
if (webBrowser.exitValue() != 0) {
System.out.println("Error running: start " + uRL.toString());
}
} catch(Exception e) {
e.printStackTrace();
}
}
public void showStatus(String str) {
// XXX not implemented yet
System.out.println("BugMain: not implemented: showStatus");
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
private void initComponents() {
setTitle("Bug in UNIX not in Windows");
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});
myBug.init();
add(myBug);
pack();
myBug.start();
}
/** Exit the Application */
private void exitForm(java.awt.event.WindowEvent evt) {
System.exit(0);
}
private String currentFolder = ".";
private BugApplet myBug = null;
}
/*
* BugApplet.java
*
* Created on 11 April 2003, 17:00 GMT
*/
import java.awt.*;
import java.io.*;
import java.net.URL;
/** Bug in UNIX but not in Windows
* @author Francois Genolini
* @version 1.0
*/
public final class BugApplet
extends java.applet.Applet {
// Data fields are declared at the end of this class
/** Constructor for applet.
* Do not delete this constructor nor add any parameter
*/
public BugApplet() {
init_data();
}
/** Constructor for application
* @param _BugMain Parent application window (Frame)
*/
public BugApplet(BugMain _bugMain) {
init_data();
isApplication = true;
bugMain = _bugMain;
parent_frame = _bugMain;
}
/** Called automatically by applet viewer (such as Web browser).
* If application is calling class, this method must be called explicitly.
* Create and constrain our widgets
*/
public void init() {
gridBag = new GridBagLayout();
c = new GridBagConstraints();
cp = this;
cp.setLayout(gridBag);
btns = new Panel();
btns.setLayout(gridBag);
cp.setBackground(Color.white);
c.anchor = GridBagConstraints.NORTHWEST;
c.weightx = 0.0;
c.weighty = 0.0;
c.fill = GridBagConstraints.HORIZONTAL;
c.gridwidth = 2;
c.gridheight = 1;
Label l1 = new Label("V1 List of stuff: ", Label.RIGHT);
gridBag.setConstraints(l1, c);
cp.add(l1);
c.gridwidth = GridBagConstraints.REMAINDER;
listStuff = new java.awt.Choice();
gridBag.setConstraints(listStuff, c);
cp.add(listStuff);
}
/** Called automatically by applet viewer (such as Web browser).
* If application is calling class, this method must be called explicitly.
* This is called after init().
*/
public void start() {
Object obj = getParent(); // find the top level frame, it's our dialog parent
while ( (obj != null) && ! (obj instanceof Frame)) {
obj = ( (Component) obj).getParent();
}
if (parent_frame == null) {
parent_frame = (Frame) obj;
}
setupList();
}
/** Initialise data members to null (to be sure)
*/
private void init_data() {
bugMain = null;
parent_frame = null;
isApplication = false;
}
/** Build up choice list with stuff
*/
private void setupList() {
//System.out.println("controller.fill_asset_list");
if (listStuff.getItemCount() > 0) {
listStuff.removeAll();
}
String itemName = "";
for (int i = 0; i < 3; i++) {
itemName = "item #" + i;
listStuff.add(itemName); // not the system or profile dirs
}
}
/** Overriden applet method to transparently cope with invokation as application or as applet.
* @return URL of codebase (current working directory)
*/
public java.net.URL getCodeBase() {
if (isApplication) {
try {
return new java.net.URL("file://" + currentWorkingDirectory + "/");
}
catch (Exception e) {
e.printStackTrace();
return null;
}
}
else {
return super.getCodeBase();
}
}
/** Overriden applet method to transparently cope with invokation as application or as applet.
* @return Return applet context (if invoked as applet) or calling application main frame (if invoked as application)
*/
public java.applet.AppletContext getAppletContext() {
if (isApplication) {
try {
return bugMain;
}
catch (Exception e) {
e.printStackTrace();
return null;
}
}
else {
return super.getAppletContext();
}
}
private Panel btns;
private Choice listStuff;
private Frame parent_frame;
private GridBagConstraints c;
private GridBagLayout gridBag;
private java.awt.Panel cp;
/** Indicates if BugApplet is invoked as application (instead of applet)
*/
public boolean isApplication = false;
public String currentWorkingDirectory = null;
private BugMain bugMain = null;
}
---------- END SOURCE ----------
(Review ID: 183954)
======================================================================
Name: rmT116609 Date: 05/22/2003
FULL PRODUCT VERSION :
java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)
FULL OS VERSION :
Linux prismfw 2.4.19-4GB #1 Mon Oct 14 22:11:39 UTC 2002 i686 unknown
EXTRA RELEVANT SYSTEM CONFIGURATION :
ame of display: :0.0
version number: 11.0
vendor string: The XFree86 Project, Inc
vendor release number: 40300000
XFree86 version: 4.3.0
maximum request size: 4194300 bytes
motion buffer size: 256
bitmap unit, bit order, padding: 32, LSBFirst, 32
image byte order: LSBFirst
number of supported pixmap formats: 7
supported pixmap formats:
depth 1, bits_per_pixel 1, scanline_pad 32
depth 4, bits_per_pixel 8, scanline_pad 32
depth 8, bits_per_pixel 8, scanline_pad 32
depth 15, bits_per_pixel 16, scanline_pad 32
depth 16, bits_per_pixel 16, scanline_pad 32
depth 24, bits_per_pixel 32, scanline_pad 32
depth 32, bits_per_pixel 32, scanline_pad 32
keycode range: minimum 8, maximum 255
focus: window 0x2c00002, revert to PointerRoot
number of extensions: 28
BIG-REQUESTS
DOUBLE-BUFFER
DPMS
Extended-Visual-Information
FontCache
GLX
LBX
MIT-SCREEN-SAVER
MIT-SHM
MIT-SUNDRY-NONSTANDARD
RANDR
RENDER
SECURITY
SGI-GLX
SHAPE
SYNC
TOG-CUP
X-Resource
XC-APPGROUP
XC-MISC
XFree86-Bigfont
XFree86-DGA
XFree86-Misc
XFree86-VidModeExtension
XInputExtension
XKEYBOARD
XTEST
XVideo
default screen number: 0
number of screens: 1
screen #0:
dimensions: 1280x1024 pixels (361x292 millimeters)
resolution: 90x89 dots per inch
depths (7): 24, 1, 4, 8, 15, 16, 32
root window id: 0x3c
depth of root window: 24 planes
number of colormaps: minimum 1, maximum 1
default colormap: 0x20
default number of colormap cells: 256
preallocated pixels: black 0, white 16777215
options: backing-store NO, save-unders NO
largest cursor: 64x64
current input event mask: 0xd84031
KeyPressMask EnterWindowMask LeaveWindowMask
KeymapStateMask SubstructureNotifyMask SubstructureRedirectMask
PropertyChangeMask ColormapChangeMask
number of visuals: 4
default visual id: 0x23
visual:
visual id: 0x23
class: TrueColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
visual:
visual id: 0x24
class: TrueColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
visual:
visual id: 0x25
class: DirectColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
visual:
visual id: 0x26
class: DirectColor
depth: 24 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
A DESCRIPTION OF THE PROBLEM :
Simple application/applet included in this report crashes when a java.awt.Choice is added to a Panel. Crash in UNIX (Linux or HP-UX), but runs OK in Windows.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the simple application/applet included in this report. The application is in BugMain.java and the applet is in BugApplet.java
EXPECTED VERSUS ACTUAL BEHAVIOR :
In windows, this displays a choice of items for the user to select, in UNIX, this simply crashes the JVM.
crash with log file created
ERROR MESSAGES/STACK TRACES THAT OCCUR :
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4CACB970
Function=XmRenderTableCopy+0x38
Library=/usr/java/j2sdk1.4.2/jre/lib/i386/libawt.so
Current Java thread:
at sun.awt.motif.MChoicePeer.create(Native Method)
at sun.awt.motif.MComponentPeer.init(MComponentPeer.java:222)
at sun.awt.motif.MComponentPeer.<init>(MComponentPeer.java:232)
at sun.awt.motif.MChoicePeer.<init>(MChoicePeer.java:37)
at sun.awt.motif.MToolkit.createChoice(MToolkit.java:203)
at java.awt.Choice.addNotify(Choice.java:125)
- locked <0x44be8f50> (a java.awt.Component$AWTTreeLock)
at java.awt.Container.addNotify(Container.java:2049)
- locked <0x44be8f50> (a java.awt.Component$AWTTreeLock)
at java.awt.Panel.addNotify(Panel.java:71)
- locked <0x44be8f50> (a java.awt.Component$AWTTreeLock)
at java.awt.Container.addNotify(Container.java:2049)
- locked <0x44be8f50> (a java.awt.Component$AWTTreeLock)
at java.awt.Window.addNotify(Window.java:418)
- locked <0x44be8f50> (a java.awt.Component$AWTTreeLock)
at java.awt.Frame.addNotify(Frame.java:482)
- locked <0x44be8f50> (a java.awt.Component$AWTTreeLock)
at java.awt.Window.pack(Window.java:436)
at BugMain.initComponents(BugMain.java:141)
at BugMain.<init>(BugMain.java:29)
at BugMain.main(BugMain.java:37)
Dynamic libraries:
08048000-0804e000 r-xp 00000000 03:06 297897 /usr/java/j2sdk1.4.2/bin/java
0804e000-0804f000 rw-p 00005000 03:06 297897 /usr/java/j2sdk1.4.2/bin/java
40000000-40012000 r-xp 00000000 03:06 8104 /lib/ld-2.2.5.so
40012000-40013000 rw-p 00011000 03:06 8104 /lib/ld-2.2.5.so
40014000-4001c000 r-xp 00000000 03:06 299057 /usr/java/j2sdk1.4.2/jre/lib/i386/native_threads/libhpi.so
4001c000-4001d000 rw-p 00007000 03:06 299057 /usr/java/j2sdk1.4.2/jre/lib/i386/native_threads/libhpi.so
4001d000-40021000 rw-s 00000000 03:06 225555 /tmp/hsperfdata_francois/4465
40021000-40024000 r--s 00000000 03:06 298989 /usr/java/j2sdk1.4.2/jre/lib/ext/dnsns.jar
40024000-40026000 r-xp 00000000 03:06 140891 /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2
40026000-40027000 rw-p 00001000 03:06 140891 /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2
40028000-40036000 r-xp 00000000 03:06 146935 /lib/libpthread.so.0
40036000-4003d000 rw-p 0000e000 03:06 146935 /lib/libpthread.so.0
4003d000-4003f000 r-xp 00000000 03:06 183826 /lib/libdl.so.2
4003f000-40040000 rw-p 00001000 03:06 183826 /lib/libdl.so.2
40040000-40154000 r-xp 00000000 03:06 183825 /lib/libc.so.6
40154000-4015a000 rw-p 00113000 03:06 183825 /lib/libc.so.6
4015e000-40553000 r-xp 00000000 03:06 299029 /usr/java/j2sdk1.4.2/jre/lib/i386/client/libjvm.so
40553000-4056f000 rw-p 003f4000 03:06 299029 /usr/java/j2sdk1.4.2/jre/lib/i386/client/libjvm.so
40581000-40593000 r-xp 00000000 03:06 183828 /lib/libnsl.so.1
40593000-40594000 rw-p 00011000 03:06 183828 /lib/libnsl.so.1
40596000-405b8000 r-xp 00000000 03:06 183827 /lib/libm.so.6
405b8000-405b9000 rw-p 00021000 03:06 183827 /lib/libm.so.6
405b9000-405c9000 r-xp 00000000 03:06 299054 /usr/java/j2sdk1.4.2/jre/lib/i386/libverify.so
405c9000-405cb000 rw-p 0000f000 03:06 299054 /usr/java/j2sdk1.4.2/jre/lib/i386/libverify.so
405cb000-405eb000 r-xp 00000000 03:06 299040 /usr/java/j2sdk1.4.2/jre/lib/i386/libjava.so
405eb000-405ed000 rw-p 0001f000 03:06 299040 /usr/java/j2sdk1.4.2/jre/lib/i386/libjava.so
405ed000-40601000 r-xp 00000000 03:06 299055 /usr/java/j2sdk1.4.2/jre/lib/i386/libzip.so
40601000-40604000 rw-p 00013000 03:06 299055 /usr/java/j2sdk1.4.2/jre/lib/i386/libzip.so
40604000-41f87000 r--s 00000000 03:06 299560 /usr/java/j2sdk1.4.2/jre/lib/rt.jar
41fd1000-41fe7000 r--s 00000000 03:06 299127 /usr/java/j2sdk1.4.2/jre/lib/sunrsasign.jar
41fe7000-420c1000 r--s 00000000 03:06 299120 /usr/java/j2sdk1.4.2/jre/lib/jsse.jar
420c1000-420d2000 r--s 00000000 03:06 299075 /usr/java/j2sdk1.4.2/jre/lib/jce.jar
420d2000-4262b000 r--s 00000000 03:06 299076 /usr/java/j2sdk1.4.2/jre/lib/charsets.jar
446d3000-446e0000 r--s 00000000 03:06 298990 /usr/java/j2sdk1.4.2/jre/lib/ext/ldapsec.jar
4c760000-4c78b000 r--p 00000000 03:06 10057 /usr/lib/locale/en_GB/LC_CTYPE
4c78b000-4c7a7000 r--s 00000000 03:06 298992 /usr/java/j2sdk1.4.2/jre/lib/ext/sunjce_provider.jar
4c7a7000-4c863000 r--s 00000000 03:06 298980 /usr/java/j2sdk1.4.2/jre/lib/ext/localedata.jar
4c863000-4cb2e000 r-xp 00000000 03:06 299032 /usr/java/j2sdk1.4.2/jre/lib/i386/libawt.so
4cb2e000-4cb43000 rw-p 002ca000 03:06 299032 /usr/java/j2sdk1.4.2/jre/lib/i386/libawt.so
4cb69000-4cbbc000 r-xp 00000000 03:06 299049 /usr/java/j2sdk1.4.2/jre/lib/i386/libmlib_image.so
4cbbc000-4cbbd000 rw-p 00052000 03:06 299049 /usr/java/j2sdk1.4.2/jre/lib/i386/libmlib_image.so
4cbbd000-4cbc2000 r--s 00000000 03:06 56525 /usr/lib/gconv/gconv-modules.cache
4cbc2000-4cbc4000 r-xp 00000000 03:06 56524 /usr/lib/gconv/ISO8859-1.so
4cbc4000-4cbc5000 rw-p 00001000 03:06 56524 /usr/lib/gconv/ISO8859-1.so
4cbc5000-4cbce000 r-xp 00000000 03:06 131863 /usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
4cbce000-4cbcf000 rw-p 00008000 03:06 131863 /usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
4cbd1000-4cbd8000 r-xp 00000000 03:06 140900 /usr/X11R6/lib/libXp.so.6.2
4cbd8000-4cbd9000 rw-p 00006000 03:06 140900 /usr/X11R6/lib/libXp.so.6.2
4cbd9000-4cc27000 r-xp 00000000 03:06 140904 /usr/X11R6/lib/libXt.so.6.0
4cc27000-4cc2b000 rw-p 0004d000 03:06 140904 /usr/X11R6/lib/libXt.so.6.0
4cc2b000-4cc38000 r-xp 00000000 03:06 140897 /usr/X11R6/lib/libXext.so.6.4
4cc38000-4cc39000 rw-p 0000c000 03:06 140897 /usr/X11R6/lib/libXext.so.6.4
4cc39000-4cc3d000 r-xp 00000000 03:06 140905 /usr/X11R6/lib/libXtst.so.6.1
4cc3d000-4cc3e000 rw-p 00004000 03:06 140905 /usr/X11R6/lib/libXtst.so.6.1
4cc3e000-4cd04000 r-xp 00000000 03:06 140894 /usr/X11R6/lib/libX11.so.6.2
4cd04000-4cd08000 rw-p 000c6000 03:06 140894 /usr/X11R6/lib/libX11.so.6.2
4cd08000-4cd10000 r-xp 00000000 03:06 140893 /usr/X11R6/lib/libSM.so.6.0
4cd10000-4cd11000 rw-p 00007000 03:06 140893 /usr/X11R6/lib/libSM.so.6.0
4cd11000-4cd25000 r-xp 00000000 03:06 140892 /usr/X11R6/lib/libICE.so.6.3
4cd25000-4cd26000 rw-p 00013000 03:06 140892 /usr/X11R6/lib/libICE.so.6.3
4cd28000-4cde2000 r-xp 00000000 03:06 299036 /usr/java/j2sdk1.4.2/jre/lib/i386/libfontmanager.so
4cde2000-4cdfc000 rw-p 000b9000 03:06 299036 /usr/java/j2sdk1.4.2/jre/lib/i386/libfontmanager.so
4cdfd000-4ce05000 r-xp 00000000 03:06 140896 /usr/X11R6/lib/libXcursor.so.1.0
4ce05000-4ce06000 rw-p 00007000 03:06 140896 /usr/X11R6/lib/libXcursor.so.1.0
4ce06000-4ce0d000 r-xp 00000000 03:06 140903 /usr/X11R6/lib/libXrender.so.1.2
4ce0d000-4ce0e000 rw-p 00006000 03:06 140903 /usr/X11R6/lib/libXrender.so.1.2
4ce0e000-4ce2a000 r-xp 00000000 03:06 140890 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
4ce2a000-4ce2c000 rw-p 0001c000 03:06 140890 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
Heap at VM Abort:
Heap
def new generation total 576K, used 294K [0x446e0000, 0x44780000, 0x44bc0000)
eden space 512K, 44% used [0x446e0000, 0x447198e8, 0x44760000)
from space 64K, 99% used [0x44770000, 0x4477fff8, 0x44780000)
to space 64K, 0% used [0x44760000, 0x44760000, 0x44770000)
tenured generation total 1408K, used 495K [0x44bc0000, 0x44d20000, 0x486e0000)
the space 1408K, 35% used [0x44bc0000, 0x44c3bc50, 0x44c3be00, 0x44d20000)
compacting perm gen total 4096K, used 2591K [0x486e0000, 0x48ae0000, 0x4c6e0000)
the space 4096K, 63% used [0x486e0000, 0x48967c20, 0x48967e00, 0x48ae0000)
Local Time = Fri Apr 11 18:24:26 2003
Elapsed Time = 2
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2-beta-b19 mixed mode)
#
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/*
* BugMain.java
*
* Created on 11 April 2003, 17:00 GMT
*/
/** Main class for bug report if invoked as application
*
* @author Francois Genolini
*/
public class BugMain extends java.awt.Frame implements java.applet.AppletContext {
// Data fields are declared at the end of this class
/** Creates new form BugMain */
public BugMain(String args[]) {
super("Bug in UNIX not Windows");
myBug = new BugApplet(this);
java.io.File curDir = null;
if (args.length == 0) {
curDir = new java.io.File(".");
} else {
curDir = new java.io.File(args[0]);
}
try {
myBug.currentWorkingDirectory = curDir.getCanonicalPath();
} catch(Exception e) {
e.printStackTrace();
}
initComponents();
}
/** Application entry point
* @param args the command line arguments
*/
public static void main(String args[]) {
BugMain myBugMain = null;
myBugMain = new BugMain(args);
myBugMain.show();
}
public java.applet.Applet getApplet(String str) {
// XXX not implemented yet
System.out.println("BugMain: not implemented: getApplet");
return null;
}
public java.util.Enumeration getApplets() {
// XXX not implemented yet
System.out.println("BugMain: not implemented: getApplets");
return null;
}
public java.applet.AudioClip getAudioClip(java.net.URL uRL) {
// XXX not implemented yet
System.out.println("BugMain: not implemented: getAudioClip");
return null;
}
public java.awt.Image getImage(java.net.URL uRL) {
java.awt.Image img = java.awt.Toolkit.getDefaultToolkit().getImage(uRL);
try {
java.awt.MediaTracker tracker = new java.awt.MediaTracker(this);
tracker.addImage(img, 0);
tracker.waitForID(0);
} catch (Exception e) {}
return img;
}
public java.io.InputStream getStream(String str) {
// XXX not implemented yet
System.out.println("BugMain: not implemented: getStream");
return null;
}
public java.util.Iterator getStreamKeys() {
// XXX not implemented yet
System.out.println("BugMain: not implemented: getStreamKeys");
return null;
}
public void setStream(String str, java.io.InputStream inputStream) throws java.io.IOException {
// XXX not implemented yet
System.out.println("BugMain: not implemented: setStream");
}
/** For this to work users must have "start".
* Microsoft Windows users have this by default.
* Unix users will need to have a link to konqueror (for KDE) called "start" in their path.
*/
public void showDocument(java.net.URL uRL) {
//System.out.println("BugMain: not fully implemented: showDocument(uRL)");
try {
//System.out.println("BugMain.showDocument: " + "start " + uRL.toString());
java.lang.Process webBrowser = Runtime.getRuntime().exec("start " + uRL.toString());
webBrowser.waitFor();
if (webBrowser.exitValue() != 0) {