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

NPE @ sun.awt.font.AdvanceCache.get(AdvanceCache.java:135)

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      b01
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_10

      Description

      We have seen our NETSMART client run into paint issues (one
      particular component becoming unusable - requiring a restart of the
      client) due to a NullPointerException thrown from java internals.
      This problem has recently been seen by our test team atleast twice and
      they have raised fix priority on this.

      java.lang.NullPointerException
              at sun.awt.font.AdvanceCache.get(AdvanceCache.java:135)
              at java.awt.font.TextLayout$OptInfo.getAdvance(TextLayout.java:248)
              at java.awt.font.TextLayout$OptInfo.getLogicalBounds(TextLayout.java:261)
              at sun.awt.font.Decoration$DecorationImpl.drawTextAndEmbellishments(Decoration.java:243)
              at sun.awt.font.Decoration$DecorationImpl.drawTextAndDecorations(Decoration.java:273)
              at java.awt.font.TextLayout$OptInfo.draw(TextLayout.java:298)
              at java.awt.font.TextLayout.draw(TextLayout.java:2660)
              at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2595)
      In a related problem on 1.4.2 when the cache is flushed, the variable 'i' is not reset
      but can still be used as described in incident 709901

      java.lang.ArrayIndexOutOfBoundsException: 1321
              at sun.awt.font.AdvanceCache.get(AdvanceCache.java:168)
              at java.awt.font.TextLayout
      $OptInfo.handleGetVisualBounds(Unknown Source)
              at sun.awt.font.Decoration.getVisualBounds(Decoration.java:105)
              at java.awt.font.TextLayout$OptInfo.getVisualBounds(Unknown
      Source)
              at java.awt.font.TextLayout.getBounds(Unknown Source)
              ...

      the submitter pointed out that
      cacheNum = 0;
      should become
      i = cacheNum = 0;

        Attachments

          Activity

            People

            • Assignee:
              dougfelt Doug Felt
              Reporter:
              gnagasunsunw Gopinath Nagasundara (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: