JDK-4987560 : demo/jfc/Font2DTest - throws ClassCastException
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2004-02-03
  • Updated: 2004-02-03
  • Resolved: 2004-02-03
Related Reports
Duplicate :  
Description

Name: aaR10208			Date: 02/03/2004


Filed By    : J2SE-SQA [###@###.###
JDK         : jdk1.5.0-beta-b32c
Platform[s] : RH Linux 9


How to reproduce:
=================
1. Start Font2DTest
2. Choose "File" -> "Save as jpeg"
You'll see the following exception:

java.lang.ClassCastException: sun.awt.image.DataBufferNative
         at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:405)
         at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:228)
         at FontPanel$FontCanvas.writeJPEG(FontPanel.java:1078)
         at FontPanel.doSaveJPEG(FontPanel.java:391)
         at Font2DTest.actionPerformed(Font2DTest.java:779)


======================================================================

Comments
EVALUATION Name: rpR10076 Date: 02/03/2004 Looks like a 2D bug. ###@###.### ====================================================================== Closing as duplicate of 4908153.
11-06-2004

WORK AROUND Name: abR10136 Date: 02/03/2004 It looks like the disabling usage of accelerated X11 images helps. (i.e. -Dsun.java2d.pmoffscreen=false) ======================================================================
11-06-2004