You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Adam Nichols (JIRA)" <ji...@apache.org> on 2011/06/29 01:11:28 UTC
[jira] [Issue Comment Edited] (PDFBOX-1019) PDF conversion to image
crashes the JVM
[ https://issues.apache.org/jira/browse/PDFBOX-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13056875#comment-13056875 ]
Adam Nichols edited comment on PDFBOX-1019 at 6/28/11 11:10 PM:
----------------------------------------------------------------
I was able to duplicate this issue using the Oracle JVM 1.6.0_23 on Linux (32-bit Ubuntu). Added 256.pdf to the resources directory and a test case to PDSimpleFontTest so others can easily test this issue. I'm including the full log output from the test case so we can try to determine whether this is a JVM bug or an issue with PDFBox. Also, adding the patch from PDFBOX-988 had no effect.
$ /usr/local/jdk1.6.0_23/bin/java -versionjava version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Server VM (build 19.0-b09, mixed mode)
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.filter.FlateFilter decode
SEVERE: Stop reading corrupt stream
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <พ> from <Tahoma> to the default font
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ล> from <Tahoma> to the default font
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ั> from <Tahoma> to the default font
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ง> from <Tahoma> to the default font
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ร> from <Tahoma> to the default font
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ั> from <Tahoma> to the default font
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ก> from <Tahoma> to the default font
java: ../../../src/share/native/sun/font/t2k/t1.c:3098: BuildSubrs: Assertion `fnum >= 0 && fnum < t->numSubrs' failed.
Testsuite: org.apache.pdfbox.pdmodel.font.PDSimpleFontTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
Testcase: org.apache.pdfbox.pdmodel.font.PDSimpleFontTest:testPDFBox1019: Caused an ERROR
Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
junit.framework.AssertionFailedError: Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154)
was (Author: adamnichols):
I was able to duplicate this issue using the Oracle JVM 1.6.0_23 on Linux (32-bit Ubuntu). Added 256.pdf to the resources directory and a test case to PDSimpleFontTest so others can easily test this issue. I'm including the full log output from the test case so we can try to determine whether this is a JVM bug or an issue with PDFBox.
$ /usr/local/jdk1.6.0_23/bin/java -versionjava version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Server VM (build 19.0-b09, mixed mode)
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.filter.FlateFilter decode
SEVERE: Stop reading corrupt stream
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <พ> from <Tahoma> to the default font
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ล> from <Tahoma> to the default font
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ั> from <Tahoma> to the default font
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ง> from <Tahoma> to the default font
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ร> from <Tahoma> to the default font
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ั> from <Tahoma> to the default font
Jun 28, 2011 3:58:15 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ก> from <Tahoma> to the default font
java: ../../../src/share/native/sun/font/t2k/t1.c:3098: BuildSubrs: Assertion `fnum >= 0 && fnum < t->numSubrs' failed.
Testsuite: org.apache.pdfbox.pdmodel.font.PDSimpleFontTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
Testcase: org.apache.pdfbox.pdmodel.font.PDSimpleFontTest:testPDFBox1019: Caused an ERROR
Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
junit.framework.AssertionFailedError: Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154)
> PDF conversion to image crashes the JVM
> ---------------------------------------
>
> Key: PDFBOX-1019
> URL: https://issues.apache.org/jira/browse/PDFBOX-1019
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 1.5.0
> Environment: Linux Ubuntu, Mac OSX
> Reporter: Petr Knoth
> Priority: Blocker
> Attachments: thumb.png
>
>
> The file http://tie.open.ac.uk/256.pdf crashes the JVM during conversion to jpeg with the following message :
> Assertion failed: (fnum >= 0 && fnum < t->numSubrs), function BuildSubrs, file ../../../src/share/native/sun/font/t2k/t1.c, line 3098.
> Java Result: 134
> The error happens in the method convertToImage():
> PDPage page = (PDPage) pages.get(startPage);
> PDPage page = (PDPage) pages.get(0);
> try {
> image = page.convertToImage();
> } catch (IOException ex) {
> Logger.getLogger(PdfIText.class.getName()).log(Level.SEVERE, null, ex);
> }
> The problem occurs not for all files, but is critical as it stops my webserver (Tomcat) that needs to be then restarted.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira