Stuck during compressing files

Oct 4, 2011 at 3:01 AM

I have a program works fine in Windows 7 X64. However, it will stop working in Windows Server 2003 R2. When this program starts up, it will pick up files that did not pick up last time and compress them. Then it will pick files in a particular time frame. It may works fine after some periods then stop. Sometime it stops during start up. Therefore, I add some trace messages in log file and find it stops during compressing file.

The program uses Ionic.Zip.dll with .Net 3.51

The log file is shown as following:


17:11:40 - 	Event timer: entring doFtp()
17:11:40 - 			ftp uploading files
17:11:40 - 				Zipping files
17:11:40 - 				Done zipping files
17:11:40 - 				Ready to upload files
17:11:40 - 				In background uploading files
17:11:40 - 			Done ftp uploading files
17:11:40 - 	Event timer: left doFtp()


The above log is a normal process


17:26:40 - 	Event timer: entring doFtp()
17:26:40 - 			ftp uploading files
17:26:40 - 				Zipping files

The above log is where the program stops working.

The portion of the code is shown as following

        public Zip(string zipFileName, string[] sourceFileNames, string folderName)
            using (ZipFile targetZip = new ZipFile())
                    targetZip.AlternateEncoding = Encoding.Default;
                    targetZip.AlternateEncodingUsage = ZipOption.AsNecessary;

                    targetZip.AddFiles(sourceFileNames, folderName);

                    m_status = true;
                catch (Ionic.Zip.ZipException ex)
                    m_status = false;
                catch (System.IO.IOException ex) // For sharing violation
                    m_status = false;

Also, when I check the DotNetZip-XXXXX.tmp with WinRar, at least one file's size is zero. I believe DotNetZip stucks in adding this particular file.

Any idea?

Oct 5, 2011 at 4:21 PM

I think there's a bug in DotNetZip.