SevenZipSharp
                                
                                 SevenZipSharp copied to clipboard
                                
                                    SevenZipSharp copied to clipboard
                            
                            
                            
                        SevenZipExtractor.ExtractArchive() hangs when the path is too long
Dear Community,
I just recognized that the version 1.0.19.0 simply hangs at SevenZipExtractor.ExtractArchive(), when the path is too long, there is no exception, the function just never returns. In a former version there was a PathToLongException. Has anyone an idea how to prevent hanging?
Thanks and best regards, Jürgen
I'm not sure where you're getting version 1.0.19.0 from, that's not a version I have released. With the current dev I get a PathTooLongException if I try to extract a file which ends up with an excessive filepath.
I even added a test to ensure this is the case: af7c95d6a088fbfa1d5d05fbcd6f980c500af970
Thanks for your quick Reply. I just saw that I was using the NuGet package "SevenZipSharp.Net45" from https://github.com/tomap/SevenZipSharp
But now I updated to Squid-Box.SevenZipSharp. The DLLs are:
- SevenZipSharp.dll (1.2.219.0 / 19.09.2019 / 1808384 Bytes)
- 7z64.dll (18.5.0.0 / 20.09.2019 / 1677824 Bytes) (I downloaded this one from https://github.com/squid-box/SevenZipSharp/blob/dev/SevenZip/7z64.dll)
I have the same behaviour. BUT, I just recognized that this is depending on the 7z file Content. I have two times the same zip file in different subdirectories inside of the 7z file. Depending on the Content inside the zip file I still can reproduce the "hanging". The Problem is, as soon as I remove some confidential files inside the zip, the hanging does not appear, but I get the expected PathTooLong Exception. So I cannot give you the 7z file for analysing. I think you can close this issue.
Thanks!
If you figure out how to reproduce it in some non-confidential way, please get back to me and I'll try to fix it - otherwise I hoe you find a way around it :)
Dear Squid-Box,
I have the issue again, and now I was able to create a demo 7z which you can use for analyzing: https://www.easylogix.de/download/Examples/TestZip.7z
I try to extract those files to: "C:\Users\xxx\AppData\Local\Temp\ZipContent_637054495609715372"
The Problem seems not to be a too long path, but if there is a zip inside the 7z, the extraction process hangs if the zip has too many files or maybe is too large, hard to distinguish.
It would be nice if you could check this.
Thanks and best regards, Jürgen
Dear Joel,
did you already had the chance to take a look on this issue? Would be really great to find a solution...
Thanks and best regards, Jürgen
Hi @Juergen1980, unfortunately I've been very busy with real life things. I'll try to have a look at it this weekend but can't promise anything.
Thank you for providing an archive!
Edit: Actually, just doing a simple extraction with the provided archive works fine (first extracting the two zips and then in turn extracting their contents), only it takes a while (~17 seconds).
What code are you using to extract the archive?
Hi there,
same issue here. Excuse my english
Created C:\demo.demo.demo\demo.demo.demo\demo.demo.demo\demo.demo.demo\ as Destination Directory and try to extract Juergen1980 archiv.

StreamWrapper stucks at position 262144 and infinity loop results in Deadlock.
images.zip was retrieved zip_67305... cant extracted...
hope someone can fix this...
Dear Joel,
I just use "SevenZipExtractor.ExtractArchive()" for the given file to extract it to "C:\Users\xxx\AppData\Local\Temp\ZipContent_637054495609715372"
Did you have the Chance to take a look at oiisamiio comment?
Best regards, Jürgen
A fatal error, which prevents the productive use of the library.