Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6986130

ClassCastException in Font2D getStrike call

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 6u21
    • client-libs
    • 2d
    • x86
    • windows_7

      FULL PRODUCT VERSION :
      java version "1.6.0_21"
      Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
      Java HotSpot(TM) 64-Bit Server VM (build 17.0-b17, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Windows 7

      A DESCRIPTION OF THE PROBLEM :
      In a stack trace that was retrieved by our support department,
      sun.java2d.SunGraphics2D.checkFontInfo called
      sun.font.Font2D.getStrike(Font,AffineTransform,AffineTransform,int,int)
      This calls
      sun.font.Font2D.getStrike(FontStrikeDesc,boolean).
      This is the method where the ClassCastException with reference to SoftReference happened. There are 3 explicit casts in this method, 2 dealing with References.

      Without line numbers, it is my strong belief that the problem happened at

      ((StrikeCache.DisposableStrike)reference).getDisposer().dispose();
      I think the following bug is related.
      http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6926209


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Unknown

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Text showing on buttons.
      ACTUAL -
      The problem is that the text would not show and could not proceed in the application.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      java.lang.ClassCastException: java.lang.ref.SoftReference
      at sun.font.Font2D.getStrike(Unknown Source)
      at sun.font.Font2D.getStrike(Unknown Source)
      at sun.java2d.SunGraphics2D.checkFontInfo(Unknown Source)
      at sun.java2d.SunGraphics2D.getFontInfo(Unknown Source)
      at sun.java2d.pipe.GlyphListPipe.drawString(Unknown Source)
      at sun.java2d.pipe.ValidatePipe.drawString(Unknown Source)
      at sun.java2d.SunGraphics2D.drawString(Unknown Source)
      at com.sun.java.swing.SwingUtilities2.drawString(Unknown Source)
      at com.sun.java.swing.SwingUtilities2.drawStringUnderlineCharAt(Unknown Source)
      at javax.swing.plaf.basic.BasicLabelUI.paintEnabledText(Unknown Source)
      at javax.swing.plaf.basic.BasicLabelUI.paint(Unknown Source)
      at javax.swing.plaf.ComponentUI.update(Unknown Source)
      at javax.swing.JComponent.paintComponent(Unknown Source)
      at javax.swing.JComponent.paint(Unknown Source)

      REPRODUCIBILITY :
      This bug can be reproduced rarely.

      CUSTOMER SUBMITTED WORKAROUND :
      Restarted application

            prr Philip Race
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: