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

Graphics2D drawString generate exception on AttributedString.getIterator().

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2
    • None
    • 1.2.0
    • client-libs
    • 2d
    • sparc
    • solaris_2.6

    Description

      JDK Version: 1.2fcs-K
      Locale: C, zh
      OS: Solaris 2.6

      Graphics2D's drawString() will generate nullpointer exception
       when using AttributedString.getIterator() as arguments, the
      AttributedString contain non-ascii characters.
      See attachment program to reproduce it.

      Exception occurred during event dispatching:
      java.lang.NullPointerException
              at java.awt.geom.AffineTransform.preConcatenate(Compiled Code)
              at sun.awt.font.StandardGlyphVector.getGlyphTX(Compiled Code)
              at sun.awt.font.StandardGlyphVector.<init>(Compiled Code)
              at java.awt.Font.createGlyphVector(Compiled Code)
              at sun.awt.font.ExtendedTextSourceLabel.createGV(Compiled Code)
              at sun.awt.font.ExtendedTextSourceLabel.getGV(Compiled Code)
              at sun.awt.font.ExtendedTextSourceLabel.draw(Compiled Code)
              at sun.awt.font.ExtendedTextLabelComponent.handleDraw(Compiled Code)
              at sun.awt.font.TextLineComponent.drawTextAndEmbellishments(Compiled Code)
              at sun.awt.font.TextLineComponent.draw(Compiled Code)
              at java.awt.font.TextLine.draw(Compiled Code)
              at java.awt.font.TextLayout.draw(Compiled Code)
              at sun.java2d.SunGraphics2D.drawString(Compiled Code)
              at TextDrawer.paint(Compiled Code)
              at sun.awt.motif.MComponentPeer.handleEvent(Compiled Code)
              at java.awt.Component.dispatchEventImpl(Compiled Code)
              at java.awt.Component.dispatchEvent(Compiled Code)
              at java.awt.EventQueue.dispatchEvent(Compiled Code)
              at java.awt.EventDispatchThread.run(Compiled Code)

      jim.hu@prc 1998-09-23

      Attachments

        Issue Links

          Activity

            People

              pcharltosunw Paul Charlton (Inactive)
              jhusunw Jim Hu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: