Aspose Team,
We use the Aspose Image java package to load tiff file and count the pages, and found out that it crashes the program (or the JVM) in production environment with the sample file.
Note that we cannot reproduce the problem in non-production environment.
Following is the sample code. I failed to upload the sample file (24 MB) because it is too larger.
The operating system is Ubuntu 20.04. Java version is 21. Aspose Image java packages is 24.2.
Hello @xyang
Thank you, I downloaded it. But as I can see the sample.zip contains a PDF file 95363.cgi.pdf but in your example, there is a TIFF file named aio_converted.tif. Are you sure that you sent me what you intended to send?
Aspose.Imaging can not load PDF it can only export into PDF.
@xyang
This issue can be reproduced in Windows/Ubuntu with Java 21. With Java 17 there is no problem.
We create a new ticket for investigation.
PS:
A little trick - the best way to get known the page count is to call method tiff.getPageCount() instead of tiff.getFrames().length.
@xyang
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): IMAGINGJAVA-8702
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
I also reproduced the problem with the sample code with java 21 in ubuntu. I actually used java 17 previously and failed to reproduce it with the sample code.