JVM Crash While Saving Document

I’m running on a linux machine with Java 1.7 and when I do a document.save it crashes the JVM:

#

# A fatal error has been detected by the Java Runtime Environment:

#

# SIGSEGV (0xb) at pc=0x00007f38c4cfc125, pid=3586, tid=139881612551936

#

# JRE version: OpenJDK Runtime Environment (7.0_111-b01) (build 1.7.0_111-mockbuild_2016_07_27_10_50-b00)

# Java VM: OpenJDK 64-Bit Server VM (24.111-b01 mixed mode linux-amd64 compressed oops)

# Derivative: IcedTea 2.6.7

# Distribution: CentOS Linux release 7.2.1511 (Core) , package rhel-2.6.7.2.el7_2-x86_64 u111-b01

# Problematic frame:

# V [libjvm.so+0x824125]

#

# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try “ulimit -c unlimited” before starting Java again

#

# An error report file with more information is saved as:

# /tmp/jvm-3586/hs_error.log

#

# If you would like to submit a bug report, please include

# instructions on how to reproduce the bug and visit:

# http://icedtea.classpath.org/bugzilla

#

Here is the code I’m running:

log.debug("Starting pdf conversion on file " + infile + “.”);

Document doc = null;

log.debug(‘1’);

ByteArrayOutputStream outStream = null;

log.debug(‘2’);

try {

doc = new Document(infile);

log.debug(‘3’);

outStream = new ByteArrayOutputStream();

log.debug(‘4’);

doc.save(outStream, new DocSaveOptions());

log.debug(‘5’);

doc.close();

log.debug(‘6’);

} catch (Exception e) {

log.error(e.getMessage(), e);

return null;

} finally {

if (doc != null) {

doc.close();

}

}

long endTime = System.currentTimeMillis();

String out = String.format(“Done converting %s to %s in %.3f seconds.”, infile, outfile, ((endTime - startTime) / 1000.f));

It is crashing after printing out ‘4’ and it happens every time I try to do a save. Any help would be appreciated. Thanks in advance.

Hi Domenick,


Thanks for using our API’s.

Can you please share if the problem is occurring for all the documents or its appearing for some specific documents. If its related to specific set of document, please share the resource files, so that we can further look into this requirement.

We are sorry for this inconvenience.

We upgraded to Java 8 and it fixed the issue. It was built with Java 7 and ran fine on our Windows systems under Java 7 as well.


And to answer your question, it was appearing for all documents.

Hi Domenick,


Thanks for the acknowledgement.

We are glad to hear that your problem is resolved. Please continue using our API’s and in the event of any further query, please feel free to contact.

PS, we have customers using our API with JDK 7 and JDK 8.