Details
-
Bug
-
Resolution: Fixed
-
P3
-
1.4.2, 5.0, 5.0u2, 5.0u12, 5.0u6, 6u1
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2147426 | 5.0u12 | Praveen G | P3 | Resolved | Fixed | b02 |
Description
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.
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.
Attachments
Issue Links
- backported by
-
JDK-2147426 REGRESSION: GUI fails to paint text with large heap size setting
-
- Resolved
-
- duplicates
-
JDK-6505072 Memmory,Handles and GDI Objects leaks while loading ArcTest Demo.
-
- Closed
-
-
JDK-6357413 loading ddraw.dll is not handled correctly
-
- Closed
-
-
JDK-2148604 Memmory,Handles and GDI Objects leaks while loading ArcTest Demo.
-
- Closed
-
- relates to
-
JDK-5017808 Memory allocation order change causes DLLs to load out of place.
-
- Closed
-
-
JDK-6542419 SharedMemoryPixmapsTest.sh failed on 5.0u12b02 but passed on previous one
-
- Closed
-
(1 relates to)