[
  {
    "Id": "961274",
    "ThreadId": "409732",
    "Html": "\r\n<p>Hi all,&nbsp;</p>\r\n<p>I am writting a small backup utility, where i want the ability to zip directories containng the backup. Sometimes, but not alway the zipping never returns. And I am wondering why. I am developing on vs 2005 with .NET 2.0 SP1.</p>\r\n<p>It is always the same file that causes the problem, it is name&nbsp;CameraServer.exe_ and has the size of 5148 kb. I have other files that can have filetypes that end on underscore charecter. and they zip nicely.</p>\r\n<p>Does anyone have any clues?&nbsp;</p>\r\n<p>string zipfilename = folder.FullName &#43; @&quot;.zip&quot;; &nbsp; &nbsp; &nbsp;&nbsp;<br>\r\nusing ( ZipFile zip = new ZipFile(zipfilename) ) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br>\r\n//...&nbsp;<br>\r\n&nbsp; &nbsp; &nbsp; zip.AddDirectory(folder.FullName); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>\r\n&nbsp; &nbsp; &nbsp; zip.Save(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>\r\n//...&nbsp;<br>\r\n}</p>\r\n<p>Call stak from the background worker thread that does the zipping, and have&nbsp;previously copied&nbsp;the files.</p>\r\n<p>[In a sleep, wait, or join]<br>\r\nSystem.Threading.WaitHandle.WaitOne &nbsp; <br>\r\nSystem.Threading.WaitHandle.WaitOne &nbsp; <br>\r\nSystem.Threading.WaitHandle.WaitOne &nbsp; Ionic.Zlib.ParallelDeflateOutputStream.EmitPendingBuffers &nbsp; Ionic.Zlib.ParallelDeflateOutputStream.Write &nbsp;\r\n<br>\r\nIonic.Crc.CrcCalculatorStream.Write &nbsp; <br>\r\nIonic.Zip.ZipEntry._WriteEntryData &nbsp; <br>\r\nIonic.Zip.ZipEntry.Write &nbsp; <br>\r\nIonic.Zip.ZipFile.Save <br>\r\nCapres.Backup.BackupController.ZipBackup C#&nbsp; <br>\r\nCapres.Backup.BackupController.Backup C#</p>\r\n",
    "PostedDate": "2012-12-20T04:39:43.943-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "984386",
    "ThreadId": "409732",
    "Html": "\r\n<p>Hello,</p>\r\n<p>&nbsp;</p>\r\n<p>Looking at the stack trace, the only thing I can think of that can couse your problem would be that it enters a deadlock.</p>\r\n<p>Try putting</p>\r\n<p><span><span></span></span></p>\r\n<div style=\"color:black; background-color:white\">\r\n<pre>zip.ParallelDeflateThreshold = -1\r\n\r\n...\r\n\r\nzip.Save().\r\n</pre>\r\n</div>\r\n<p><span></span></p>\r\n<p>&nbsp;</p>\r\n<p><span>Best regards,</span></p>\r\n<p><span>Silviu.</span></p>\r\n",
    "PostedDate": "2013-01-09T02:08:08.047-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]