Stuck during compressing files

Oct 4, 2011 at 4: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 1.9.1.8 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())
            {
                try
                {
                    targetZip.AlternateEncoding = Encoding.Default;
                    targetZip.AlternateEncodingUsage = ZipOption.AsNecessary;

                    targetZip.AddFiles(sourceFileNames, folderName);
                    targetZip.Save(zipFileName);

                    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?

Coordinator
Oct 5, 2011 at 5:21 PM

I think there's a bug in DotNetZip.