both fop 0.95 and trunk version fail the attached fo file with C:\Temp\cr14230>\programs\Java\fop-trunk\fop.bat -fo testi.fo -pdf testix.pdf 13.1.2010 14:12:06 org.apache.fop.cli.Main startFOP SEVERE: Exception java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:302) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130) at org.apache.fop.cli.Main.startFOP(Main.java:174) at org.apache.fop.cli.Main.main(Main.java:205) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:686) at org.apache.fop.fo.properties.CharacterProperty$Maker.make(CharacterProperty.java:44) at org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:412) at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:319) at org.apache.fop.fo.FObj.processNode(FObj.java:119) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:282) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:171) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299) ... 3 more --------- java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:686) at org.apache.fop.fo.properties.CharacterProperty$Maker.make(CharacterProperty.java:44) at org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:412) at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:319) at org.apache.fop.fo.FObj.processNode(FObj.java:119) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:282) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:171) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130) at org.apache.fop.cli.Main.startFOP(Main.java:174) at org.apache.fop.cli.Main.main(Main.java:205) (stack trace from trunk version as of 13. Jan 2010). It is likely something wrong with the given xsl-fo. It validates fine with XMLasdf Spy, but I would guess it's something e.g. in attribute values that goes undetected by it. Even though the error is likely in the xsl-fo given, IMO fop should fail with some sensible error that might give a clue as to where the error lies.
Created attachment 24835 [details] Sample xsl-fo file to reproduce the bug
This issue is due to empty hyphenation-character property. hyphenation-character property should have either a <character> or inherit value. I think that empty string is not a valid value.
The crash is indeed a bug. However, I believe it is also erroneous to have the following property specifications (appearing twice in the sample document, and causing the issue): hyphenation-character="" hyphenation-push-character-count="" hyphenation-remain-character-count="" Whether this should be treated as a recoverable error could be made to depend on the 'strict-validation' config option. If validation is relaxed, then we could just use the initial values.
resetting P2 open bugs to P3 pending further review