1
Vote

The execution has failed due to the bug in the SevenZipSharp

description

The execution has failed due to the bug in the SevenZipSharp.
Please report about it to http://sevenzipsharp.codeplex.com/WorkItem/List.aspx, post the release number and attach the archive.
 
 
While running a multithreaded batch process to zip up files I keep getting the above exception. I am using the code below. It does not matter if I add the "mt" attribute or not I keep getting the errors. Attached is also a sample of archives that start to be created and fail.
 
Works fine when testing a small collection of files.
 
Any solutions/workarounds would be very much appreciated.
 
Thank you
 

 

 
    public void PerformCompression(MemoryStream inStream, FileStream outStream)
    {
        var compressor = new SevenZipCompressor
                             {
                                 CompressionMethod = CompressionMethod.Lzma2,
                                 CompressionMode = CompressionMode.Create,
                                 ArchiveFormat = OutArchiveFormat.SevenZip,
                                 FastCompression = false
                             };
 
        compressor.CustomParameters.Add("mt", "on"); 
        compressor.CompressStream(inStream, outStream);
    }

file attachments

comments

miloTheGreat wrote Nov 11, 2011 at 12:25 PM

Also getting this error, updates anyone?

miloTheGreat wrote Nov 11, 2011 at 12:52 PM

OK, after downloading source and referencing directly, I'm getting: -

Out of memory exception in StreamWeappers.cs

public int Write(byte[] data, uint size, IntPtr processedSize)
    {
        BaseStream.Write(data, 0, (int) size);         <----- this line.
        if (processedSize != IntPtr.Zero)
        {
            Marshal.WriteInt32(processedSize, (int) size);
        }
        OnBytesWritten(new IntEventArgs((int) size));
        return 0;
    }

data is 65536 in length, size is 65536 and processedSize is 123392876


I'm doing a large-ish compression with multiple compress files within the archive. I've used the CompressFiles method straight to a MemoryStream to counter this, however it looks like the buffering is over flowing into memory.

Hope this helps...

miloTheGreat wrote Nov 11, 2011 at 1:11 PM

This is running on a 64bit machine but running inside VS2010 with a platform of x86.

wrote Feb 22, 2013 at 1:16 AM