Re: More on strange font loading problem
Re: More on strange font loading problem
- Subject: Re: More on strange font loading problem
- From: Joshua Smith <email@hidden>
- Date: Mon, 14 Dec 2009 13:32:52 -0500
- Delivered-to: email@hidden
- Delivered-to: email@hidden
I tried to reproduce this in a test applet, and was unable to.
I think this is a case of calling an AWT function outside the AWT event thread. I've fixed the real applet to do the createFont call from the AWT thread, and now it seems to be stable and robust.
Perhaps you should throw an exception when createFont is called from a non-AWT thread?
-Joshua
On Dec 11, 2009, at 8:48 PM, Mike Swingler wrote:
> On Dec 11, 2009, at 12:54 PM, Joshua Smith wrote:
>
>> For the first time, instead of getting those boxes when I load a font, I got a crash. Crash reporter sent it to apple.
>>
>> To reiterate my earlier report, this font is fine, and loads fine most times. But sometimes after several sessions, it turns into boxes. Restarting the browser invariably fixes the problem.
>
> This looks like a crash in the native Mac OS X font libraries underneath Java. Please file this crash log along with a URL to the applet that we can use to reproduce this problem at <http://bugreporter.apple.com>.
>
> Thanks,
> Mike Swingler
> Java Runtime Engineer
> Apple Inc.
>
>> Process: Safari [23078]
>> Path: /Applications/Safari.app/Contents/MacOS/Safari
>> Identifier: com.apple.Safari
>> Version: 4.0.4 (6531.21.10)
>> Build Info: WebBrowser-65312110~2
>> Code Type: X86-64 (Native)
>> Parent Process: launchd [245]
>>
>> Date/Time: 2009-12-11 15:49:41.735 -0500
>> OS Version: Mac OS X 10.6.2 (10C540)
>> Report Version: 6
>>
>> Interval Since Last Report: 221254 sec
>> Crashes Since Last Report: 1
>> Per-App Interval Since Last Report: 217313 sec
>> Per-App Crashes Since Last Report: 1
>> Anonymous UUID: DDD05BA3-374E-43C8-AA12-304B4CAE2B49
>>
>> Exception Type: EXC_BAD_ACCESS (SIGBUS)
>> Exception Codes: KERN_PROTECTION_FAILURE at 0x00007fff70398930
>> Crashed Thread: 33 Java: Meson Data Loader
>>
>> Application Specific Information:
>>
>> Java information:
>> Exception type: Bus Error (0xa) at pc=0x00007fff70398930
>>
>> Java VM: Java HotSpot(TM) 64-Bit Server VM (14.3-b01-101 mixed mode macosx-amd64)
>>
>> Current thread (0x0000000120d4f000): JavaThread "Meson Data Loader" daemon [_thread_in_native, id=1263210496, stack(0x000000014b3b1000,0x000000014b4b1000)]
>> Stack: [0x000000014b3b1000,0x000000014b4b1000]
>> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
>> j sun.font.FontManager.loadFileFont(Ljava/lang/String;)Lsun/font/Font2D;+0
>> j sun.font.FontManager.createFont2D(Ljava/io/File;IZLsun/font/CreatedFontTracker;)Lsun/font/Font2D;+46
>> j java.awt.Font.<init>(Ljava/io/File;IZLsun/font/CreatedFontTracker;)V+25
>> j java.awt.Font.createFont(ILjava/io/InputStream;)Ljava/awt/Font;+201
>> v ~StubRoutines::call_stub
>> j sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0
>> j sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
>> j sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
>> j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161
>> j com.kaon.meson.raster.RasterGluon.a(Ljava/lang/String;Lcom/kaon/meson/FastVector;)V+376
>> j com.kaon.meson.raster.RasterGluon.builtIn(Lcom/kaon/meson/Blackboard;Ljava/lang/String;)Ljava/lang/Object;+487
>> J com.kaon.meson.Blackboard.a(Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;
>> j com.kaon.meson.Blackboard.a(Ljava/lang/Object;Ljava/lang/Class;Z)Ljava/lang/Object;+215
>> J com.kaon.meson.Blackboard.a(Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;
>> J com.kaon.meson.Blackboard.f(Ljava/lang/Object;)Ljava/lang/Object;
>> j com.kaon.meson.Blackboard.a(Ljava/lang/String;Ljava/io/Reader;Z)Ljava/lang/String;+221
>> j com.kaon.meson.Blackboard.load(Ljava/lang/String;Ljava/io/InputStream;)V+13
>> j com.kaon.meson.raster.MesonInputStream.b()Z+891
>> j com.kaon.meson.raster.RasterGluon.a(Ljava/lang/String;)Z+689
>> j com.kaon.meson.raster.RasterGluon.run()V+193
>> j java.lang.Thread.run()V+11
>> v ~StubRoutines::call_stub
>>
>> Java Threads: ( => current thread )
>> 0x000000011c8b5000 JavaThread "Image Fetcher 2" daemon [_thread_blocked, id=1415819264, stack(0x000000015453b000,0x000000015463b000)]
>> 0x000000011ca7a000 JavaThread "Image Fetcher 1" daemon [_thread_blocked, id=1311944704, stack(0x000000014e22b000,0x000000014e32b000)]
>> 0x000000011ca96000 JavaThread "Image Fetcher 0" daemon [_thread_blocked, id=1282256896, stack(0x000000014c5db000,0x000000014c6db000)]
>> 0x000000011ca78000 JavaThread "Meson Applet" daemon [_thread_blocked, id=1265332224, stack(0x000000014b5b7000,0x000000014b6b7000)]
>> 0x0000000120f5b800 JavaThread "Meson Wavelet Decoder" daemon [_thread_blocked, id=1264271360, stack(0x000000014b4b4000,0x000000014b5b4000)]
>> =>0x0000000120d4f000 JavaThread "Meson Data Loader" daemon [_thread_in_native, id=1263210496, stack(0x000000014b3b1000,0x000000014b4b1000)]
>> 0x0000000120bfb800 JavaThread "AWT-EventQueue-3" [_thread_blocked, id=1241796608, stack(0x0000000149f45000,0x000000014a045000)]
>> 0x00000001209ff800 JavaThread "thread applet-com.kaon.meson.MesonApplet" daemon [_thread_blocked, id=1255886848, stack(0x000000014acb5000,0x000000014adb5000)]
>> 0x0000000120a00800 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=1257316352, stack(0x000000014ae12000,0x000000014af12000)]
>> 0x000000011c8df800 JavaThread "TimerQueue" daemon [_thread_blocked, id=1254133760, stack(0x000000014ab09000,0x000000014ac09000)]
>> 0x000000011cace800 JavaThread "ConsoleWriterThread" daemon [_thread_blocked, id=1253072896, stack(0x000000014aa06000,0x000000014ab06000)]
>> 0x000000011cacd800 JavaThread "Timer-0" daemon [_thread_blocked, id=1249275904, stack(0x000000014a667000,0x000000014a767000)]
>> 0x000000011c952000 JavaThread "AWT-EventQueue-1" [_thread_blocked, id=1248215040, stack(0x000000014a564000,0x000000014a664000)]
>> 0x000000012090a800 JavaThread "CacheMemoryCleanUpThread" daemon [_thread_blocked, id=1247154176, stack(0x000000014a461000,0x000000014a561000)]
>> 0x00000001208c8000 JavaThread "traceMsgQueueThread" daemon [_thread_blocked, id=1246093312, stack(0x000000014a35e000,0x000000014a45e000)]
>> 0x0000000120a2d800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=1245032448, stack(0x000000014a25b000,0x000000014a35b000)]
>> 0x000000011c8a0800 JavaThread "AWT-Shutdown" [_thread_blocked, id=1240735744, stack(0x0000000149e42000,0x0000000149f42000)]
>> 0x000000011c8a0000 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1888652256, stack(0x00007fff5f400000,0x00007fff5fc00000)]
>> 0x0000000120817800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1235984384, stack(0x00000001499ba000,0x0000000149aba000)]
>> 0x000000011c89f000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=1234923520, stack(0x00000001498b7000,0x00000001499b7000)]
>> 0x000000011c89e800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=1233862656, stack(0x00000001497b4000,0x00000001498b4000)]
>> 0x0000000120816800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1232801792, stack(0x00000001496b1000,0x00000001497b1000)]
>> 0x0000000120816000 JavaThread "Surrogate Locker Thread (CMS)" daemon [_thread_blocked, id=1231740928, stack(0x00000001495ae000,0x00000001496ae000)]
>> 0x000000011c89d800 JavaThread "Finalizer" daemon [_thread_blocked, id=1230680064, stack(0x00000001494ab000,0x00000001495ab000)]
>> 0x000000011c89d000 JavaThread "Reference Handler" daemon [_thread_blocked, id=544288768, stack(0x0000000120613000,0x0000000120713000)]
>> Other Threads:
>> 0x000000011c896000 VMThread [stack: 0x0000000120510000,0x0000000120610000] [id=543227904]
>> 0x0000000120818000 WatcherThread [stack: 0x0000000149abd000,0x0000000149bbd000] [id=1237045248]
>>
>> VM state:not at safepoint (normal execution)
>> VM Mutex/Monitor currently owned by a thread: None
>>
>> Heap
>> par new generation total 18624K, used 12458K [0x0000000121000000, 0x00000001224c0000, 0x0000000123990000)
>> eden space 16000K, 74% used [0x0000000121000000, 0x0000000121b9eb18, 0x0000000121fa0000)
>> from space 2624K, 21% used [0x0000000122230000, 0x00000001222bc000, 0x00000001224c0000)
>> to space 2624K, 0% used [0x0000000121fa0000, 0x0000000121fa0000, 0x0000000122230000)
>> concurrent mark-sweep generation total 93664K, used 11629K [0x0000000123990000, 0x0000000129508000, 0x0000000141000000)
>> concurrent-mark-sweep perm gen total 29884K, used 17997K [0x0000000141000000, 0x0000000142d2f000, 0x0000000146400000)
>>
>> Virtual Machine Arguments:
>> JVM Args: -DtrustProxy=true -Xverify:remote -Xbootclasspath/a:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Resources/JavaPluginCocoa.bundle/Contents/Resources/Java/deploy.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Resources/JavaPluginCocoa.bundle/Contents/Resources/Java/plugin.jar -XX:-UseSharedSpaces -Djavaplugin.nodotversion=160 -Djavaplugin.version=1.6.0 -Xmx512M -Djavaplugin.maxHeapSize=512M -Djavaplugin.vm.options=-DtrustProxy=true -Xverify:remote -Xbootclasspath/a:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Resources/JavaPluginCocoa.bundle/Contents/Resources/Java/deploy.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Resources/JavaPluginCocoa.bundle/Contents/Resources/Java/plugin.jar -XX:-UseSharedSpaces -Djavaplugin.nodotversion=160 -Djavaplugin.version=1.6.0 -Xmx512M -Djavaplugin.maxHeapSize=512M
>> Java Command: <unknown>
>> Launcher Type: generic
>> Physical Memory: Page Size = 4k, Total = 4096M, Free = 346M
>>
>> ...stuff deleted....
>>
>> Thread 33 Crashed: Java: Meson Data Loader
>> 0 ??? 0x00007fff70398930 vtable for __cxxabiv1::__si_class_type_info + 16
>> 1 libFontParser.dylib 0x00007fff87802658 TnameTable::TnameTable(TSFNTFont const&) + 44
>> 2 libFontParser.dylib 0x00007fff878025a5 TSFNTFont::GetPostscriptName() const + 35
>> 3 libFontParser.dylib 0x00007fff87803b78 TFPFont::TFPFont(TFont const*, __CFString const*) + 134
>> 4 libFontParser.dylib 0x00007fff878009ac FPFontCreateFontsWithPath + 326
>> 5 libCGXType.A.dylib 0x00007fff8563ce1c create_private_data_with_path + 22
>> 6 com.apple.CoreGraphics 0x00007fff87c5169e CGFontCreateFontsWithPath + 51
>> 7 com.apple.CoreGraphics 0x00007fff87c512ff CGFontCreateFontsWithURL + 433
>> 8 libFontRegistry.dylib 0x00007fff841768b6 CreateFontsFromURL(__CFURL const*) + 24
>> 9 libFontRegistry.dylib 0x00007fff84176beb TLocalFontRegistryImp::RegisterFont(__CFURL const*, __CFDictionary const*, unsigned int, unsigned int) const + 307
>> 10 libFontRegistry.dylib 0x00007fff84176a15 TLocalFontRegistryImp::RegisterFonts(__CFArray const*, __CFDictionary const*, unsigned int, unsigned int, __CFArray const**) const + 167
>> 11 libFontRegistry.dylib 0x00007fff84176967 TLocalFontRegistry::RegisterFonts(__CFArray const*, __CFDictionary const*, unsigned int, unsigned int, __CFArray const**) const + 17
>> 12 libFontRegistry.dylib 0x00007fff8418c946 XTRegisterFonts + 388
>> 13 libFontRegistry.dylib 0x00007fff8417bd4b XTRegisterFont + 85
>> 14 ...ple.ApplicationServices.ATS 0x00007fff875fe52b SendActivateFontsMessage + 1134
>> 15 ...ple.ApplicationServices.ATS 0x00007fff87628723 _eATSFontActivateFromFileReference + 202
>> 16 ...ple.ApplicationServices.ATS 0x00007fff87647324 ATSFontActivateFromFileReference + 103
>> 17 libawt.jnilib 0x0000000149beca3d Java_sun_font_FontManager_loadFileFont + 107
>> 18 ??? 0x000000011d0126a8 0 + 4781581992
>> 19 ??? 0x000000011d006973 0 + 4781533555
>> 20 ??? 0x000000011d006973 0 + 4781533555
>> 21 ??? 0x000000011d00681a 0 + 4781533210
>> 22 ??? 0x000000011d0013f1 0 + 4781511665
>> 23 libclient.dylib 0x000000011bd3cc1d JVM_Lseek + 156985
>> 24 libclient.dylib 0x000000011bd3ca15 JVM_Lseek + 156465
>> 25 libclient.dylib 0x000000011bd3c9f8 JVM_Lseek + 156436
>> 26 libclient.dylib 0x000000011bd55fa8 JVM_NewInstanceFromConstructor + 3134
>> 27 libclient.dylib 0x000000011bd575b1 JVM_InvokeMethod + 1061
>> 28 libclient.dylib 0x000000011bd572b8 JVM_InvokeMethod + 300
>> 29 libjava.jnilib 0x00000001197b9d66 Java_sun_reflect_NativeMethodAccessorImpl_invoke0 + 18
>> 30 ??? 0x000000011d0126a8 0 + 4781581992
>> 31 ??? 0x000000011d006973 0 + 4781533555
>> 32 ??? 0x000000011d006973 0 + 4781533555
>> 33 ??? 0x000000011d006e4d 0 + 4781534797
>> 34 ??? 0x000000011d006973 0 + 4781533555
>> 35 ??? 0x000000011d00681a 0 + 4781533210
>> 36 ??? 0x000000011d1807b4 0 + 4783081396
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.