Crashes all the time on ArrayIndexOutOfBoundsException in libgcj.so.10

Bug #487922 reported by Jakob Unterwurzacher
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
gcj-4.4 (Ubuntu)
New
Undecided
Unassigned
Nominated for Karmic by Jakob Unterwurzacher
Nominated for Lucid by Jakob Unterwurzacher
pdftk (Debian)
Fix Released
Unknown
pdftk (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Karmic by Jakob Unterwurzacher
Nominated for Lucid by Jakob Unterwurzacher

Bug Description

==============
WORKAROUNDS
==============
1) Set LANG=C when launching pdftk, for example:
$ LANG=C pdftk 1.pdf 2.pdf cat output out.pdf

-OR-

2) Install pdftk from Jaunty
http://de.archive.ubuntu.com/ubuntu/pool/universe/p/pdftk/pdftk_1.41-3ubuntu1_i386.deb
http://de.archive.ubuntu.com/ubuntu/pool/universe/p/pdftk/pdftk_1.41-3ubuntu1_amd64.deb

==============
BUG
==============
This seems to happen only if LANG=de_AT.UTF-8, but then it happens all the time.

$ pdftk 1.pdf 2.pdf cat output out.pdf
Unhandled Java Exception:
java.lang.ArrayIndexOutOfBoundsException: 10
   at java.text.SimpleDateFormat.formatWithAttribute(libgcj.so.10)
   at java.text.SimpleDateFormat.format(libgcj.so.10)
   at java.text.DateFormat.format(libgcj.so.10)
   at com.lowagie.text.Document.addCreationDate(itext-2.1.5.jar.so)
   at com.lowagie.text.pdf.PdfDocument.<init>(itext-2.1.5.jar.so)
   at com.lowagie.text.pdf.PdfCopy.<init>(itext-2.1.5.jar.so)

ProblemType: Bug
Architecture: i386
Date: Wed Nov 25 01:48:00 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: pdftk 1.41+dfsg-1
ProcEnviron:
 PATH=(custom, user)
 LANG=de_AT.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-15.50-generic
SourcePackage: pdftk
Uname: Linux 2.6.31-15-generic i686

Revision history for this message
Jakob Unterwurzacher (jakobunt) wrote :
Revision history for this message
Jakob Unterwurzacher (jakobunt) wrote :
Changed in pdftk (Ubuntu):
status: New → Confirmed
Revision history for this message
Jakob Unterwurzacher (jakobunt) wrote :

Workaround: Install pdftk from Ubuntu Jaunty. This depends on libgcj9 instead of the buggy (?) libgcj10.

The Jaunty packages:
http://de.archive.ubuntu.com/ubuntu/pool/universe/p/pdftk/pdftk_1.41-3ubuntu1_i386.deb
http://de.archive.ubuntu.com/ubuntu/pool/universe/p/pdftk/pdftk_1.41-3ubuntu1_amd64.deb

Changed in pdftk (Debian):
status: Unknown → New
Revision history for this message
Johann Felix Soden (johfel) wrote :

It seems to me, that this bug only occurs with locale de_AT.UTF-8.
So a workaround would be setting the locale to C:
 LANG=C pdftk ...

If this does not work or other locales are affected too, please inform me.
The bug seems to be in libgcj10, not in pdftk or libitext.

Changed in pdftk (Debian):
status: New → Confirmed
description: updated
Revision history for this message
Johann Felix Soden (johfel) wrote :

The exception only occurs between April and December. It seems that the current month is used as an index to an array with 3 entries. With libgcj10-dbg installed, I get the following more verbose back trace:

Unhandled Java Exception:
java.lang.ArrayIndexOutOfBoundsException: 11
   at java.text.SimpleDateFormat.formatWithAttribute(SimpleDateFormat.java:793)
   at java.text.SimpleDateFormat.format(SimpleDateFormat.java:845)
   at java.text.DateFormat.format(DateFormat.java:419)
   at com.lowagie.text.Document.addCreationDate(itext-2.1.7.jar.so)
   at com.lowagie.text.pdf.PdfDocument.<init>(itext-2.1.7.jar.so)
   at com.lowagie.text.pdf.PdfStamperImp.<init>(itext-2.1.7.jar.so)

I tried unsuccessfully to reproduce the exception with an own written small java program calling SimpleDateFormat.format directly. The source code of SimpleDateFormat can be found in the gcc-4.4 source. At first view, everything seems fine there.

Changed in pdftk (Debian):
status: Confirmed → Fix Released
Revision history for this message
Jakob Unterwurzacher (jakobunt) wrote :

Attached: Debian's workaround patch, extracted from http://ftp.de.debian.org/debian/pool/main/p/pdftk/pdftk_1.41+dfsg-6.debian.tar.gz .

description: updated
Revision history for this message
Matthias Klose (doko) wrote :

1.41+dfsg-7 is in lucid

Changed in pdftk (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.