Important threading issue - Extracting in 5 threads

Jan 30, 2014 at 12:57 PM
I have tried to integrate your SevenZipSharp library into my windows service and I have a lot of trouble related to threading.

When I use the library in a single thread environment, it work perfectly. As soon as I try to use it with thread ( using TPL in C# 4 ), it start to failed all over the place.

So, I return back to you Test Program and use the Multi-threaded extraction test examples that you give. Running it a couple of times, and it also failed.

Example of error that occurs are :
On this line :
using (var tmp = new SevenZipExtractor(@"D:\AutomatedBuild\LotOfFiles_2.zip")) Error : {"An item with the same key has already been added."}
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary
2.Add(TKey key, TValue value)
at SevenZip.SevenZipLibraryManager.InitUserInFormat(Object user, InArchiveFormat format)
at SevenZip.SevenZipLibraryManager.LoadLibrary(Object user, Enum format)
at SevenZip.SevenZipExtractor.Init(String archiveFullName)
at SevenZip.SevenZipExtractor..ctor(String archiveFullName)
at ConsoleApplication33.Program.<Main>b__3() in c:\users\sebastien.maisonneuv\documents\visual studio 2010\Projects\ConsoleApplication33\ConsoleApplication33\Program.cs:line 35
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Any one have any idea of what I'm doing wrong ??
Jan 31, 2014 at 11:01 AM
Does this project continue to be alive or is now dead ? I don't see a lot of activity in it. Does anybody have idea to help me use this library, I need this fast, otherwise I will switch to something else. But this one was good... I need extraction of both zip and rar and 7z. And not a lot of library do this.
Feb 11, 2014 at 11:19 AM
I received an inquiry from another developer who asked a question quite similar to yours. I will try and answer you and so others will understand as well..

SevenZipSharp newest release was actually a number of years ago. If you read the correspondence you will eventually realize that there has been no new development for this library for several years. The fellow who wrote this library has apparently lost interest. I wrote him several times on matters he should have been happy to respond to, but he did not reply.

Thus, understand that the fellow who developed this library is not working in association with the fellow who is maintaining and at times adding new features to 7Zip. No one here will be able to answer your question because they have not been active with this product for several years. That being said, this library is a safe library to use for compressing and unzipping archives. But you must be realistic. Without anyone running this project any more, be prepared to be disappointed.

In answer to your question, yes, the library had or has considerable potential. I am using it myself but ran into a number of roadblocks where features that should have been there and even that were claimed to be there, were not there. Consequently, I then decided to use DotNetZip, and found once again some problems and it too appears to no longer be really supported either. Subsequently, for my project I am now using actually BOTH libraries, but in a more limited way then I would have like were either of these products still being supported - which they are not. You will find that you will be able to do the necessary things, but beyond that be prepared to write a lot of code yourself.

Sincerely,

Pastor Burt
Feb 11, 2014 at 11:28 AM
A big thank you Pastor Burt to have answer my question !

I am currently using SharpZipLib which work pretty well actually. But it only support .zip file, not rar files.

Unfortunately I am not in a position to use a library that is no more supported. I am sorry to see that SevenZipSharp is no more supported, since it was able to support more type of compression, which I need. But without support, it's not an option. I will probably go with the command-line 7zip directly for the rar file.


Thanks for your information !
Feb 11, 2014 at 10:18 PM
I also too have the Sharp Library but am withdrawing it. It TOO is no longer supported by anyone. Using command line is a good option, but I need more functionality. SevenZipLib is ok, to be used sparingly. My hope is that it does not go completely South by the time Windows 9 comes out. Then I will be screwed. Let me be clear about this. That fellow who use to behind the SevenZipLib did not respond to me. Thus, I decided to respond truthfully to you. Now if he doesn't like that or doesn't want to have his product labeled as DEAD, then he is going to have to in writing come out and contradict what I wrote. In other words, he no longer can ignore those of us who otherwise wish to use his library. If he doesn't reply - which I think he won't - then the product is exactly as I described to you - no longer supported. Sincerely, Pastor Burt On 2/11/2014 8:28 PM, hockeymtl555 wrote: > > From: hockeymtl555 > > A big thank you Pastor Burt to have answer my question ! > > I am currently using SharpZipLib which work pretty well actually. But > it only support .zip file, not rar files. > > Unfortunately I am not in a position to use a library that is no more > supported. I am sorry to see that SevenZipSharp is no more supported, > since it was able to support more type of compression, which I need. > But without support, it's not an option. I will probably go with the > command-line 7zip directly for the rar file. > > > Thanks for your information ! > > Read the full discussion online > . > > To add a post to this discussion, reply to this email > ([email removed] > ) > > To start a new discussion for this project, email > [email removed] > > > You are receiving this email because you subscribed to this discussion > on CodePlex. You can unsubscribe or change your settings > > on codePlex.com. > > Please note: Images and attachments will be removed from emails. Any > posts to this discussion will also be available online at codeplex.com > > No virus found in this message. > Checked by AVG - www.avg.com > Version: 2014.0.4259 / Virus Database: 3697/7083 - Release Date: 02/11/14 > -- *Pastor Burt Wilkins* *Auto Shutdown Pro* Miralhens Apartment, Apartment A, Jupiter Street, San Felipe Subdivision, Mojon District, 3000 Malolos City, Bulacan http://www.AutoShutdownPro.com http://www.AutoShutdownFree.com Email: [email removed] Philippine phone to the US: *(951)530-9138 *Philippines Phone: (912)738-3132 Local Philippines Land Line: +63-44-796-3629 I also too have the Sharp Library but am withdrawing it. It TOO is no longer supported by anyone.

Using command line is a good option, but I need more functionality.

SevenZipLib is ok, to be used sparingly. My hope is that it does not go completely South by the time Windows 9 comes out. Then I will be screwed.

Let me be clear about this. That fellow who use to behind the SevenZipLib did not respond to me. Thus, I decided to respond truthfully to you. Now if he doesn't like that or doesn't want to have his product labeled as DEAD, then he is going to have to in writing come out and contradict what I wrote. In other words, he no longer can ignore those of us who otherwise wish to use his library. If he doesn't reply - which I think he won't - then the product is exactly as I described to you - no longer supported.

Sincerely,

Pastor Burt


On 2/11/2014 8:28 PM, hockeymtl555 wrote:

Pastor Burt Wilkins

Auto Shutdown Pro

Miralhens Apartment, Apartment A,

Jupiter Street, San Felipe Subdivision,

Mojon District, 3000 Malolos City, Bulacan

http://www.AutoShutdownPro.com

http://www.AutoShutdownFree.com

Email: [email removed]

Philippine phone to the US: (951)530-9138
Philippines Phone: (912)738-3132
Local Philippines Land Line: +63-44-796-3629

Feb 21, 2014 at 9:48 AM
Dear HockeyMTI555: I am emailing you to now thank you. I have been working on a zipping program for some time. I have tried many approaches or libraries looking for the best. I thought I had the BEST approach at last defined and was hopeful development could go forward with more results and a solid blueprint for completion. You email and decision to go to "/command-line 7zip directly for the rar file/" caused me to pause. I was not attracted to this, so I had not tried this approach. But the more I considered your response, I came to conclude that possibly it would be a workable solution. Consequently, I tried it and was quite satisfied. You were right, and I am pleased with the result. Consequently, I too am abandoning both SevenZipSharp and DotNetLib. There were so many things wrong with SevenZipSharp that forced me to compromise, I just was not happy with it. So far the direct 7Zip approach has been able to succeed where SevenZipSharp failed. The DotNetLib approach did work well, but it was limited only to Zip and nothing else. The Command Line approach, which I have tested, has the ability to have a unified approach that will work with a variety of the archives, and this I like. Thank you for your response as well. It caused me to second guess my conclusions and this time the results appear to be very positive. I very much appreciate your second set of eyes. Sincerely, Pastor Burt On 2/11/2014 8:28 PM, hockeymtl555 wrote: > > From: hockeymtl555 > > A big thank you Pastor Burt to have answer my question ! > > I am currently using SharpZipLib which work pretty well actually. But > it only support .zip file, not rar files. > > Unfortunately I am not in a position to use a library that is no more > supported. I am sorry to see that SevenZipSharp is no more supported, > since it was able to support more type of compression, which I need. > But without support, it's not an option. I will probably go with the > command-line 7zip directly for the rar file. > > > Thanks for your information ! > > Read the full discussion online > . > > To add a post to this discussion, reply to this email > ([email removed] > ) > > To start a new discussion for this project, email > [email removed] > > > You are receiving this email because you subscribed to this discussion > on CodePlex. You can unsubscribe or change your settings > > on codePlex.com. > > Please note: Images and attachments will be removed from emails. Any > posts to this discussion will also be available online at codeplex.com > > No virus found in this message. > Checked by AVG - www.avg.com > Version: 2014.0.4259 / Virus Database: 3697/7083 - Release Date: 02/11/14 > -- *Pastor Burt Wilkins* *Auto Shutdown Pro* Miralhens Apartment, Apartment A, Jupiter Street, San Felipe Subdivision, Mojon District, 3000 Malolos City, Bulacan http://www.AutoShutdownPro.com http://www.AutoShutdownFree.com Email: [email removed] Philippine phone to the US: *(951)530-9138 *Philippines Phone: (912)738-3132 Local Philippines Land Line: +63-44-796-3629 Dear HockeyMTI555:

I am emailing you to now thank you. I have been working on a zipping program for some time. I have tried many approaches or libraries looking for the best.

I thought I had the BEST approach at last defined and was hopeful development could go forward with more results and a solid blueprint for completion.

You email and decision to go to "command-line 7zip directly for the rar file" caused me to pause. I was not attracted to this, so I had not tried this approach. But the more I considered your response, I came to conclude that possibly it would be a workable solution. Consequently, I tried it and was quite satisfied.

You were right, and I am pleased with the result. Consequently, I too am abandoning both SevenZipSharp and DotNetLib. There were so many things wrong with SevenZipSharp that forced me to compromise, I just was not happy with it. So far the direct 7Zip approach has been able to succeed where SevenZipSharp failed. The DotNetLib approach did work well, but it was limited only to Zip and nothing else. The Command Line approach, which I have tested, has the ability to have a unified approach that will work with a variety of the archives, and this I like.

Thank you for your response as well. It caused me to second guess my conclusions and this time the results appear to be very positive. I very much appreciate your second set of eyes.

Sincerely,

Pastor Burt



On 2/11/2014 8:28 PM, hockeymtl555 wrote:

Pastor Burt Wilkins

Auto Shutdown Pro

Miralhens Apartment, Apartment A,

Jupiter Street, San Felipe Subdivision,

Mojon District, 3000 Malolos City, Bulacan

http://www.AutoShutdownPro.com

http://www.AutoShutdownFree.com

Email: [email removed]

Philippine phone to the US: (951)530-9138
Philippines Phone: (912)738-3132
Local Philippines Land Line: +63-44-796-3629