ArrayIndexOutOfBoundsException in LineBreakUtils with LATIN CAPITAL LETTER SHARP S

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ArrayIndexOutOfBoundsException in LineBreakUtils with LATIN CAPITAL LETTER SHARP S

Gaetan Nadon-2
I have a DocBook/XML document which contains Compose Keys tables for en_US.UTF-8. There is one character which causes the following Java exceptions to be thrown:
; SystemID: file:/usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl; Line#: 311; Column#: 54
javax.xml.transform.TransformerException: java.lang.ArrayIndexOutOfBoundsException: -1
	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2405)

[...]

java.lang.ArrayIndexOutOfBoundsException: -1
	at org.apache.fop.text.linebreak.LineBreakUtils.getLineBreakPairProperty(LineBreakUtils.java:666)
[...]

For a small test case purpose, an xsltproc is used to produce a .fo file which is processed by fop:
fop en_US.UTF-8.fo  -pdf out.pdf

The .fo file is difficult to work with, but I managed to get the important part:
<fo:block>"ẞ"   Ssharp # LATIN CAPITAL LETTER SHARP S</fo:block>
The character within quotes above is the character that causes the problem. I hope the browser lets you see it correctly. If I delete or replace this character with another one, no exceptions thrown and expected output.

The "Latin capital sharp s" hex code is E1BA9E which is the correct value for UTF-8 encoding. I have verified with a binary editor. This makes me think that xsltproc did a correct job in writing the .fo file. When converting docbook xml to html, there is no problem. I tried the fop debug option, but nothing seems different.

Similar Bug Reports
-----------------------------
https://issues.apache.org/bugzilla/show_bug.cgi?id=41999
https://issues.apache.org/bugzilla/show_bug.cgi?id=49636


System Used
-----------
Ubuntu Linux distro on AMD64

java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

fop version 0.95 packaged by Debian: http://packages.debian.org/squeeze/fop

Xsltproc: http://packages.debian.org/squeeze/xsltproc
Using libxml 20708, libxslt 10126 and libexslt 815
xsltproc was compiled against libxml 20708, libxslt 10126 and libexslt 815
libxslt 10126 was compiled against libxml 20708
libexslt 815 was compiled against libxml 20708

Gaetan Nadon


signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ArrayIndexOutOfBoundsException in LineBreakUtils with LATIN CAPITAL LETTER SHARP S

Pascal Sancho
Hi Gaetan,

I've successful tried the Ssarp letter.
IMO, this is not the initial cause: see the previous error message in
your log:
(...) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
(...)

You should have a look in the XSLT processing, Xalan throwing an
Exception there.


Le 22/06/2011 03:11, Gaetan Nadon a écrit :

> I have a DocBook/XML document which contains Compose Keys tables for
> en_US.UTF-8. There is one character which causes the following Java
> exceptions to be thrown:
>
>     ; SystemID: file:/usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl; Line#: 311; Column#: 54
>     javax.xml.transform.TransformerException: java.lang.ArrayIndexOutOfBoundsException: -1
>     at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2405)
>
>     [...]
>
>     java.lang.ArrayIndexOutOfBoundsException: -1
>     at org.apache.fop.text.linebreak.LineBreakUtils.getLineBreakPairProperty(LineBreakUtils.java:666)
>     [...]
>
>
> For a small test case purpose, an xsltproc is used to produce a .fo file
> which is processed by fop:
>
>     fop en_US.UTF-8.fo  -pdf out.pdf
>
>
> The .fo file is difficult to work with, but I managed to get the
> important part:
>
>     <fo:block>"ẞ"   Ssharp # LATIN CAPITAL LETTER SHARP S</fo:block>
>
> The character within quotes above is the character that causes the
> problem. I hope the browser lets you see it correctly. If I delete or
> replace this character with another one, no exceptions thrown and
> expected output.
>
> The "Latin capital sharp s" hex code is E1BA9E which is the correct
> value for UTF-8 encoding. I have verified with a binary editor. This
> makes me think that xsltproc did a correct job in writing the .fo file.
> When converting docbook xml to html, there is no problem. I tried the
> fop debug option, but nothing seems different.
>
> Similar Bug Reports
> -----------------------------
> https://issues.apache.org/bugzilla/show_bug.cgi?id=41999
> https://issues.apache.org/bugzilla/show_bug.cgi?id=49636
>
>
> System Used
> -----------
> Ubuntu Linux distro on AMD64
>
> java version "1.6.0_22"
> OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1)
> OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
>
> fop version 0.95 packaged by Debian: http://packages.debian.org/squeeze/fop
>
> Xsltproc: http://packages.debian.org/squeeze/xsltproc
> Using libxml 20708, libxslt 10126 and libexslt 815
> xsltproc was compiled against libxml 20708, libxslt 10126 and libexslt 815
> libxslt 10126 was compiled against libxml 20708
> libexslt 815 was compiled against libxml 20708
>
> Gaetan Nadon
>

--
Pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: ArrayIndexOutOfBoundsException in LineBreakUtils with LATIN CAPITAL LETTER SHARP S

Pascal Sancho
Hmm,

Sorry, I didn't read the bottom of your message: "fop version 0.95"

Reproduced with that FOP version (0.95),
But works fine with FOP 1.0

Le 22/06/2011 09:38, Pascal Sancho a écrit :

> Hi Gaetan,
>
> I've successful tried the Ssarp letter.
> IMO, this is not the initial cause: see the previous error message in
> your log:
> (...) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
> (...)
>
> You should have a look in the XSLT processing, Xalan throwing an
> Exception there.
>
>
> Le 22/06/2011 03:11, Gaetan Nadon a écrit :
>> I have a DocBook/XML document which contains Compose Keys tables for
>> en_US.UTF-8. There is one character which causes the following Java
>> exceptions to be thrown:
>>
>>     ; SystemID: file:/usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl; Line#: 311; Column#: 54
>>     javax.xml.transform.TransformerException: java.lang.ArrayIndexOutOfBoundsException: -1
>>     at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2405)
>>
>>     [...]
>>
>>     java.lang.ArrayIndexOutOfBoundsException: -1
>>     at org.apache.fop.text.linebreak.LineBreakUtils.getLineBreakPairProperty(LineBreakUtils.java:666)
>>     [...]
>>
>>
>> For a small test case purpose, an xsltproc is used to produce a .fo file
>> which is processed by fop:
>>
>>     fop en_US.UTF-8.fo  -pdf out.pdf
>>
>>
>> The .fo file is difficult to work with, but I managed to get the
>> important part:
>>
>>     <fo:block>"ẞ"   Ssharp # LATIN CAPITAL LETTER SHARP S</fo:block>
>>
>> The character within quotes above is the character that causes the
>> problem. I hope the browser lets you see it correctly. If I delete or
>> replace this character with another one, no exceptions thrown and
>> expected output.
>>
>> The "Latin capital sharp s" hex code is E1BA9E which is the correct
>> value for UTF-8 encoding. I have verified with a binary editor. This
>> makes me think that xsltproc did a correct job in writing the .fo file.
>> When converting docbook xml to html, there is no problem. I tried the
>> fop debug option, but nothing seems different.
>>
>> Similar Bug Reports
>> -----------------------------
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=41999
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=49636
>>
>>
>> System Used
>> -----------
>> Ubuntu Linux distro on AMD64
>>
>> java version "1.6.0_22"
>> OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1)
>> OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
>>
>> fop version 0.95 packaged by Debian: http://packages.debian.org/squeeze/fop
>>
>> Xsltproc: http://packages.debian.org/squeeze/xsltproc
>> Using libxml 20708, libxslt 10126 and libexslt 815
>> xsltproc was compiled against libxml 20708, libxslt 10126 and libexslt 815
>> libxslt 10126 was compiled against libxml 20708
>> libexslt 815 was compiled against libxml 20708
>>
>> Gaetan Nadon
>>
>

--
Pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: ArrayIndexOutOfBoundsException in LineBreakUtils with LATIN CAPITAL LETTER SHARP S

Gaetan Nadon-2
On Wed, 2011-06-22 at 11:35 +0200, Pascal Sancho wrote:
Sorry, I didn't read the bottom of your message: "fop version 0.95"

Reproduced with that FOP version (0.95),
But works fine with FOP 1.0


I have obtained fop 1.0 from Debian experimental and the problem is resolved.
This is the link in case others would like to install it.
http://packages.debian.org/experimental/fop

Thanks for looking into this.


signature.asc (205 bytes) Download Attachment