Jim Beveridge
Posts: 32
Joined: Wed May 10, 2006 10:54 pm

An error occurred during LZMA compression

I am using Advanced Installer in command line builds to simultaneously create several install packages by running multiple copies of AI in parallel. This has worked fine for at least a couple of years, but started failing when I upgraded to Version 14.

The problem seems to be that all copies of AI are using the same filename for LZMA compressed data, so they interfere with each other. For example:

Creating archive: C:\Proj\Installer\Archive\FILES.7z
An error occurred during LZMA compression (The handle is invalid. ).

I suspect that turning off LZMA compression may fix the problem, but I prefer to get the smaller archives.

Any suggestions?
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: An error occurred during LZMA compression

Hi,

I tested this, but I couldn't reproduce the problem. Can you please send me, to support at advancedinstaller dot com, some projects that produce the problem and a step by step test case scenario that I can follow in order to reproduce the behavior?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Jim Beveridge
Posts: 32
Joined: Wed May 10, 2006 10:54 pm

Re: An error occurred during LZMA compression

It's going to take me a while to do that, but in the meantime, you do this:

Simultaneously launch five separate installers in the same directory that have the same target directory. These installers need to create sizeable install packages (maybe 10MB) to make sure that compressing them actually takes some time.

Practically speaking, since AI uses the same filename for the lzma compression in all running builds, the problem is guaranteed to happen. (Since all installers write to the same target directory, then all installers use the same filename C:\Proj\Installer\Archive\FILES.7z)

It would be much better to use a different filename, or to create a randomly named subdirectory to contain the FILES.7z file.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: An error occurred during LZMA compression

Hi,

Errors will appear only if the MSI name and the EXE name is set to the same value for at least two projects in the "Builds" page. Of course, creating two packages with the same name in the same folder is not allowed. However, if different names are set for the MSI and EXE files of the packages, no error should appear.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Jim Beveridge
Posts: 32
Joined: Wed May 10, 2006 10:54 pm

Re: An error occurred during LZMA compression

Hello Eusebiu,

In your last reply, you said "However, if different names are set for the MSI and EXE files of the packages, no error should appear."

What you said is what I expect, but it is not true. Advanced Installer always uses the name FILES.7z for the LZMA compression, so multiple builds collide with each other. This is the problem that needs to be fixed.

My package are definitely set to different names.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: An error occurred during LZMA compression

Hello Jim,

Thank you for your follow up on this. I've tested the scenario and indeed the error is replicating when building simultaneously multiple projects (using LZMA compression) that have the same output location.

Please give me some time to debate this behavior with our development team and I'll get back to you once I have more insights on this.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: An error occurred during LZMA compression

Hello Jim,

After debating this scenario with our development team I can confirm you the behavior occurs due to a current limitation in our build operation design. You should avoid building in parallel any projects that might reference same files from disk or using the same build output path. Those synchronous build operations are not currently supported by our application.

We added an improvement on our list to add support for your reported scenario and hopefully it will be available in the future. We will notify you as soon as the improvement will be available.

Until then, as a workaround, you should configure all of your projects to use a different build output path. For instance you can create under the current output location an output sub-folder for each project .

Thank you for your understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”