3

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;
J...
  • 28,957
  • 5
  • 61
  • 128
spurgeon
  • 1,082
  • 11
  • 31

1 Answers1

3

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.

J...
  • 28,957
  • 5
  • 61
  • 128
  • Do you know where I can get the latest stable version? On GitHub (https://github.com/project-jedi/jcl), the master branch is the one I checked out originally, which is 2.8 Testing Build 5677 (at least that's what the installer GUI from running Install.bat says). The tag JCL-2.7-Build5676 is from Sep 2015. – spurgeon Aug 28 '17 at 17:21
  • @spurgeon JCL build number is days since Mar 1, 2000. Your checkout would have been from the day after the V2.7 tag. You can always find current information on the JCL wiki site. – J... Aug 28 '17 at 17:38
  • Thanks, it looks like I might be stuck then if I want the latest 7z.dll features (http://www.7-zip.org/history.txt), such as RAR5 support, which happens to extract fine with JCL 2.8 5677. It's just that other formats won't. JCL 2.4.1 is old... – spurgeon Aug 28 '17 at 17:43
  • @spurgeon Well, I would definitely try the current daily build first. A fresh checkout should give you build 6389. I think there were big changes in the v9.x -> v15+ update for 7Zip. The new build with V15.12 support may likely work wtih V16.04 also. – J... Aug 28 '17 at 17:45
  • Thanks, will take a look at that and see what I find. – spurgeon Aug 28 '17 at 23:09
  • I was not able to get 7-Zip 15.12 or 16.04 to work with the latest JCL build. It looks like I'll need to stick with an older stable version for now. For the record, the latest JCL build still appears to work with 7-Zip 9.20, at least for all of my archive extraction test cases with ~25 archive formats. – spurgeon Aug 29 '17 at 13:54