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

Toolkit.getFontMetrics(Font) crashes JVM under WindowsNT

    XMLWordPrintable

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      1.2fcs
    • CPU:
      x86
    • OS:
      windows_95
    • Verification:
      Verified

      Description



      Name: akC57697 Date: 07/10/98


                                
       The Toolkit.getFontMetrics(Font) crashes JVM under WindowsNT with
       assertion warning
       "Assertion failed: pos <= t->maxPos,
       file ..\..\..\..\src\share\native\sun\awt\font\t2k\t2kstrm.c, line 56"

       java: JDK1.2-Beta4K
       
      The example:
      ------------------------------8-<--------------------------------------------
      import java.awt.*;

      class Test {
        public static void main(String[] argv) {
           Toolkit t = Toolkit.getDefaultToolkit();

           Font fonts [] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();

           for (int ff=0;ff<fonts.length;ff++) { // Try all fonts
            System.out.println("Invoke getFontMetrics for :"+ff+"-th font "+fonts[ff]+":");
            System.out.println( t.getFontMetrics(fonts[ff]));
           }
         System.out.println("OKAY");
          
         }
      }
      ---------------------------->-8----------------------------------------------
      WindowsNT 4.0:

      E:\kuzm\tmp>g:\JDK1.2-Beta4K\windows\bin\java Test
      Invoke getFontMetrics for :0-th font java.awt.Font[family=Alefbet,name=Alefbet,s
      tyle=plain,size=1]:
      sun.awt.font.FontDesignMetrics[font=java.awt.Font[family=Alefbet,name=Alefbet,st
      yle=plain,size=1]ascent=1, descent=1, height=2]
      Invoke getFontMetrics for :1-th font java.awt.Font[family=Algerian,name=Algerian
      ,style=plain,size=1]:
      Assertion failed: pos <= t->maxPos, file ..\..\..\..\src\share\native\sun\awt\fo
      nt\t2k\t2kstrm.c, line 56

      abnormal program termination


      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            dfeldsunw Dmitry Feld (Inactive)
            Reporter:
            akuzminorcl Alexander Kuzmin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: