fop: I/O error while extracting image metadata

Bug #620037 reported by Eric B
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fop (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: fop

On Ubuntu Lucid, when running apache fop, the metadata for PNG images can't be read:

18 août 2010 19:57:06 org.apache.fop.fo.flow.ExternalGraphic bind
GRAVE: Image not available: I/O error while extracting image metadata: Error reading PNG metadata
...
GRAVE: Image not found: images/someimage.png

Expected: these error messages should not appear and the resulting PDF file should be created correctly.

When I replace openjdk with sun-jdk, the problem disappears (no error messages, PDF file created fine). So there is both a workaround to this problem, and an indication where the problem lies (in openjdk).

Here are the packages I installed to solve the problem:

Installed packages:
lucid/partner sun-java6-jre 6.20dlj-1ubuntu3 [6 410kB]
lucid/main odbcinst 2.2.11-21 [35,5kB]
lucid/main odbcinst1debian1 2.2.11-21 [66,6kB]
lucid/main unixodbc 2.2.11-21 [209kB]
lucid/main gsfonts-x11 0.21 [10,5kB]
lucid/partner sun-java6-bin 6.20dlj-1ubuntu3 [27,7MB]
lucid/partner sun-java6-jdk 6.20dlj-1ubuntu3 [20,9MB]

Here are the packages I removed to solve the problem:

default-jre-headless*
icedtea-6
jre-cacao*
openjdk-6-jre*
openjdk-6-jre-headless*
openjdk-6-jre-lib*

I hope that helps.

Revision history for this message
Eric B (ebischoff) wrote :
Revision history for this message
Eric B (ebischoff) wrote :
Revision history for this message
Eric B (ebischoff) wrote :
Revision history for this message
Eric B (ebischoff) wrote :

I have reproduced this problem on a fresh Ubuntu Lucid install.

To reproduce:
 - install fop with "sudo aptitude install"
 - save test.fo and test.png (attached to this bug report) into your working directory
 - run fop with the following command:
     $ fop -fo test.fo -pdf test.pdf
 - see the error messages and the broken PDF file

For the problem to occur, the image needs have no size hints. That's the case of the image attached to this bug report. A workaround is of course to rework the image with the gimp, as the gimp will add size hints to the image. However, we have tons of images produced under windows that do not have these hints, so this workaround is not really a solution, as it would take ages to convert all the images.

I have also attached the list of packages on my fresh Ubuntu install, with the package version numbers.

Again, the most important information is that the problem disappears if openjdk is replaced with sun-jdk.

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.