Graphics2D drawString generate exception on AttributedString.getIterator().

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P2
    • None
    • Affects Version/s: 1.2.0
    • Component/s: client-libs
    • 2d
    • sparc
    • solaris_2.6

      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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: