|
Duplicate :
|
|
|
Duplicate :
|
|
|
Duplicate :
|
|
|
Relates :
|
|
|
Relates :
|
FULL PRODUCT VERSION :
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
Also tested on:
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
EXTRA RELEVANT SYSTEM CONFIGURATION :
HyperThreaded Intel Processor, 2 GB of system memory
A DESCRIPTION OF THE PROBLEM :
Swing fails to paint _ALL_ of the text on any GUI if it is started with a large heap size.
For example, on my pc - '-Xmx1050M' works ok.
However, the same application launched with '-Xmx1100M' fails.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run my provided class (without setting any heap size parameters)
(alternatively - use any java swing application)
Now run the class again with your heap size set very high - for example - '-Xmx1100M'
Note that all text in the GUI fails to paint.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The GUI should behave the same no matter what the max heap size is set to.
ACTUAL -
No text appears in any Swing component.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package bugs;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
public class BugJavaGui extends JFrame{
public BugJavaGui()
{
final JComboBox jComboBox = new JComboBox();
jComboBox.setEditable(true);
jComboBox.addItem("item 1");
jComboBox.addItem("item 2");
jComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println("Selected Item Changed");
System.out.println(jComboBox.getSelectedIndex());
System.out.println();
}
});
JButton jButton = new JButton();
jButton.setText("click me");
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println("Button was clicked");
System.out.println(jComboBox.getSelectedItem());
}
});
this.getContentPane().add(jComboBox, BorderLayout.NORTH);
this.getContentPane().add(jButton, BorderLayout.SOUTH);
this.setSize(new Dimension(200, 200));
this.setVisible(true);
}
public static void main(String[] args) throws Exception
{
BugJavaGui bug = new BugJavaGui();
}
}
---------- END SOURCE ----------
Release Regression From : 1.4.2
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
|