You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Brendan Lane Larson <Br...@yahoo.com> on 2003/07/21 02:11:42 UTC

Mac OS X 10.2.x / Batik Release 1.5 - Squiggle debug output

Thomas and Vincent,

Good to meet both of you at SVG Open in Vancouver last week. As I noted  
a few days ago at the conference, the 1.5 Batik release fails on Mac OS  
X 10.2.6 when I attempt to run Squiggle to view SVG documents (the  
previous version of 1.5 beta worked fine). The version of Apple's JDK  
that I have installed on my Mac is as follows:

> java -version
> java version "1.4.1_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-39)
> Java HotSpot(TM) Client VM (build 1.4.1_01-14, mixed mode)

When I run squiggle, as it is loading its various resources during  
start-up, I receive an error message in a panel that states, "SVG  
Error: null" with Show Details stating:

> java.lang.Exception
> 	at  
> org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:114)

Per Thomas' suggestion after the Batik Panel discussion at SVG Open, I  
compiled the source of Batik release 1.5 in the xml-batik directory  
with the debug=on switch set in the build.properties document that I  
created, and then I ran './build.sh squiggle' with the following output  
(see below) which I hope if useful. Please let me know if I can be of  
further assistance with respect to Batik and Mac OS X 10.2.x.

Cheers,

-Brendan Lane Larson

> ./build.sh squiggle
> Buildfile: build.xml
>
> init-args:
>
> init:
>
> compile:
> Created dir: /Users/xyz/Batik.v1.5/xml-batik/classes
> debug on, optimize on, deprecation on
> /Users/xyz/Batik.v1.5/xml-batik/sources/org/apache/batik/apps/ 
> svgbrowser/Main.java:812: warning: encode(java.lang.String) in  
> java.net.URLEncoder has been deprecated
>              
> lastVisitedBuffer.append(URLEncoder.encode(lastVisited.elementAt(i).toS 
> tring()));
>                                                ^
> /Users/xyz/Batik.v1.5/xml-batik/sources/org/apache/batik/apps/ 
> svgbrowser/Main.java:858: warning: decode(java.lang.String) in  
> java.net.URLDecoder has been deprecated
>             lastVisited.addElement(URLDecoder.decode(st.nextToken()));
>                                              ^
> 2 warnings
>
> squiggle:
> 2003-07-20 13:51:00.120 java[4629] Font GB18030Bitmap: in  
> _readBasicMetricsForSize, claims 0 max advance but is fixed-pitch.
> 2003-07-20 13:51:02.440 java[4629] Warning: Font  
> LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
> 2003-07-20 13:51:04.112 java[4629] Warning: Font  
> LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
> java.lang.ExceptionInInitializerError
>         at  
> org.apache.batik.gvt.renderer.StrokingTextPainter.createModifiedACIForF 
> ontMatching(StrokingTextPainter.java:439)
>         at  
> org.apache.batik.gvt.renderer.StrokingTextPainter.getTextRuns(StrokingT 
> extPainter.java:196)
>         at  
> org.apache.batik.gvt.renderer.StrokingTextPainter.getOutline(StrokingTe 
> xtPainter.java:1029)
>         at  
> org.apache.batik.gvt.renderer.BasicTextPainter.getGeometryBounds(BasicT 
> extPainter.java:81)
>         at  
> org.apache.batik.gvt.TextNode.getGeometryBounds(TextNode.java:229)
>         at  
> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedGeometryBounds( 
> AbstractGraphicsNode.java:841)
>         at  
> org.apache.batik.gvt.CompositeGraphicsNode.getGeometryBounds(CompositeG 
> raphicsNode.java:231)
>         at  
> org.apache.batik.bridge.SVGUtilities.convertRegion(SVGUtilities.java:10 
> 07)
>         at  
> org.apache.batik.bridge.SVGUtilities.convertFilterChainRegion(SVGUtilit 
> ies.java:612)
>         at  
> org.apache.batik.bridge.SVGFilterElementBridge.createFilter(SVGFilterEl 
> ementBridge.java:66)
>         at  
> org.apache.batik.bridge.CSSUtilities.convertFilter(CSSUtilities.java:66 
> 1)
>         at  
> org.apache.batik.bridge.AbstractGraphicsNodeBridge.buildGraphicsNode(Ab 
> stractGraphicsNodeBridge.java:118)
>         at  
> org.apache.batik.bridge.SVGUseElementBridge.buildGraphicsNode(SVGUseEle 
> mentBridge.java:317)
>         at  
> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:18 
> 6)
>         at  
> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
>         at  
> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:18 
> 4)
>         at  
> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
>         at  
> org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:116)
>         at  
> org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode( 
> SVGUseElementBridge.java:167)
>         at  
> org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUseEl 
> ementBridge.java:76)
>         at  
> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:17 
> 8)
>         at  
> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
>         at  
> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:18 
> 4)
>         at  
> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
>         at  
> org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:116)
>         at  
> org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode( 
> SVGUseElementBridge.java:167)
>         at  
> org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUseEl 
> ementBridge.java:76)
>         at  
> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:17 
> 8)
>         at  
> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
>         at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:66)
>         at  
> org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:94)
> Caused by: java.lang.NullPointerException
>         at  
> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphi 
> csEnvironment.java:327)
>         at  
> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphi 
> csEnvironment.java:359)
>         at  
> org.apache.batik.gvt.font.FontFamilyResolver.<clinit>(FontFamilyResolve 
> r.java:62)
>         ... 31 more



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Mac OS X 10.2.x / Batik Release 1.5 - Squiggle debug output

Posted by "Anthony J. Starks" <aj...@comcast.net>.
here is the output from my Mac (10.2.6)

 > java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-39)
Java HotSpot(TM) Client VM (build 1.4.1_01-14, mixed mode)


 > java Test
2003-07-26 12:49:26.781 java[453] Warning: Font  
LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
2003-07-26 12:49:27.385 java[453] Font GB18030Bitmap: in  
_readBasicMetricsForSize, claims 0 max advance but is fixed-pitch.
Font: #GungSeo
Font: #HeadLineA
Font: #PCMyungjo
Font: #PilGi
Font: .Aqua Kana
Font: .Keyboard
Font: Academy Engraved LET
Font: Al Bayan
Font: Algerian Condensed LET
Font: American Typewriter
Font: Andale Mono
Font: Apple Chancery
Font: Apple LiGothic
Font: Apple LiSung
Font: AppleGothic
Font: AppleMyungjo
Font: Arial
Font: Arial Black
Font: Arial Hebrew
Font: Arial Narrow
Font: Arial Rounded MT Bold
Font: Arriba Arriba LET
Font: Avant Garde Mono ITCTT
Font: Ayuthaya
Font: Baghdad
Font: BancoITC TT
Font: Baskerville
Font: Beijing
Font: BiauKai
Font: Big Caslon
Font: Blackmoor LET
Font: Bodoni SvtyTwo SC ITC TT
Font: Bradley Hand ITC TT
Font: BraganzaITC TT
Font: BraganzaSCITC TT
Font: Brush Script MT
Font: Cabaret LET
Font: Capitals
Font: Century Gothic
Font: Charcoal
Font: Charcoal CY
Font: Chicago
Font: Cochin
Font: Comic Sans MS
Font: Copperplate
Font: Copperplate Gothic Bold
Font: Copperplate Gothic Light
Font: Corsiva Hebrew
Font: Courier
Font: Courier New
Font: Curlz MT
Font: DecoType Naskh
Font: Default
Font: Devanagari MT
Font: Dialog
Font: DialogInput
Font: Didot
Font: Edwardian Script ITC
Font: Fang Song
Font: Futura
Font: Gadget
Font: GB18030 Bitmap
Font: Geezah
Font: Geneva
Font: Geneva CY
Font: Georgia
Font: Gill Sans
Font: Gujarati MT
Font: Gurmukhi MT
Font: Hazel LET
Font: Hei
Font: Helvetica
Font: Helvetica CY
Font: Helvetica Neue
Font: Herculanum
Font: Hiragino Kaku Gothic Pro
Font: Hiragino Kaku Gothic Std
Font: Hiragino Maru Gothic Pro
Font: Hiragino Mincho Pro
Font: Hoefler Text
Font: Impact
Font: Jazz LET
Font: Jenson Old Style TT
Font: Kai
Font: Krungthep
Font: KufiStandardGK
Font: Lucida Bright
Font: Lucida Grande
Font: Lucida Handwriting
Font: Lucida Sans
Font: Lucida Sans Typewriter
Font: Marker Felt
Font: Mona Lisa Solid OS ITC TT
Font: Monaco
Font: Monaco CY
Font: Monospaced
Font: Monotype Sorts
Font: Nadeem
Font: New Peninim MT
Font: New York
Font: Optima
Font: Osaka
Font: Palatino
Font: Papyrus
Font: Party LET
Font: PortagoITC TT
Font: Princetown LET
Font: Raanana
Font: Sand
Font: SansSerif
Font: Santa Fe LET
Font: Sathu
Font: Savoye LET
Font: Seoul
Font: Serif
Font: Shatter LET
Font: Silom
Font: Skia
Font: Song
Font: Souvenir Mono ITCTT
Font: STFangsong
Font: STHeiti
Font: STKaiti
Font: Stone Sans ITC TT
Font: Stone Sans Sem ITC TT
Font: STSong
Font: Symbol
Font: Synchro LET
Font: Tahoma
Font: Taipei
Font: Techno
Font: TembleITC TT
Font: Textile
Font: Thonburi
Font: Times
Font: Times CY
Font: Times New Roman
Font: Trebuchet MS
Font: Type Embellishments One LET
Font: University Roman Bold LET
Font: Verdana
Font: VT100
Font: Webdings
Font: Wingdings
Font: Zapf Dingbats
Font: Zapfino
Font: ZiggyITC TT


Also note that when starting squiggle:

 > java -jar batik-squiggle.jar
2003-07-26 12:54:15.197 java[457] Font GB18030Bitmap: in  
_readBasicMetricsForSize, claims 0 max advance but is fixed-pitch.
2003-07-26 12:54:17.609 java[457] Warning: Font  
LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
2003-07-26 12:54:21.287 java[457] Warning: Font  
LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
2003-07-26 12:54:30.111 java[457] Font GB18030Bitmap: in  
_readBasicMetricsForSize, claims 0 max advance but is fixed-pitch.
2003-07-26 12:54:34.236 java[457] Font GB18030Bitmap: in  
_readBasicMetricsForSize, claims 0 max advance but is fixed-pitch.
2003-07-26 12:54:45.984 java[457] Font GB18030Bitmap: in  
_readBasicMetricsForSize, claims 0 max advance but is fixed-pitch.

I first noticed this behavior during the 1.5 beta --- note that this  
behavior is dependent on the latest 1.4 Apple JVM.  When reverting back  
to the old 1.3 JVM, there are no messages.




On Monday, Jul 21, 2003, at 09:09 America/New_York, Thomas DeWeese  
wrote:

> Hi Brendan,
>
> Brendan Lane Larson wrote:
>
>> I compiled and ran your attached Test and results on my Mac laptop   
>> running Mac OS X 10.2.6 with JDK
>>> java -cp . Test
>>> Exception in thread "main" java.lang.NullPointerException
>>>         at   
>>> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGrap 
>>> hi csEnvironment.java:327)
>>>         at   
>>> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGrap 
>>> hi csEnvironment.java:359)
>>>         at Test.main(Test.java:13)
>
>     Thanks, this is (unfortunately) what I expected.  It appears that
> certain fonts are causing the JDK problems.  As long as you don't
> touch those fonts the JDK is happy.  Unfortunately in order to properly
> handle text in SVG (well really CSS) we need to get the list of fonts
> that are available on the system, this causes the JDK to examine all  
> installed fonts this then fails.  It is possible to put some try catch
> blocks around this call so if it fails we get no list of system fonts,  
> but I think this is likely to cause other issues down the road for
> font matching.
>
>> Also, on this other Mac that I have access to, I had not previously   
>> installed Batik 1.5 final release -- I did install Batik 15. beta 5  
>> and  was able to successfully run squiggle on that machine.
>> Whereas, on my laptop configured with OS X / JDK as aforementioned, I  
>>  was able to originally install 1.5 beta 5 and run squiggle   
>> successfully. After having downloaded the final 1.5 release and  
>> having  run it *unsuccessfully* on my laptop (with the problems I  
>> noted in  Vancouver), I then tried to switch back to Batik-1.5beta5  
>> this past  weekend -- and I unable to successfully revert to beta 5  
>> (I receive  different errors than release 1.5).
>
>     I think what really happened is that between 1.5b5 running and 1.5
> failing you installed some new fonts and these fonts are killing the  
> JDK.  The best route would be to uninstall the offending fonts.  You  
> can use the list from the Mac that it ran on as a list of 'good' fonts  
> for
> your laptop (i.e. they are probably safe to leave alone).  If you can
> determine the font and where the font came from I would be interested
> in hearing.
>
>> Does Batik, when attempting to run  squiggle, create any other  
>> additional directories and/or write to  additional files in the  
>> user's home directory (or elsewhere?) that I  need to know about for  
>> cleaning purposes (so I can gracefully move back  and forth between  
>> 1.5 release and 1.5 beta 5)? Is it possible that  release 1.5  
>> corrupted any files on my laptop and thus am now unable to  switch  
>> back to beta 5?
>
>     The only 'state' that Batik keeps is the ~/.batik directory.
> Feel free to delete this directory and try again, however I am 99%
> certain that this is not the source of the error.
>
>> Best regards,
>> -Brendan
>> On Monday, July 21, 2003, at 01:36  AM, Thomas DeWeese wrote:
>>> Brendan Lane Larson wrote:
>>>
>>>> Thomas and Vincent,
>>>> Good to meet both of you at SVG Open in Vancouver last week. As I   
>>>> noted  a few days ago at the conference, the 1.5 Batik release  
>>>> fails  on Mac OS  X 10.2.6 when I attempt to run Squiggle to view  
>>>> SVG  documents (the  previous version of 1.5 beta worked fine). The  
>>>>  version of Apple's JDK  that I have installed on my Mac is as >>  
>>>> follows:
>>>
>>>
>>>     This has all the appearence of a JDK issue.  Can you tell me if  
>>> the
>>> attached sample Java test file fails?
>>>
>>>     You should be able to run it with:
>>>     % javac -g Test.java
>>>     % java -cp . Test
>>>
>>>
>>>>> java -version
>>>>> java version "1.4.1_01"
>>>>> Java(TM) 2 Runtime Environment, Standard Edition (build  
>>>>> 1.4.1_01-39)
>>>>> Java HotSpot(TM) Client VM (build 1.4.1_01-14, mixed mode)
>>>>
>>>> When I run squiggle, as it is loading its various resources during   
>>>>  start-up, I receive an error message in a panel that states, "SVG   
>>>>  Error: null" with Show Details stating:
>>>>
>>>>> java.lang.Exception
>>>>>     at    
>>>>> org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:1 
>>>>> 14 )
>>>>
>>>> Per Thomas' suggestion after the Batik Panel discussion at SVG  
>>>> Open,  I  compiled the source of Batik release 1.5 in the xml-batik  
>>>>  directory  with the debug=on switch set in the build.properties   
>>>> document that I  created, and then I ran './build.sh squiggle' with  
>>>>  the following output  (see below) which I hope if useful. Please  
>>>> let  me know if I can be of  further assistance with respect to  
>>>> Batik and  Mac OS X 10.2.x.
>>>> Cheers,
>>>> -Brendan Lane Larson
>>>>
>>>>> ./build.sh squiggle
>>>>> Buildfile: build.xml
>>>>>
>>>>> init-args:
>>>>>
>>>>> init:
>>>>>
>>>>> compile:
>>>>> Created dir: /Users/xyz/Batik.v1.5/xml-batik/classes
>>>>> debug on, optimize on, deprecation on
>>>>> /Users/xyz/Batik.v1.5/xml-batik/sources/org/apache/batik/apps/   
>>>>> svgbrowser/Main.java:812: warning: encode(java.lang.String) in    
>>>>> java.net.URLEncoder has been deprecated
>>>>>                
>>>>> lastVisitedBuffer.append(URLEncoder.encode(lastVisited.elementAt(i) 
>>>>> .t oS tring()));
>>>>>                                                ^
>>>>> /Users/xyz/Batik.v1.5/xml-batik/sources/org/apache/batik/apps/   
>>>>> svgbrowser/Main.java:858: warning: decode(java.lang.String) in    
>>>>> java.net.URLDecoder has been deprecated
>>>>>               
>>>>> lastVisited.addElement(URLDecoder.decode(st.nextToken()));
>>>>>                                              ^
>>>>> 2 warnings
>>>>>
>>>>> squiggle:
>>>>> 2003-07-20 13:51:00.120 java[4629] Font GB18030Bitmap: in    
>>>>> _readBasicMetricsForSize, claims 0 max advance but is fixed-pitch.
>>>>> 2003-07-20 13:51:02.440 java[4629] Warning: Font    
>>>>> LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
>>>>> 2003-07-20 13:51:04.112 java[4629] Warning: Font    
>>>>> LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
>>>>> java.lang.ExceptionInInitializerError
>>>>>         at    
>>>>> org.apache.batik.gvt.renderer.StrokingTextPainter.createModifiedACI 
>>>>> Fo rF ontMatching(StrokingTextPainter.java:439)
>>>>>         at    
>>>>> org.apache.batik.gvt.renderer.StrokingTextPainter.getTextRuns(Strok 
>>>>> in gT extPainter.java:196)
>>>>>         at    
>>>>> org.apache.batik.gvt.renderer.StrokingTextPainter.getOutline(Stroki 
>>>>> ng Te xtPainter.java:1029)
>>>>>         at    
>>>>> org.apache.batik.gvt.renderer.BasicTextPainter.getGeometryBounds(Ba 
>>>>> si cT extPainter.java:81)
>>>>>         at    
>>>>> org.apache.batik.gvt.TextNode.getGeometryBounds(TextNode.java:229)
>>>>>         at    
>>>>> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedGeometryBou 
>>>>> nd s( AbstractGraphicsNode.java:841)
>>>>>         at    
>>>>> org.apache.batik.gvt.CompositeGraphicsNode.getGeometryBounds(Compos 
>>>>> it eG raphicsNode.java:231)
>>>>>         at    
>>>>> org.apache.batik.bridge.SVGUtilities.convertRegion(SVGUtilities.jav 
>>>>> a: 10 07)
>>>>>         at    
>>>>> org.apache.batik.bridge.SVGUtilities.convertFilterChainRegion(SVGUt 
>>>>> il it ies.java:612)
>>>>>         at    
>>>>> org.apache.batik.bridge.SVGFilterElementBridge.createFilter(SVGFilt 
>>>>> er El ementBridge.java:66)
>>>>>         at    
>>>>> org.apache.batik.bridge.CSSUtilities.convertFilter(CSSUtilities.jav 
>>>>> a: 66 1)
>>>>>         at    
>>>>> org.apache.batik.bridge.AbstractGraphicsNodeBridge.buildGraphicsNod 
>>>>> e( Ab stractGraphicsNodeBridge.java:118)
>>>>>         at    
>>>>> org.apache.batik.bridge.SVGUseElementBridge.buildGraphicsNode(SVGUs 
>>>>> eE le mentBridge.java:317)
>>>>>         at    
>>>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.jav 
>>>>> a: 18 6)
>>>>>         at    
>>>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:1 
>>>>> 44 )
>>>>>         at    
>>>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.jav 
>>>>> a: 18 4)
>>>>>         at    
>>>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:1 
>>>>> 44 )
>>>>>         at    
>>>>> org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:116)
>>>>>         at    
>>>>> org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsN 
>>>>> od e( SVGUseElementBridge.java:167)
>>>>>         at    
>>>>> org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGU 
>>>>> se El ementBridge.java:76)
>>>>>         at    
>>>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.jav 
>>>>> a: 17 8)
>>>>>         at    
>>>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:1 
>>>>> 44 )
>>>>>         at    
>>>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.jav 
>>>>> a: 18 4)
>>>>>         at    
>>>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:1 
>>>>> 44 )
>>>>>         at    
>>>>> org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:116)
>>>>>         at    
>>>>> org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsN 
>>>>> od e( SVGUseElementBridge.java:167)
>>>>>         at    
>>>>> org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGU 
>>>>> se El ementBridge.java:76)
>>>>>         at    
>>>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.jav 
>>>>> a: 17 8)
>>>>>         at    
>>>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:1 
>>>>> 44 )
>>>>>         at   
>>>>> org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:66)
>>>>>         at    
>>>>> org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:9 
>>>>> 4)
>>>>> Caused by: java.lang.NullPointerException
>>>>>         at    
>>>>> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGr 
>>>>> ap hi csEnvironment.java:327)
>>>>>         at    
>>>>> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGr 
>>>>> ap hi csEnvironment.java:359)
>>>>>         at    
>>>>> org.apache.batik.gvt.font.FontFamilyResolver.<clinit>(FontFamilyRes 
>>>>> ol ve r.java:62)
>>>>>         ... 31 more
>>>>
>>>> -------------------------------------------------------------------- 
>>>> -
>>>> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>>>> For additional commands, e-mail: batik-users-help@xml.apache.org
>>>
>>>
>>> /  
>>> ********************************************************************* 
>>> ** *******
>>>  *
>>>  * Copyright 2003, Eastman Kodak Company, All rights reserved
>>>  *
>>>    
>>> ********************************************************************* 
>>> ** ******/
>>>
>>> import java.awt.*;
>>>
>>> public class Test {
>>>     public static void main(String [] args) {
>>>         GraphicsEnvironment env;
>>>         env = GraphicsEnvironment.getLocalGraphicsEnvironment();
>>>         String fontNames[] = env.getAvailableFontFamilyNames();
>>>
>>>         int nFonts = fontNames != null ? fontNames.length : 0;
>>>         for(int i=0; i<nFonts; i++)
>>>             System.err.println("Font: " + fontNames[i]);
>>>
>>>         Font f = new Font("SansSerif", 0, 12);
>>>     }
>>> };
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>>> For additional commands, e-mail: batik-users-help@xml.apache.org
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>> For additional commands, e-mail: batik-users-help@xml.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Mac OS X 10.2.x / Batik Release 1.5 - Squiggle debug output

Posted by Thomas DeWeese <Th...@Kodak.com>.
Hi Brendan,

Brendan Lane Larson wrote:

> I compiled and ran your attached Test and results on my Mac laptop  
> running Mac OS X 10.2.6 with JDK
> 
>> java -cp . Test
>> Exception in thread "main" java.lang.NullPointerException
>>         at  
>> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphi 
>> csEnvironment.java:327)
>>         at  
>> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphi 
>> csEnvironment.java:359)
>>         at Test.main(Test.java:13)

     Thanks, this is (unfortunately) what I expected.  It appears that
certain fonts are causing the JDK problems.  As long as you don't
touch those fonts the JDK is happy.  Unfortunately in order to properly
handle text in SVG (well really CSS) we need to get the list of fonts
that are available on the system, this causes the JDK to examine all 
installed fonts this then fails.  It is possible to put some try catch
blocks around this call so if it fails we get no list of system fonts, 
but I think this is likely to cause other issues down the road for
font matching.

> Also, on this other Mac that I have access to, I had not previously  
> installed Batik 1.5 final release -- I did install Batik 15. beta 5 and  
> was able to successfully run squiggle on that machine.
> 
> Whereas, on my laptop configured with OS X / JDK as aforementioned, I  
> was able to originally install 1.5 beta 5 and run squiggle  
> successfully. After having downloaded the final 1.5 release and having  
> run it *unsuccessfully* on my laptop (with the problems I noted in  
> Vancouver), I then tried to switch back to Batik-1.5beta5 this past  
> weekend -- and I unable to successfully revert to beta 5 (I receive  
> different errors than release 1.5). 

     I think what really happened is that between 1.5b5 running and 1.5
failing you installed some new fonts and these fonts are killing the 
JDK.  The best route would be to uninstall the offending fonts.  You can 
use the list from the Mac that it ran on as a list of 'good' fonts for
your laptop (i.e. they are probably safe to leave alone).  If you can
determine the font and where the font came from I would be interested
in hearing.

> Does Batik, when attempting to run  
> squiggle, create any other additional directories and/or write to  
> additional files in the user's home directory (or elsewhere?) that I  
> need to know about for cleaning purposes (so I can gracefully move back  
> and forth between 1.5 release and 1.5 beta 5)? Is it possible that  
> release 1.5 corrupted any files on my laptop and thus am now unable to  
> switch back to beta 5?

     The only 'state' that Batik keeps is the ~/.batik directory.
Feel free to delete this directory and try again, however I am 99%
certain that this is not the source of the error.

> Best regards,
> 
> -Brendan
> 
> On Monday, July 21, 2003, at 01:36  AM, Thomas DeWeese wrote:
> 
>> Brendan Lane Larson wrote:
>>
>>> Thomas and Vincent,
>>> Good to meet both of you at SVG Open in Vancouver last week. As I  
>>> noted  a few days ago at the conference, the 1.5 Batik release fails  
>>> on Mac OS  X 10.2.6 when I attempt to run Squiggle to view SVG  
>>> documents (the  previous version of 1.5 beta worked fine). The  
>>> version of Apple's JDK  that I have installed on my Mac is as >> 
>>> follows:
>>
>>
>>     This has all the appearence of a JDK issue.  Can you tell me if the
>> attached sample Java test file fails?
>>
>>     You should be able to run it with:
>>     % javac -g Test.java
>>     % java -cp . Test
>>
>>
>>>> java -version
>>>> java version "1.4.1_01"
>>>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-39)
>>>> Java HotSpot(TM) Client VM (build 1.4.1_01-14, mixed mode)
>>>
>>> When I run squiggle, as it is loading its various resources during   
>>> start-up, I receive an error message in a panel that states, "SVG   
>>> Error: null" with Show Details stating:
>>>
>>>> java.lang.Exception
>>>>     at   
>>>> org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:114 )
>>>
>>> Per Thomas' suggestion after the Batik Panel discussion at SVG Open,  
>>> I  compiled the source of Batik release 1.5 in the xml-batik  
>>> directory  with the debug=on switch set in the build.properties  
>>> document that I  created, and then I ran './build.sh squiggle' with  
>>> the following output  (see below) which I hope if useful. Please let  
>>> me know if I can be of  further assistance with respect to Batik and  
>>> Mac OS X 10.2.x.
>>> Cheers,
>>> -Brendan Lane Larson
>>>
>>>> ./build.sh squiggle
>>>> Buildfile: build.xml
>>>>
>>>> init-args:
>>>>
>>>> init:
>>>>
>>>> compile:
>>>> Created dir: /Users/xyz/Batik.v1.5/xml-batik/classes
>>>> debug on, optimize on, deprecation on
>>>> /Users/xyz/Batik.v1.5/xml-batik/sources/org/apache/batik/apps/  
>>>> svgbrowser/Main.java:812: warning: encode(java.lang.String) in   
>>>> java.net.URLEncoder has been deprecated
>>>>               
>>>> lastVisitedBuffer.append(URLEncoder.encode(lastVisited.elementAt(i).t 
>>>> oS tring()));
>>>>                                                ^
>>>> /Users/xyz/Batik.v1.5/xml-batik/sources/org/apache/batik/apps/  
>>>> svgbrowser/Main.java:858: warning: decode(java.lang.String) in   
>>>> java.net.URLDecoder has been deprecated
>>>>              lastVisited.addElement(URLDecoder.decode(st.nextToken()));
>>>>                                              ^
>>>> 2 warnings
>>>>
>>>> squiggle:
>>>> 2003-07-20 13:51:00.120 java[4629] Font GB18030Bitmap: in   
>>>> _readBasicMetricsForSize, claims 0 max advance but is fixed-pitch.
>>>> 2003-07-20 13:51:02.440 java[4629] Warning: Font   
>>>> LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
>>>> 2003-07-20 13:51:04.112 java[4629] Warning: Font   
>>>> LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
>>>> java.lang.ExceptionInInitializerError
>>>>         at   
>>>> org.apache.batik.gvt.renderer.StrokingTextPainter.createModifiedACIFo 
>>>> rF ontMatching(StrokingTextPainter.java:439)
>>>>         at   
>>>> org.apache.batik.gvt.renderer.StrokingTextPainter.getTextRuns(Strokin 
>>>> gT extPainter.java:196)
>>>>         at   
>>>> org.apache.batik.gvt.renderer.StrokingTextPainter.getOutline(Stroking 
>>>> Te xtPainter.java:1029)
>>>>         at   
>>>> org.apache.batik.gvt.renderer.BasicTextPainter.getGeometryBounds(Basi 
>>>> cT extPainter.java:81)
>>>>         at   
>>>> org.apache.batik.gvt.TextNode.getGeometryBounds(TextNode.java:229)
>>>>         at   
>>>> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedGeometryBound 
>>>> s( AbstractGraphicsNode.java:841)
>>>>         at   
>>>> org.apache.batik.gvt.CompositeGraphicsNode.getGeometryBounds(Composit 
>>>> eG raphicsNode.java:231)
>>>>         at   
>>>> org.apache.batik.bridge.SVGUtilities.convertRegion(SVGUtilities.java: 
>>>> 10 07)
>>>>         at   
>>>> org.apache.batik.bridge.SVGUtilities.convertFilterChainRegion(SVGUtil 
>>>> it ies.java:612)
>>>>         at   
>>>> org.apache.batik.bridge.SVGFilterElementBridge.createFilter(SVGFilter 
>>>> El ementBridge.java:66)
>>>>         at   
>>>> org.apache.batik.bridge.CSSUtilities.convertFilter(CSSUtilities.java: 
>>>> 66 1)
>>>>         at   
>>>> org.apache.batik.bridge.AbstractGraphicsNodeBridge.buildGraphicsNode( 
>>>> Ab stractGraphicsNodeBridge.java:118)
>>>>         at   
>>>> org.apache.batik.bridge.SVGUseElementBridge.buildGraphicsNode(SVGUseE 
>>>> le mentBridge.java:317)
>>>>         at   
>>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 
>>>> 18 6)
>>>>         at   
>>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 )
>>>>         at   
>>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 
>>>> 18 4)
>>>>         at   
>>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 )
>>>>         at   
>>>> org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:116)
>>>>         at   
>>>> org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNod 
>>>> e( SVGUseElementBridge.java:167)
>>>>         at   
>>>> org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUse 
>>>> El ementBridge.java:76)
>>>>         at   
>>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 
>>>> 17 8)
>>>>         at   
>>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 )
>>>>         at   
>>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 
>>>> 18 4)
>>>>         at   
>>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 )
>>>>         at   
>>>> org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:116)
>>>>         at   
>>>> org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNod 
>>>> e( SVGUseElementBridge.java:167)
>>>>         at   
>>>> org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUse 
>>>> El ementBridge.java:76)
>>>>         at   
>>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 
>>>> 17 8)
>>>>         at   
>>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 )
>>>>         at  
>>>> org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:66)
>>>>         at   
>>>> org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:94)
>>>> Caused by: java.lang.NullPointerException
>>>>         at   
>>>> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGrap 
>>>> hi csEnvironment.java:327)
>>>>         at   
>>>> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGrap 
>>>> hi csEnvironment.java:359)
>>>>         at   
>>>> org.apache.batik.gvt.font.FontFamilyResolver.<clinit>(FontFamilyResol 
>>>> ve r.java:62)
>>>>         ... 31 more
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>>> For additional commands, e-mail: batik-users-help@xml.apache.org
>>
>>
>> / 
>> *********************************************************************** 
>> *******
>>  *
>>  * Copyright 2003, Eastman Kodak Company, All rights reserved
>>  *
>>   
>> *********************************************************************** 
>> ******/
>>
>> import java.awt.*;
>>
>> public class Test {
>>     public static void main(String [] args) {
>>         GraphicsEnvironment env;
>>         env = GraphicsEnvironment.getLocalGraphicsEnvironment();
>>         String fontNames[] = env.getAvailableFontFamilyNames();
>>
>>         int nFonts = fontNames != null ? fontNames.length : 0;
>>         for(int i=0; i<nFonts; i++)
>>             System.err.println("Font: " + fontNames[i]);
>>
>>         Font f = new Font("SansSerif", 0, 12);
>>     }
>> };
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Mac OS X 10.2.x / Batik Release 1.5 - Squiggle debug output

Posted by Brendan Lane Larson <Br...@yahoo.com>.
Thomas,

I compiled and ran your attached Test and results on my Mac laptop  
running Mac OS X 10.2.6 with JDK

> java -version
> java version "1.4.1_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-39)
> Java HotSpot(TM) Client VM (build 1.4.1_01-14, mixed mode)

were:

> java -cp . Test
> Exception in thread "main" java.lang.NullPointerException
>         at  
> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphi 
> csEnvironment.java:327)
>         at  
> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphi 
> csEnvironment.java:359)
>         at Test.main(Test.java:13)

However, I ran the same test on another Mac that I have access to, also  
running Mac OS X 10.2.6 with JDK:

> java -version
> java version "1.4.1_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-39)
> Java HotSpot(TM) Client VM (build 1.4.1_01-14, mixed mode)

and the results were:

> java -cp . Test
> 2003-07-21 02:33:49.020 java[542] Font GB18030Bitmap: in  
> _readBasicMetricsForSize, claims 0 max advance but is fixed-pitch.
> 2003-07-21 02:33:49.049 java[542] Warning: Font  
> LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
> Font: #GungSeo
> Font: #HeadLineA
> Font: #PCMyungjo
> Font: #PilGi
> Font: .Aqua Kana
> Font: .Keyboard
> Font: American Typewriter
> Font: Andale Mono
> Font: Apple Chancery
> Font: Apple LiGothic
> Font: Apple LiSung
> Font: AppleGothic
> Font: AppleMyungjo
> Font: Arial
> Font: Arial Black
> Font: Arial Narrow
> Font: Arial Rounded MT Bold
> Font: Baskerville
> Font: Beijing
> Font: BiauKai
> Font: Big Caslon
> Font: Brush Script MT
> Font: Capitals
> Font: Charcoal
> Font: Chicago
> Font: Cochin
> Font: Comic Sans MS
> Font: Copperplate
> Font: Courier
> Font: Courier New
> Font: Default
> Font: Dialog
> Font: DialogInput
> Font: Didot
> Font: Fang Song
> Font: Futura
> Font: Gadget
> Font: GB18030 Bitmap
> Font: Geneva
> Font: Georgia
> Font: Gill Sans
> Font: Hei
> Font: Helvetica
> Font: Helvetica Neue
> Font: Herculanum
> Font: Hiragino Kaku Gothic Pro
> Font: Hiragino Kaku Gothic Std
> Font: Hiragino Maru Gothic Pro
> Font: Hiragino Mincho Pro
> Font: Hoefler Text
> Font: Impact
> Font: Kai
> Font: Lucida Bright
> Font: Lucida Grande
> Font: Lucida Sans
> Font: Lucida Sans Typewriter
> Font: Marker Felt
> Font: Monaco
> Font: Monospaced
> Font: New York
> Font: Optima
> Font: Osaka
> Font: Palatino
> Font: Papyrus
> Font: Sand
> Font: SansSerif
> Font: Seoul
> Font: Serif
> Font: Skia
> Font: Song
> Font: STFangsong
> Font: STHeiti
> Font: STKaiti
> Font: STSong
> Font: Symbol
> Font: Taipei
> Font: Techno
> Font: Textile
> Font: Times
> Font: Times New Roman
> Font: Trebuchet MS
> Font: Verdana
> Font: VT100
> Font: Webdings
> Font: Zapf Dingbats
> Font: Zapfino

Also, on this other Mac that I have access to, I had not previously  
installed Batik 1.5 final release -- I did install Batik 15. beta 5 and  
was able to successfully run squiggle on that machine.

Whereas, on my laptop configured with OS X / JDK as aforementioned, I  
was able to originally install 1.5 beta 5 and run squiggle  
successfully. After having downloaded the final 1.5 release and having  
run it *unsuccessfully* on my laptop (with the problems I noted in  
Vancouver), I then tried to switch back to Batik-1.5beta5 this past  
weekend -- and I unable to successfully revert to beta 5 (I receive  
different errors than release 1.5). Does Batik, when attempting to run  
squiggle, create any other additional directories and/or write to  
additional files in the user's home directory (or elsewhere?) that I  
need to know about for cleaning purposes (so I can gracefully move back  
and forth between 1.5 release and 1.5 beta 5)? Is it possible that  
release 1.5 corrupted any files on my laptop and thus am now unable to  
switch back to beta 5?

Best regards,

-Brendan

On Monday, July 21, 2003, at 01:36  AM, Thomas DeWeese wrote:

> Brendan Lane Larson wrote:
>> Thomas and Vincent,
>> Good to meet both of you at SVG Open in Vancouver last week. As I  
>> noted  a few days ago at the conference, the 1.5 Batik release fails  
>> on Mac OS  X 10.2.6 when I attempt to run Squiggle to view SVG  
>> documents (the  previous version of 1.5 beta worked fine). The  
>> version of Apple's JDK  that I have installed on my Mac is as >> follows:
>
>     This has all the appearence of a JDK issue.  Can you tell me if the
> attached sample Java test file fails?
>
>     You should be able to run it with:
>     % javac -g Test.java
>     % java -cp . Test
>
>
>>> java -version
>>> java version "1.4.1_01"
>>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-39)
>>> Java HotSpot(TM) Client VM (build 1.4.1_01-14, mixed mode)
>> When I run squiggle, as it is loading its various resources during   
>> start-up, I receive an error message in a panel that states, "SVG   
>> Error: null" with Show Details stating:
>>> java.lang.Exception
>>>     at   
>>> org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:114 
>>> )
>> Per Thomas' suggestion after the Batik Panel discussion at SVG Open,  
>> I  compiled the source of Batik release 1.5 in the xml-batik  
>> directory  with the debug=on switch set in the build.properties  
>> document that I  created, and then I ran './build.sh squiggle' with  
>> the following output  (see below) which I hope if useful. Please let  
>> me know if I can be of  further assistance with respect to Batik and  
>> Mac OS X 10.2.x.
>> Cheers,
>> -Brendan Lane Larson
>>> ./build.sh squiggle
>>> Buildfile: build.xml
>>>
>>> init-args:
>>>
>>> init:
>>>
>>> compile:
>>> Created dir: /Users/xyz/Batik.v1.5/xml-batik/classes
>>> debug on, optimize on, deprecation on
>>> /Users/xyz/Batik.v1.5/xml-batik/sources/org/apache/batik/apps/  
>>> svgbrowser/Main.java:812: warning: encode(java.lang.String) in   
>>> java.net.URLEncoder has been deprecated
>>>               
>>> lastVisitedBuffer.append(URLEncoder.encode(lastVisited.elementAt(i).t 
>>> oS tring()));
>>>                                                ^
>>> /Users/xyz/Batik.v1.5/xml-batik/sources/org/apache/batik/apps/  
>>> svgbrowser/Main.java:858: warning: decode(java.lang.String) in   
>>> java.net.URLDecoder has been deprecated
>>>              
>>> lastVisited.addElement(URLDecoder.decode(st.nextToken()));
>>>                                              ^
>>> 2 warnings
>>>
>>> squiggle:
>>> 2003-07-20 13:51:00.120 java[4629] Font GB18030Bitmap: in   
>>> _readBasicMetricsForSize, claims 0 max advance but is fixed-pitch.
>>> 2003-07-20 13:51:02.440 java[4629] Warning: Font   
>>> LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
>>> 2003-07-20 13:51:04.112 java[4629] Warning: Font   
>>> LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
>>> java.lang.ExceptionInInitializerError
>>>         at   
>>> org.apache.batik.gvt.renderer.StrokingTextPainter.createModifiedACIFo 
>>> rF ontMatching(StrokingTextPainter.java:439)
>>>         at   
>>> org.apache.batik.gvt.renderer.StrokingTextPainter.getTextRuns(Strokin 
>>> gT extPainter.java:196)
>>>         at   
>>> org.apache.batik.gvt.renderer.StrokingTextPainter.getOutline(Stroking 
>>> Te xtPainter.java:1029)
>>>         at   
>>> org.apache.batik.gvt.renderer.BasicTextPainter.getGeometryBounds(Basi 
>>> cT extPainter.java:81)
>>>         at   
>>> org.apache.batik.gvt.TextNode.getGeometryBounds(TextNode.java:229)
>>>         at   
>>> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedGeometryBound 
>>> s( AbstractGraphicsNode.java:841)
>>>         at   
>>> org.apache.batik.gvt.CompositeGraphicsNode.getGeometryBounds(Composit 
>>> eG raphicsNode.java:231)
>>>         at   
>>> org.apache.batik.bridge.SVGUtilities.convertRegion(SVGUtilities.java: 
>>> 10 07)
>>>         at   
>>> org.apache.batik.bridge.SVGUtilities.convertFilterChainRegion(SVGUtil 
>>> it ies.java:612)
>>>         at   
>>> org.apache.batik.bridge.SVGFilterElementBridge.createFilter(SVGFilter 
>>> El ementBridge.java:66)
>>>         at   
>>> org.apache.batik.bridge.CSSUtilities.convertFilter(CSSUtilities.java: 
>>> 66 1)
>>>         at   
>>> org.apache.batik.bridge.AbstractGraphicsNodeBridge.buildGraphicsNode( 
>>> Ab stractGraphicsNodeBridge.java:118)
>>>         at   
>>> org.apache.batik.bridge.SVGUseElementBridge.buildGraphicsNode(SVGUseE 
>>> le mentBridge.java:317)
>>>         at   
>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 
>>> 18 6)
>>>         at   
>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 
>>> )
>>>         at   
>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 
>>> 18 4)
>>>         at   
>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 
>>> )
>>>         at   
>>> org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:116)
>>>         at   
>>> org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNod 
>>> e( SVGUseElementBridge.java:167)
>>>         at   
>>> org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUse 
>>> El ementBridge.java:76)
>>>         at   
>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 
>>> 17 8)
>>>         at   
>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 
>>> )
>>>         at   
>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 
>>> 18 4)
>>>         at   
>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 
>>> )
>>>         at   
>>> org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:116)
>>>         at   
>>> org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNod 
>>> e( SVGUseElementBridge.java:167)
>>>         at   
>>> org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUse 
>>> El ementBridge.java:76)
>>>         at   
>>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java: 
>>> 17 8)
>>>         at   
>>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144 
>>> )
>>>         at  
>>> org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:66)
>>>         at   
>>> org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:94)
>>> Caused by: java.lang.NullPointerException
>>>         at   
>>> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGrap 
>>> hi csEnvironment.java:327)
>>>         at   
>>> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGrap 
>>> hi csEnvironment.java:359)
>>>         at   
>>> org.apache.batik.gvt.font.FontFamilyResolver.<clinit>(FontFamilyResol 
>>> ve r.java:62)
>>>         ... 31 more
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>> For additional commands, e-mail: batik-users-help@xml.apache.org
>
> / 
> *********************************************************************** 
> *******
>  *
>  * Copyright 2003, Eastman Kodak Company, All rights reserved
>  *
>   
> *********************************************************************** 
> ******/
>
> import java.awt.*;
>
> public class Test {
>     public static void main(String [] args) {
>         GraphicsEnvironment env;
>         env = GraphicsEnvironment.getLocalGraphicsEnvironment();
>         String fontNames[] = env.getAvailableFontFamilyNames();
>
>         int nFonts = fontNames != null ? fontNames.length : 0;
>         for(int i=0; i<nFonts; i++)
>             System.err.println("Font: " + fontNames[i]);
>
>         Font f = new Font("SansSerif", 0, 12);
>     }
> };
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: Mac OS X 10.2.x / Batik Release 1.5 - Squiggle debug output

Posted by Thomas DeWeese <Th...@Kodak.com>.
Brendan Lane Larson wrote:
> Thomas and Vincent,
> 
> Good to meet both of you at SVG Open in Vancouver last week. As I noted  
> a few days ago at the conference, the 1.5 Batik release fails on Mac OS  
> X 10.2.6 when I attempt to run Squiggle to view SVG documents (the  
> previous version of 1.5 beta worked fine). The version of Apple's JDK  
> that I have installed on my Mac is as follows:

     This has all the appearence of a JDK issue.  Can you tell me if the
attached sample Java test file fails?

     You should be able to run it with:
     % javac -g Test.java
     % java -cp . Test


> 
>> java -version
>> java version "1.4.1_01"
>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-39)
>> Java HotSpot(TM) Client VM (build 1.4.1_01-14, mixed mode)
> 
> 
> When I run squiggle, as it is loading its various resources during  
> start-up, I receive an error message in a panel that states, "SVG  
> Error: null" with Show Details stating:
> 
>> java.lang.Exception
>>     at  
>> org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:114)
> 
> 
> Per Thomas' suggestion after the Batik Panel discussion at SVG Open, I  
> compiled the source of Batik release 1.5 in the xml-batik directory  
> with the debug=on switch set in the build.properties document that I  
> created, and then I ran './build.sh squiggle' with the following output  
> (see below) which I hope if useful. Please let me know if I can be of  
> further assistance with respect to Batik and Mac OS X 10.2.x.
> 
> Cheers,
> 
> -Brendan Lane Larson
> 
>> ./build.sh squiggle
>> Buildfile: build.xml
>>
>> init-args:
>>
>> init:
>>
>> compile:
>> Created dir: /Users/xyz/Batik.v1.5/xml-batik/classes
>> debug on, optimize on, deprecation on
>> /Users/xyz/Batik.v1.5/xml-batik/sources/org/apache/batik/apps/ 
>> svgbrowser/Main.java:812: warning: encode(java.lang.String) in  
>> java.net.URLEncoder has been deprecated
>>              
>> lastVisitedBuffer.append(URLEncoder.encode(lastVisited.elementAt(i).toS 
>> tring()));
>>                                                ^
>> /Users/xyz/Batik.v1.5/xml-batik/sources/org/apache/batik/apps/ 
>> svgbrowser/Main.java:858: warning: decode(java.lang.String) in  
>> java.net.URLDecoder has been deprecated
>>             lastVisited.addElement(URLDecoder.decode(st.nextToken()));
>>                                              ^
>> 2 warnings
>>
>> squiggle:
>> 2003-07-20 13:51:00.120 java[4629] Font GB18030Bitmap: in  
>> _readBasicMetricsForSize, claims 0 max advance but is fixed-pitch.
>> 2003-07-20 13:51:02.440 java[4629] Warning: Font  
>> LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
>> 2003-07-20 13:51:04.112 java[4629] Warning: Font  
>> LucidaSans-TypewriterBold claims fixed-pitch with 0 max advance!
>> java.lang.ExceptionInInitializerError
>>         at  
>> org.apache.batik.gvt.renderer.StrokingTextPainter.createModifiedACIForF 
>> ontMatching(StrokingTextPainter.java:439)
>>         at  
>> org.apache.batik.gvt.renderer.StrokingTextPainter.getTextRuns(StrokingT 
>> extPainter.java:196)
>>         at  
>> org.apache.batik.gvt.renderer.StrokingTextPainter.getOutline(StrokingTe 
>> xtPainter.java:1029)
>>         at  
>> org.apache.batik.gvt.renderer.BasicTextPainter.getGeometryBounds(BasicT 
>> extPainter.java:81)
>>         at  
>> org.apache.batik.gvt.TextNode.getGeometryBounds(TextNode.java:229)
>>         at  
>> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedGeometryBounds( 
>> AbstractGraphicsNode.java:841)
>>         at  
>> org.apache.batik.gvt.CompositeGraphicsNode.getGeometryBounds(CompositeG 
>> raphicsNode.java:231)
>>         at  
>> org.apache.batik.bridge.SVGUtilities.convertRegion(SVGUtilities.java:10 
>> 07)
>>         at  
>> org.apache.batik.bridge.SVGUtilities.convertFilterChainRegion(SVGUtilit 
>> ies.java:612)
>>         at  
>> org.apache.batik.bridge.SVGFilterElementBridge.createFilter(SVGFilterEl 
>> ementBridge.java:66)
>>         at  
>> org.apache.batik.bridge.CSSUtilities.convertFilter(CSSUtilities.java:66 
>> 1)
>>         at  
>> org.apache.batik.bridge.AbstractGraphicsNodeBridge.buildGraphicsNode(Ab 
>> stractGraphicsNodeBridge.java:118)
>>         at  
>> org.apache.batik.bridge.SVGUseElementBridge.buildGraphicsNode(SVGUseEle 
>> mentBridge.java:317)
>>         at  
>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:18 
>> 6)
>>         at  
>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
>>         at  
>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:18 
>> 4)
>>         at  
>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
>>         at  org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:116)
>>         at  
>> org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode( 
>> SVGUseElementBridge.java:167)
>>         at  
>> org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUseEl 
>> ementBridge.java:76)
>>         at  
>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:17 
>> 8)
>>         at  
>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
>>         at  
>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:18 
>> 4)
>>         at  
>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
>>         at  org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:116)
>>         at  
>> org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode( 
>> SVGUseElementBridge.java:167)
>>         at  
>> org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(SVGUseEl 
>> ementBridge.java:76)
>>         at  
>> org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:17 
>> 8)
>>         at  
>> org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:144)
>>         at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:66)
>>         at  
>> org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:94)
>> Caused by: java.lang.NullPointerException
>>         at  
>> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphi 
>> csEnvironment.java:327)
>>         at  
>> sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphi 
>> csEnvironment.java:359)
>>         at  
>> org.apache.batik.gvt.font.FontFamilyResolver.<clinit>(FontFamilyResolve 
>> r.java:62)
>>         ... 31 more
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
>