-
Bug
-
Resolution: Duplicate
-
P1
-
None
-
1.4.0
-
sparc
-
solaris_9
###@###.### 2001-10-15
# java -fullversion
java full version "1.4.0-beta3-b82"
# uname -a
SunOS spawn 5.9 s81_48 sun4u sparc SUNW,Ultra-60
#
On executing the following sample code, the program hangs when invoking JEditorPane.setContentType("text/html"). The Thread trace, below, indicates a problem in the NativeFontWrapper class.
//Begin MyTest.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
public class MyTest extends JDialog {
JEditorPane _pane;
JDialog dg;
public MyTest() {
System.out.println("new JDialog...");
dg = new JDialog();
System.out.println("new JEditorPane..");
_pane = new JEditorPane();
_pane.setContentType( "text/html" );
System.out.println("exec...");
dg.getContentPane().add(_pane);
dg.show();
}
public static void main(String[] args) {
System.out.println("main()");
MyTest t = new MyTest();
System.out.println("end main()");
}
}
//End MyTest.java
Output from SIGQUIT:
"main" prio=5 tid=0x2b900 nid=0x1 runnable [ffbfd000..ffbfed9c]
at sun.awt.font.NativeFontWrapper.registerFonts(Native Method)
- locked <f6d8ef00> (a java.lang.Class)
at sun.java2d.SunGraphicsEnvironment.addPathFonts(SunGraphicsEnvironment.java:712)
at sun.java2d.SunGraphicsEnvironment.registerFonts(SunGraphicsEnvironment.java:566)
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 <f2e101b8> (a sun.awt.X11GraphicsEnvironment)
at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:319)
at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:366)
at javax.swing.text.html.CSS.getValidFontNameMapping(CSS.java:913)
- locked <f2d2e160> (a java.lang.Object)
at javax.swing.text.html.CSS$FontFamily.parseCssValue(CSS.java:1861)
at javax.swing.text.html.CSS.getInternalCSSValue(CSS.java:532)
at javax.swing.text.html.CSS.addInternalCSSValue(CSS.java:517)
at javax.swing.text.html.StyleSheet.addCSSAttribute(StyleSheet.java:467)
at javax.swing.text.html.StyleSheet$CssParser.handleValue(StyleSheet.java:3086)
at javax.swing.text.html.CSSParser.parseDeclaration(CSSParser.java:344)
at javax.swing.text.html.CSSParser.parseDeclarationBlock(CSSParser.java:311)
at javax.swing.text.html.CSSParser.parseRuleSet(CSSParser.java:258)
at javax.swing.text.html.CSSParser.getNextStatement(CSSParser.java:164)
at javax.swing.text.html.CSSParser.parse(CSSParser.java:139)
at javax.swing.text.html.StyleSheet$CssParser.parse(StyleSheet.java:3008)
at javax.swing.text.html.StyleSheet.loadRules(StyleSheet.java:306)
at javax.swing.text.html.HTMLEditorKit.getStyleSheet(HTMLEditorKit.java:361)
at javax.swing.text.html.HTMLEditorKit.createDefaultDocument(HTMLEditorKit.java:188)
at javax.swing.JEditorPane.setEditorKit(JEditorPane.java:943)
at javax.swing.JEditorPane.setContentType(JEditorPane.java:869)
at MyTest.<init>(MyTest.java:21)
at MyTest.main(MyTest.java:33)
- relates to
-
JDK-4482430 Unexpected exception from NativeFontWrapper.registerFonts(Native Method)
- Resolved