You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Petr Knoth (JIRA)" <ji...@apache.org> on 2011/05/26 19:03:47 UTC

[jira] [Created] (PDFBOX-1019) PDF conversion to image crashes the JVM

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


The file http://tie.open.ac.uk/256.pdf crashes the JVM durong 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

RE: [jira] [Updated] (PDFBOX-1019) PDF conversion to image crashes the JVM

Posted by Craig Stires <cr...@gmail.com>.
Hi Thomas,

Try the patch from
https://issues.apache.org/jira/browse/PDFBOX-988

this may be the same issue of a font not having enough glyphs, and making the g2d.drawString crash or hang

let us know if it helps

-Craig


-----Original Message-----
From: Thomas Haselwanter (JIRA) [mailto:jira@apache.org] 
Sent: Monday, 30 May 2011 3:18 PM
To: dev@pdfbox.apache.org
Subject: [jira] [Updated] (PDFBOX-1019) PDF conversion to image crashes the JVM


     [ https://issues.apache.org/jira/browse/PDFBOX-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Haselwanter updated PDFBOX-1019:
---------------------------------------

    Attachment: thumb.png

> 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


[jira] [Commented] (PDFBOX-1019) PDF conversion to image crashes the JVM

Posted by "Ismo Toroi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13083023#comment-13083023 ] 

Ismo Toroi commented on PDFBOX-1019:
------------------------------------

"Jun 28, 2011 3:58:15 PM org.apache.pdfbox.filter.FlateFilter decode 
SEVERE: Stop reading corrupt stream "

The error happens in the method convertToImage(): 

           PDPage page = (PDPage) pages.get(startPage); 
           PDPage page = (PDPage) pages.get(0); 
           try { 
                image = page.convertToImage(); 

i got this error from similar (pdfbox 1.6.0) convertToImage.. got it work with this:
(pseudo)
**main**
-open pdf
-get number of pages
-close pdf
-loop through pages(call function imagewriter send page number as parameter)
public void imagewriter(int something){
  - open pdf again.
  - get page from parameter something
  - convert it to image
  - save it or do whatever you want
  - cleanout and close all opened dippadaas
} // only one page at time and memory seems to be "cleared" at this point and no error is produced..

This is littlebit slower, but works :)

IT


> 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

        

[jira] [Commented] (PDFBOX-1019) PDF conversion to image crashes the JVM

Posted by "Adam Nichols (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13056882#comment-13056882 ] 

Adam Nichols commented on PDFBOX-1019:
--------------------------------------

Definitely looks lke a JVM bug!  I just ran that same JUnit test using OpenJDK and it did not crash.  Output is basically the same, but I'm including it for completeness.  If others can confirm that Oracle JVM fails and OpenJVM (or other non-Oracle JVMs) work, it would be appreciated.

For Ubuntu users (and probably any "apt" style distro of Linux), you can get the OpenJDK sdk like this: sudo apt-get install openjdk-6-source

For Netbeans users, you can add "--jdkhome /usr/lib/jvm/java-1.6.0-openjdk" (without the quotes) to the command line when you start Netbeans, or edit netbeans.conf (e.g. /usr/local/netbeans-6.9.1/etc/netbeans.conf) and set the netbeans_jdkhome variable accordingly.


Jun 28, 2011 4:21:50 PM org.apache.pdfbox.filter.FlateFilter decode
SEVERE: Stop reading corrupt stream
Jun 28, 2011 4:21:50 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <พ> from <Tahoma> to the default font
Jun 28, 2011 4:21:50 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ล> from <Tahoma> to the default font
Jun 28, 2011 4:21:50 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ั> from <Tahoma> to the default font
Jun 28, 2011 4:21:50 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ง> from <Tahoma> to the default font
Jun 28, 2011 4:21:50 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ร> from <Tahoma> to the default font
Jun 28, 2011 4:21:50 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ั> from <Tahoma> to the default font
Jun 28, 2011 4:21:50 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString
WARNING: Changing font on <ก> from <Tahoma> to the default font


> 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

       

[jira] [Commented] (PDFBOX-1019) PDF conversion to image crashes the JVM

Posted by "Adam Nichols (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13056875#comment-13056875 ] 

Adam Nichols commented on PDFBOX-1019:
--------------------------------------

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

       

[jira] [Commented] (PDFBOX-1019) PDF conversion to image crashes the JVM

Posted by "Lars Torunski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040655#comment-13040655 ] 

Lars Torunski commented on PDFBOX-1019:
---------------------------------------

JVM crashes are often Oracle Java problems.

> 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
>
> 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

[jira] [Commented] (PDFBOX-1019) PDF conversion to image crashes the JVM

Posted by "Thomas Haselwanter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13041025#comment-13041025 ] 

Thomas Haselwanter commented on PDFBOX-1019:
--------------------------------------------

Did some investigation at the weekend and found that PDFBox crash in "org.apache.pdfbox.pdmodel.font.PDSimpleFont" on line 312 - this is the call to "g2d.drawString....".
But it only seems to crach for fonts "CMR10" and "CMTI10", which leaves the first page of Petrs' pdf file as shown in the attached image.

Don't know enough about pdf to get further, but maybe this helps.

Thomas

> 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
>
> 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

[jira] [Issue Comment Edited] (PDFBOX-1019) PDF conversion to image crashes the JVM

Posted by "Adam Nichols (JIRA)" <ji...@apache.org>.
    [ 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

       

[jira] [Updated] (PDFBOX-1019) PDF conversion to image crashes the JVM

Posted by "Petr Knoth (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Petr Knoth updated PDFBOX-1019:
-------------------------------

    Description: 
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.

  was:
The file http://tie.open.ac.uk/256.pdf crashes the JVM durong 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.


> 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
>
> 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

[jira] [Commented] (PDFBOX-1019) PDF conversion to image crashes the JVM

Posted by "Craig Stires (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044512#comment-13044512 ] 

Craig Stires commented on PDFBOX-1019:
--------------------------------------

Had posted a possible related issue to the mailing list, but haven't seen if this helped resolve this issue

Try the patch from
https://issues.apache.org/jira/browse/PDFBOX-988

this may be the same issue of a font not having enough glyphs, and making the g2d.drawString crash or hang

see if that makes a difference for you, or not


> 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

[jira] [Issue Comment Edited] (PDFBOX-1019) PDF conversion to image crashes the JVM

Posted by "Hermann Schwärzler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040146#comment-13040146 ] 

Hermann Schwärzler edited comment on PDFBOX-1019 at 5/27/11 6:34 PM:
---------------------------------------------------------------------

We have the very same problem with pdfbox 1.4.0: Creating a jpeg from pdf fails at the same Assertion and tomcat needs a restart!
Unfortunately I cannot provide you with the pdf (at the moment) but it seems to be from a (la)tex source as well as the one from Petr.

      was (Author: hermann):
    We have the very same problem with pdfbox 1.4.0: Creating a jpeg from pdf fails at the same Assertion.
Unfortunately I cannot provide you with the pdf (at the moment) but it seems to be from a (la)tex source as well as the one from Petr.
  
> 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
>
> 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

[jira] [Commented] (PDFBOX-1019) PDF conversion to image crashes the JVM

Posted by "Hermann Schwärzler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040146#comment-13040146 ] 

Hermann Schwärzler commented on PDFBOX-1019:
--------------------------------------------

We have the very same problem with pdfbox 1.4.0: Creating a jpeg from pdf fails at the same Assertion.
Unfortunately I cannot provide you with the pdf (at the moment) but it seems to be from a (la)tex source as well as the one from Petr.

> 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
>
> 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

[jira] [Commented] (PDFBOX-1019) PDF conversion to image crashes the JVM

Posted by "Hermann Schwärzler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040375#comment-13040375 ] 

Hermann Schwärzler commented on PDFBOX-1019:
--------------------------------------------

Some more results of my investigations:
* The error is reproducable on the commanline by downloading pdfbox-app-1.5.0.jar and the pdf of Petr and running "java -jar pdfbox-app-1.5.0.jar PDFToImage 256.pdf"
* The error occurs with jdk1.5.0_11, jdk1.6.0_21 and jdk1.6.0_24 BUT DOES NOT OCCUR WITH OpenJDK (IcedTea6 1.8.7)!

So it seems to be a Sun JAVA problem?

> 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
>
> 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

[jira] [Updated] (PDFBOX-1019) PDF conversion to image crashes the JVM

Posted by "Thomas Haselwanter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Haselwanter updated PDFBOX-1019:
---------------------------------------

    Attachment: thumb.png

> 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