[ 
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


Reply via email to