-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.2.0
-
sparc
-
solaris_2.6
Name: akC57697 Date: 09/08/98
The java.awt.Toolkit.getFontMetrics(Font f) throws SEGVIOL in
java full version "JDK-1.2fcs-I" under Solaris 2.6.
The example:
--------------------------------8-<---------------------------
import javax.swing.SwingUtilities;
import javax.swing.JFrame;
import java.awt.*;
class Test {
public static void main(String[] argv) {
JFrame f = new JFrame();
FontMetrics fm = null;
int result = 0;
int j,c;
Font fonts [] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
if (fonts==null || fonts.length==0)
System.exit(1);
for (int ff=0;ff<fonts.length;ff++) { // Try all fonts
System.out.println(fonts[ff]+"..");
fm = Toolkit.getDefaultToolkit().getFontMetrics(fonts[ff]);
}
f.dispose();
System.out.println("OKAY");
System.exit(0);
}
}
--------------------------------8-<---------------------------
Output:
java Test
Warning:
Cannot allocate colormap entry for default background
java.awt.Font[family=Arial,name=,style=plain,size=1]..
.....
java.awt.Font[family=Times New Roman Tur,name=Times New Roman Tur Italic,style=plain,size=1]..
java.awt.Font[family=Times,name=Times Roman,style=plain,size=1]..
java.awt.Font[family=Utopia,name=Utopia Bold,style=plain,size=1]..
java.awt.Font[family=Utopia,name=Utopia Bold Italic,style=plain,size=1]..
java.awt.Font[family=Utopia,name=Utopia Italic,style=plain,size=1]..
java.awt.Font[family=,name=Utopia Regular,style=plain,size=1]..
Assertion failed: fUseCount > 0, file ../../../../src/share/native/sun/awt/font/fontmanager/fontobjects/fontObject.cpp, line 306
SIGABRT 6* abort (generated by abort(3) routine)
si_signo [6]: SIGABRT 6* abort (generated by abort(3) routine)
si_errno [0]: Error 0
si_code [0]: SI_USER [pid: 11387, uid: 302]
stackpointer=efffce3c
Full thread dump Classic VM (JDK-1.2fcs-I, green threads):
"AWT-Motif" (TID:0xebcc2138, sys_thread_t:0x31a178, state:R) prio=5
at sun.awt.motif.MToolkit.run(Native Method)
at java.lang.Thread.run(Compiled Code)
"SunToolkit.PostEventQueue-0" (TID:0xebcc2040, sys_thread_t:0x1c0dd8, state:CW) prio=5
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Compiled Code)
at sun.awt.PostEventQueue.run(Compiled Code)
"AWT-EventQueue-0" (TID:0xebcc2438, sys_thread_t:0x1c0ca0, state:CW) prio=6
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Compiled Code)
at java.awt.EventQueue.getNextEvent(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)
"Finalizer" (TID:0xebc98320, sys_thread_t:0x686d0, state:CW) prio=8
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(Compiled Code)
at java.lang.ref.ReferenceQueue.remove(Compiled Code)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:174)
"Reference Handler" (TID:0xebc983b0, sys_thread_t:0x64220, state:CW) prio=10
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Compiled Code)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:209)
"Signal dispatcher" (TID:0xebc983e0, sys_thread_t:0x5d380, state:CW) prio=5
"main" (TID:0xebc981e0, sys_thread_t:0x288a0, state:R) prio=5
at sun.awt.font.NativeFontWrapper.getFontMetrics(Native Method)
at sun.awt.SunToolkit.getFontMetrics(Compiled Code)
at sun.awt.motif.MToolkit.getFontMetrics(Compiled Code)
at Test.main(Compiled Code)
Monitor Cache Dump:
java.awt.EventQueue@EBCC23E8/EBDFEAF8: <unowned>
Waiting to be notified:
"AWT-EventQueue-0" (0x1c0ca0)
java.lang.ref.ReferenceQueue$Lock@EBC98338/EBCCDD68: <unowned>
Waiting to be notified:
"Finalizer" (0x686d0)
sun.awt.PostEventQueue@EBCC2040/EBDFEF80: <unowned>
Waiting to be notified:
"SunToolkit.PostEventQueue-0" (0x1c0dd8)
java.lang.ref.Reference$Lock@EBC983C0/EBCCD8A8: <unowned>
Waiting to be notified:
"Reference Handler" (0x64220)
java.lang.Class@EBCB4978/EBD5E770: owner "main" (0x288a0) 1 entry
Registered Monitor Dump:
PCMap lock: <unowned>
utf8 hash table: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class linking lock: <unowned>
System class loader lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Monitor cache lock: owner "main" (0x288a0) 1 entry
Dynamic loading lock: <unowned>
Monitor IO lock: <unowned>
User signal monitor: <unowned>
Waiting to be notified:
"Signal dispatcher" (0x5d380)
Child death monitor: <unowned>
I/O monitor: owner "AWT-Motif" (0x31a178) 1 entry
Alarm monitor: <unowned>
Waiting to be notified:
<unknown thread> (0x2b778)
Thread queue lock: owner "main" (0x288a0) 1 entry
Monitor registry: owner "main" (0x288a0) 1 entry
SIGABRT 6* abort (generated by abort(3) routine)
si_signo [6]: SIGABRT 6* abort (generated by abort(3) routine)
si_errno [0]: Error 0
si_code [0]: SI_USER [pid: 11387, uid: 302]
stackpointer=efffce3c
Full thread dump Classic VM (JDK-1.2fcs-I, green threads):
"AWT-Motif" (TID:0xebcc2138, sys_thread_t:0x31a178, state:R) prio=5
at sun.awt.motif.MToolkit.run(Native Method)
at java.lang.Thread.run(Compiled Code)
"SunToolkit.PostEventQueue-0" (TID:0xebcc2040, sys_thread_t:0x1c0dd8, state:CW) prio=5
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Compiled Code)
at sun.awt.PostEventQueue.run(Compiled Code)
"AWT-EventQueue-0" (TID:0xebcc2438, sys_thread_t:0x1c0ca0, state:CW) prio=6
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Compiled Code)
at java.awt.EventQueue.getNextEvent(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)
"Finalizer" (TID:0xebc98320, sys_thread_t:0x686d0, state:CW) prio=8
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(Compiled Code)
at java.lang.ref.ReferenceQueue.remove(Compiled Code)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:174)
"Reference Handler" (TID:0xebc983b0, sys_thread_t:0x64220, state:CW) prio=10
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Compiled Code)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:209)
"Signal dispatcher" (TID:0xebc983e0, sys_thread_t:0x5d380, state:CW) prio=5
"main" (TID:0xebc981e0, sys_thread_t:0x288a0, state:R) prio=5
at sun.awt.font.NativeFontWrapper.getFontMetrics(Native Method)
at sun.awt.SunToolkit.getFontMetrics(Compiled Code)
at sun.awt.motif.MToolkit.getFontMetrics(Compiled Code)
at Test.main(Compiled Code)
Monitor Cache Dump:
java.awt.EventQueue@EBCC23E8/EBDFEAF8: <unowned>
Waiting to be notified:
"AWT-EventQueue-0" (0x1c0ca0)
java.lang.ref.ReferenceQueue$Lock@EBC98338/EBCCDD68: <unowned>
Waiting to be notified:
"Finalizer" (0x686d0)
sun.awt.PostEventQueue@EBCC2040/EBDFEF80: <unowned>
Waiting to be notified:
"SunToolkit.PostEventQueue-0" (0x1c0dd8)
java.lang.ref.Reference$Lock@EBC983C0/EBCCD8A8: <unowned>
Waiting to be notified:
"Reference Handler" (0x64220)
java.lang.Class@EBCB4978/EBD5E770: owner "main" (0x288a0) 1 entry
Registered Monitor Dump:
PCMap lock: <unowned>
utf8 hash table: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class linking lock: <unowned>
System class loader lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Monitor cache lock: owner "main" (0x288a0) 1 entry
Dynamic loading lock: <unowned>
Monitor IO lock: <unowned>
User signal monitor: <unowned>
Waiting to be notified:
"Signal dispatcher" (0x5d380)
Child death monitor: <unowned>
I/O monitor: owner "AWT-Motif" (0x31a178) 1 entry
Alarm monitor: <unowned>
Waiting to be notified:
<unknown thread> (0x2b778)
Thread queue lock: owner "main" (0x288a0) 1 entry
Monitor registry: owner "main" (0x288a0) 1 entry
Abort (core dumped)
======================================================================
- duplicates
-
JDK-4171597 launching Java2Demo without having to preset JAVA_FONTS gets a segv
-
- Closed
-
- relates to
-
JDK-4337142 JVM SEGV when multiple threads call TextLayout.getOutLine()
-
- Closed
-
-
JDK-4337161 JVM SEGV when multiple threads call TextLayout.getOutLine()
-
- Closed
-