Aspose 9.0.0 and 9.1.0 gets stuck in an infinite loop

Hi,


we are trying to convert the first and only page if this PDF to an image, but Aspose gets stuck in an infinite loop.

Stack trace:
at java.awt.geom.Path2D$Float.moveTo(Path2D.java:338)
- locked <0x00000000a23af9d8> (a java.awt.geom.GeneralPath)
at com.aspose.ms.core.c.b.j.a(Unknown Source)
at com.aspose.ms.core.c.c.c.c(Unknown Source)
at com.aspose.ms.core.c.b.f.W(Unknown Source)
at com.aspose.ms.core.c.b.f.a(Unknown Source)
at com.aspose.ms.core.c.b.f.b(Unknown Source)
at com.aspose.ms.core.c.b.b.g(Unknown Source)
at com.aspose.ms.core.c.b.b.h(Unknown Source)
at com.aspose.ms.core.c.b.b.b(Unknown Source)
at com.aspose.ms.core.c.b.h.a(Unknown Source)
at com.aspose.ms.core.c.b.h.b(Unknown Source)
at com.aspose.ms.core.c.b.h.a(Unknown Source)
at com.aspose.ms.core.c.b.h.a(Unknown Source)
at com.aspose.ms.core.c.b.a.createStrokedShape(Unknown Source)
at com.aspose.ms.System.d.af.c(Unknown Source)
at com.aspose.ms.System.d.b.x.a(Unknown Source)
at com.aspose.ms.System.d.b.x.a(Unknown Source)
at com.aspose.ms.System.d.b.x.a(Unknown Source)
at com.aspose.ms.System.d.b.x.b(Unknown Source)
at com.aspose.ms.System.d.u.b(Unknown Source)
at com.aspose.pdf.b.k.b.h.a(Unknown Source)
at com.aspose.pdf.b.k.l.b(Unknown Source)
at com.aspose.pdf.b.k.l.dmv(Unknown Source)
at com.aspose.pdf.b.c.e.b.i.j.a(Unknown Source)
at com.aspose.pdf.b.c.e.b.c.ai.g(Unknown Source)
at com.aspose.pdf.b.c.e.b.c.ai.f(Unknown Source)
at com.aspose.pdf.b.c.e.b.c.k.b(Unknown Source)
at com.aspose.pdf.b.c.e.b.c.k.a(Unknown Source)
at com.aspose.pdf.devices.d.a(Unknown Source)
- locked <0x00000000a23be438> (a com.aspose.pdf.Document)
at com.aspose.pdf.devices.d.cTE(Unknown Source)
at com.aspose.pdf.devices.ImageDevice.p(Unknown Source)
at com.aspose.pdf.devices.JpegDevice.processInternal(Unknown Source)
at com.aspose.pdf.facades.PdfConverter.getNextImage(Unknown Source)
at com.aspose.pdf.facades.PdfConverter.getNextImage(Unknown Source)

With the following code:

final PdfConverter converter = new PdfConverter();
converter.bindPdf(new ByteArrayInputStream(bytes));
converter.setStartPage(1);
converter.setEndPage(1);
converter.doConvert();

final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
converter.getNextImage(outputStream);

Any advice? getNextImage() never seems to return, at least not within 20-30 minutes.

We have now been forced to perform all image conversions in separate worker threads, that we attempt to stop() (Thread#stop()) if Aspose doesn’t return within a specified timeout. But this is an enormous hack.


It’s of course accetable that Aspose can’t convert all PDFs, but to get stuck in an infinite loop is not.

Hi Matthias,

Thanks for using our API’s.

I have tested the scenario and I am able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFNEWJAVA-34297. We will investigate this issue in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.

The issues you have found earlier (filed as PDFNEWJAVA-34297) have been fixed in Aspose.Pdf for Java 10.3.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
(1)