Issue with Aspose.Zip getting blocked indefinitely on PPMD Compressed zip archive

We are using Aspose.Zip v25.3 for Java to read data from ZIP files. However, we’ve encountered a specific archive where Aspose appears to block indefinitely during extraction.

I’ve tested both archiveEntry.extract() and archiveEntry.open() methods, and in both cases, the operation never completes. This issue seems to occur specifically with archives using PPMD compression. When the same archive is created using the Deflate compression method, it works as expected.

To help reproduce the issue, I’ve attached the source code used for extraction along with the sample ZIP file

Please let me know if you need any additional details.

FYI we are using a licensed version of Aspose.Zip.

Until this issue is resolved, is there a way to set a timeout in Aspose.Zip for operations like extract() or open() to prevent indefinite blocking?

aspose-zip.zip (978.9 KB)

@harsh7031
We were able to reproduce the issue on our end.
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): ZIPJAVA-223

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.

1 Like

Hello @harsh7031
You mentioned a timeout to limit the time may be spent on entry extraction. We don’t have such a feature yet, but we might provide it in the future. Below are some considerations to review.

As for zip composition, we allow to cancel an archive creation after the certain entry handling the entry compressed event. It supports cancellation by timeout. When cancelled, the result archive will still be valid.
For the extraction progress, we support a non-cancellable event. Interrupting the extraction process will produce a broken file, which is why ExtractionProgressed does not provide the ability to cancel. Do you really want this event to be cancellable, even after the PPMd hanging problem to be resolved?

Hi @Eugene.Shashkov
It would be helpful if there’s a way to cancel this event, even after the PPMd hanging issue is resolved. This would allow us to handle any future cases where a different type of file might cause the process to hang. That way, we can skip the problematic file and continue processing the rest, preventing the entire workflow from getting blocked indefinitely.

Okay, this feature may arrive in the May version or later.

The issues you have found earlier (filed as ZIPJAVA-223) have been fixed in this update.
Download link: Aspose.ZIP for Java