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

java.awt.Font.getFamily() leads to JVM crash on Linux on JDK7 for "custom" fonts

    XMLWordPrintable

    Details

    • Subcomponent:
      2d
    • Introduced In Build:
      b74
    • Introduced In Version:
      7
    • Resolved In Build:
      b128
    • CPU:
      generic, x86, sparc
    • OS:
      generic, linux, linux_ubuntu, open_solaris, solaris, solaris_1, solaris_10
    • Verification:
      Verified

      Description

      Platform: Linux (Ubuntu 10.04)
      FAILS(CRASHES): JDK 7 (reproduced with b95, exact build where problem was introduced is unknown)
      PASSES: JDK 6

      The following code leads to JVM crash:
      --------------------------------------
      import java.awt.*;
      import java.awt.font.*;
      import java.awt.geom.*;


      public class FontTest {
          public static void main(String[] args) {
              new Font("CustomFontName", java.awt.Font.BOLD, 12).getFamily();

              // the following will also lead to JVM crash
              new Font("CustomFontName", Font.BOLD, 12).createGlyphVector(new FontRenderContext(new AffineTransform(), false, false), "abcd");

              new TextLayout("012", new Font("Helvetica", Font.PLAIN, 12), new FontRenderContext(new AffineTransform(), true, true));

          }
      }


      ------------------------------------------------------------------------
      # To suppress the following error report, specify this argument
      # after -XX: or in .hotspotrc: SuppressErrorAt=/jniHandles.hpp:189
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/BUILD_AREA/jdk7/hotspot/src/share/vm/runtime/jniHandles.hpp:189), pid=1552, tid=3063851888
      # assert(handle != NULL) failed: JNI handle should not be null
      #
      # JRE version: 7.0-b95
      # Java VM: Java HotSpot(TM) Client VM (19.0-b01-fastdebug mixed mode linux-x86 )
      # An error report file with more information is saved as:
      # /home/sycob/dev/playground/hs_err_pid1552.log
      #
      # If you would like to submit a bug report, please visit:
      # http://java.sun.com/webapps/bugreport/crash.jsp
      #
      Current thread is 3063851888
      Dumping core ...
      ------------------------------------------------------------------------
      Initally failure occured with Motif L&F
      -Dswing.defaultlaf=com.sun.java.swing.plaf.motif.MotifLookAndFeel

      And looked the following way

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00dabc27, pid=17279, tid=74648464
      #
      # JRE version: 7.0-b90
      # Java VM: Java HotSpot(TM) Client VM (18.0-b03 mixed mode linux-x86 )
      # Problematic frame:
      # V [libjvm.so+0x252c27]
      #
      # An error report file with more information is saved as:
      # /net/jessika/export/jck/qa-results/jck/7/ea/b35/results/promoted/hs_err_pid17279.log
      #
      # If you would like to submit a bug report, please visit:
      # http://java.sun.com/webapps/bugreport/crash.jsp
      #


      Was easily reproduced without Motif L&F on Ubuntu 10.04 within VirtualBox
      bigapps/runThese/stability fails with same crash

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              prr Philip Race
              Reporter:
              dbessono Dmitry Bessonov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: