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

TextLayout throws Exception with a non-invertible transform

    XMLWordPrintable

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      b21

      Description

      The following program :
      import java.awt.Font;
      import java.awt.font.FontRenderContext;
      import java.awt.font.TextLayout;
      import java.awt.geom.AffineTransform;

      public class TextLayoutNonInvertibleTransform {

          public static void main(String[] args){
              AffineTransform at = new AffineTransform(1f, 0.0f, -15, 0.0, -1, -30);
              FontRenderContext frc = new FontRenderContext(at, false, false);
              Font font = new Font(Font.DIALOG, Font.PLAIN, 12);
              TextLayout tl = new TextLayout("A", font, frc);
              tl.getOutline(new AffineTransform());
          }
      }

      java !$
      ~/jdk-13/Contents/Home/bin/java TextLayoutNonInvertibleTransform
      Exception in thread "main" java.lang.InternalError: java.awt.geom.NoninvertibleTransformException: Determinant is 0.0
      at java.desktop/sun.font.GlyphLayout$SDCache.<init>(GlyphLayout.java:237)
      at java.desktop/sun.font.GlyphLayout$SDCache.get(GlyphLayout.java:337)
      at java.desktop/sun.font.GlyphLayout.layout(GlyphLayout.java:384)
      at java.desktop/sun.font.ExtendedTextSourceLabel.createGV(ExtendedTextSourceLabel.java:329)
      at java.desktop/sun.font.ExtendedTextSourceLabel.getGV(ExtendedTextSourceLabel.java:315)
      at java.desktop/sun.font.ExtendedTextSourceLabel.createLogicalBounds(ExtendedTextSourceLabel.java:225)
      at java.desktop/sun.font.ExtendedTextSourceLabel.getAdvance(ExtendedTextSourceLabel.java:134)
      at java.desktop/java.awt.font.TextLine.init(TextLine.java:281)
      at java.desktop/java.awt.font.TextLine.<init>(TextLine.java:129)
      at java.desktop/java.awt.font.TextLine.fastCreateTextLine(TextLine.java:978)
      at java.desktop/java.awt.font.TextLayout.fastInit(TextLayout.java:611)
      at java.desktop/java.awt.font.TextLayout.<init>(TextLayout.java:392)
      at TextLayoutNonInvertibleTransform.main(TextLayoutNonInvertibleTransform.java:12)
      Caused by: java.awt.geom.NoninvertibleTransformException: Determinant is 0.0
      at java.desktop/java.awt.geom.AffineTransform.createInverse(AffineTransform.java:2697)
      at java.desktop/sun.font.GlyphLayout$SDCache.<init>(GlyphLayout.java:234)
      ... 12 more

      This bug has been there forever.

        Attachments

          Activity

            People

            Assignee:
            prr Philip Race
            Reporter:
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: