I have used JclCompression with the 32-bit version of 7z.dll 9.20 for quite a while and have recently tried to upgrade to a more recent version (16.04). With the update in 7z.dll versions, I am unable to extract Bzip2 archives or tarballs (.tgz), as well as some other formats. Is there something that changed with 7z.dll between 9.20 and 16.4 that would cause this?
I also tried 7z.dll from 9.38 and 15.14 but ran into the same issue.
More details:
- Delphi XE3
- JCL 2.8 Testing Build 5677
- 7z.dll from 7z1604.exe (32-bit)
- Any .bz2 file I've tried gives me the following error:
First chance exception at $0040D523. Exception class $C0000094 with message 'integer divide by zero at 0x0040d523'.
Debug Output: Exception:Catastrophic failure Process myapp.exe (2400)
I've followed the extraction code on this post. Here's my thread's procedure for extraction where I see the error:
procedure TExtractThread.Execute();
begin
if FArchive.ItemCount > 0 then
begin
FArchive.OnProgress := ArchiveProgress;
FExtractionError := False;
try
FArchive.ExtractAll(FOutputDir);
except on E: Exception do
begin
FExtractionError := True;
OutputDebugString(pchar('Exception:'+E.Message));
end;
end;
end;
end;
7zip was in alpha/beta mode for years after v9.20 (2010). The first subsequent stable release was V15.12 (Nov 2015) which came out several months after the JCL version you are using was released (2.8 Testing Build 5677, Sep 2015). Support for 7z.dll version 15.14 was added Jan 3, 2016. There does not seem to be any further updates checked in for newer DLL versions than this. If you want to use a newer version of 7Zip you should probably update your JCL to a current version.
If you don't want to be testing beta or daily builds then the current stable JCL release (V2.4.1) is distributed with 7z.dll version 9.22 and you should stick with that if you need reliability more than any new features that have been introduced in the meantime.