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

native font code makes JNI method invocation in scope of GetStringCritical

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.1
    • 1.4.0
    • client-libs
    • None
    • 2d
    • hopper
    • sparc
    • solaris_8, solaris_9

      On merlin (jdk1.4) beta 3 on Solaris native code in the font initialisation
      logic is violating the JNI spec.
      Executing apps such as demo/jfc/Font2DTest while passing the non-standard
      -Xcheck:jni option shows that the JRE is making a Java upcall in the scope
      of a GetStringCritical :-

      ---------------------------
      FATAL ERROR in native method: Calling other JNI functions in the scope
      of Get/ReleasePrimitiveArrayCritical or Get/ReleaseStringCritical
              at sun.awt.font.NativeFontWrapper.registerFonts(Native Method)
              - locked <f621b1c0> (a java.lang.Class)
              at
      sun.java2d.SunGraphicsEnvironment.addPathFonts(SunGraphicsEnvironment.java:712)
              at
      sun.java2d.SunGraphicsEnvironment.registerFonts(SunGraphicsEnvironment.java:563)
              at
      sun.java2d.SunGraphicsEnvironment.access$000(SunGraphicsEnvironment.java:60)
              at
      sun.java2d.SunGraphicsEnvironment$2.run(SunGraphicsEnvironment.java:213)
              at java.security.AccessController.doPrivileged(Native Method)
              at
      sun.java2d.SunGraphicsEnvironment.loadFonts(SunGraphicsEnvironment.java:207)
              - locked <f2807d68> (a sun.awt.X11GraphicsEnvironment)
              at
      sun.java2d.SunGraphicsEnvironment.mapFamilyName(SunGraphicsEnvironment.java:405)
              at java.awt.Font.initializeFont(Font.java:276)
              at java.awt.Font.<init>(Font.java:308)


      ---------------------------

      This doesn't cause a problem in normal operation but can make it more
      difficult to identify similar JNI errors which may occur elsewhere as this one
      prevents others being reached whilst running with the -Xcheck:jni option.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: