-
Bug
-
Resolution: Fixed
-
P4
-
8u60
-
b100
-
x86_64
-
linux_ubuntu
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8168187 | 8u152 | Alexey Ivanov | P4 | Resolved | Fixed | b01 |
JDK-8162649 | 8u112 | Alexey Ivanov | P4 | Resolved | Fixed | b06 |
JDK-8161201 | 8u111 | Alexey Ivanov | P4 | Resolved | Fixed | b04 |
JDK-8162273 | emb-8u111 | Alexey Ivanov | P4 | Resolved | Fixed | b04 |
JDK-8161364 | 7u131 | Alexey Ivanov | P4 | Resolved | Fixed | b01 |
JDK-8161629 | 7u121 | Alexey Ivanov | P4 | Resolved | Fixed | b05 |
JDK-8172611 | openjdk7u | Alexey Ivanov | P4 | Resolved | Fixed | master |
JDK-8161485 | 6u141 | Alexey Ivanov | P4 | Resolved | Fixed | b01 |
JDK-8161502 | 6u131 | Alexey Ivanov | P4 | Resolved | Fixed | b05 |
1.8.0_60
ADDITIONAL OS VERSION INFORMATION :
Linux augusta 3.19.0-26-generic #28-Ubuntu SMP Tue Aug 11 14:16:32 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
NVIDIA Corporation GK104 [GeForce GTX 670]
Nvidia binary driver: nvidia-355
A DESCRIPTION OF THE PROBLEM :
When creating a VolatileImage with size 0/0 (which does not throw an exception), there are surprising side effect:
All texts drawn on a graphics context do not longer show up.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- Create a VolatileImage with size 0,0
- Draw a String on a graphics context (g2d.drawString)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
IllegalArgumentException(?)
ACTUAL -
No exception is thrown.
Strings are no longer visible when using Graphics2D#drawString
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
System.out.println("Java Version: " + System.getProperty("java.version"));
GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice device = env.getDefaultScreenDevice();
//if size is set to 0 the string is not visible in Linux (with nvidia binary driver)
int size = 0;
VolatileImage volatileImage = device.getDefaultConfiguration().createCompatibleVolatileImage(size, size); //This image is never used
JFrame frame = new JFrame();
frame.getContentPane().add(new JComponent() {
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
g.setColor(Color.RED);
((Graphics2D) g).drawString("Hello World", 10, 20);
}
});
frame.setSize(800, 600);
frame.setVisible(true);
---------- END SOURCE ----------
- backported by
-
JDK-8161201 Creating a VolatileImage with size 0,0 results in no longer working g2d.drawString
- Resolved
-
JDK-8161364 Creating a VolatileImage with size 0,0 results in no longer working g2d.drawString
- Resolved
-
JDK-8161485 Creating a VolatileImage with size 0,0 results in no longer working g2d.drawString
- Resolved
-
JDK-8161502 Creating a VolatileImage with size 0,0 results in no longer working g2d.drawString
- Resolved
-
JDK-8161629 Creating a VolatileImage with size 0,0 results in no longer working g2d.drawString
- Resolved
-
JDK-8162273 Creating a VolatileImage with size 0,0 results in no longer working g2d.drawString
- Resolved
-
JDK-8162649 Creating a VolatileImage with size 0,0 results in no longer working g2d.drawString
- Resolved
-
JDK-8168187 Creating a VolatileImage with size 0,0 results in no longer working g2d.drawString
- Resolved
-
JDK-8172611 Creating a VolatileImage with size 0,0 results in no longer working g2d.drawString
- Resolved
- relates to
-
JDK-8147077 IllegalArgumentException thrown by api/java_awt/Component/FlipBufferStrategy/indexTGF_General
- Resolved
-
JDK-8148127 IllegalArgumentException thrown by JCK test api/java_awt/Component/FlipBufferStrategy/indexTGF_General in opengl pipeline
- Resolved
-
JDK-8162836 java.lang.IllegalArgumentException is thrown by api/java_awt/Component/FlipBufferStrategy/indexTGF.html\#General
- Closed