Archive: lzma compression no worky?


lzma compression no worky?
I've got an installer I've been making recently that uses lzma compression. Only recently every time I try to make said installer I get the following result from makensis trying to build the script...

Error: deflateToFile: deflate() failed(-4 input/output error) Error - aborting creation process

Wha happen?


No thoughts? Anyone? I'm curious because this problem is fairly important for me.


out of space on the drive that contains the temp dir?


Doubt it but not a bad guess. I've got about 2GB worth of free space on the drive I'm using.


There was a problem with clzma.cpp that caused it to return LZMA_IO_ERROR (the error you're seeing) instead of LZMA_THREAD_ERROR. I've attached the new fixed version. If you have a compiler, please recompile with it and let me know if the error is still LZMA_IO_ERROR.

Now, time for some details. Which version of NSIS are you using? Have you compiled makensis.exe on your own? Does it happen only with that specific installer or with others too? Do you get a similar error with bzip2 or zlib compression?


Compiled it. Tried it. Works. You're the King kichik. In responses to your questions...

-The version I'm using is daily snapshot 2.04 build 22. I believe I installed it on January 6th.

-Never compile makensis except for testing the file you attached. I usually just run the daily snapshot installer.

-I haven't tried many other installers with it. I don't have any other installers I can test with. The only minor tests I've done is to eliminate all the files except for license files to be included in the installer so there's only script code and that works fine.

-The problem only occurs with lzma. bzip2 and zlib seem to work fine, they've never failed for me so I've always been happy to have them as alternatives.

Once again kichik thanks very much! If you need any more details I am at your disposal.


Well... Hmm... It wasn't supposed to fix it. Recompiling probably just hid the problem. Does the problem still go away if you recompile with the old version of clzma.cpp? You can test it with the examples that come with NSIS. makensis.nsi uses lzma too and contains more than one file. It should be a good example.

BTW, Build 22 is 2.04 :)


Heh, seems I've been updating build numbers for nothing. It's not even used if it's not the same major, minor and revision version. It will be zero for 2.05 :)


Originally posted by kichik
Well... Hmm... It wasn't supposed to fix it. Recompiling probably just hid the problem. Does the problem still go away if you recompile with the old version of clzma.cpp? You can test it with the examples that come with NSIS. makensis.nsi uses lzma too and contains more than one file. It should be a good example.

BTW, Build 22 is 2.04 :)
Conveniently rebuilding using the non modified clzma.cpp does work as well.

That's weird... Does the original makensis.exe work now too?


It appears to be working off and on now with the original now. I don't know what to say. So far I've had more luck using the rebuilt source.


Maybe there really is an IO error. Does it happen on other computers?


I'll be trying that next week, we'll see. Thanks for all your help kichik.


Seems to be working fine on other machines. Could be the error was valid. Anyways I'm happy I've got some alternatives if anything goes wrong again. Thanks for your help kichik.


If it doesn't happen on other machines, it might be the memory - lzma uses a lot of it. Try testing your memory with memtest86.


So I open up my work computer to take a look that everythings working properly and it turns out some of the capacitors on the motherboard are starting to melt. That's the best way I can think of to describe it. There is some sort of substance being emitted from the capacitors.

Anyways after discovering that I switched to a new (and conveniently faster) machine and am back making installers with good old lzma compression. Just like the good times again. I don't think memory was the problem, likely it was some kind of issue with the motherboard.


Right, melted capacitors are a no-go with lzma. I'll have to remember that :)

Congratulations on your new computer :)


The capacitors havent melted.

Theyre cheapo capacitors from Taiwan and use a Water based Electrotyte.

The Electrotyte is incomplete, and thus they release Hydrogen in use. This makes them bulge and eventually pop.

EDIT: Spelling


Thanks for the exaplanation HG, that's pretty much what I saw.


Off-topic - dodgy caps

Replace the caps and the board will work perfectly again. I've recovered upwards of 50 boards that way.

The caps that go, in my experience, are usually the 6.3V, 1000 microfarad ones, those that haven't popped will in time.

You've got nothing to lose, anyway.


That's true but I ain't no electrical engineer and the boards not mine, it's my companies. It's a good idea for sure but I don't know if it'll happen. Thanks for the idea though.