[
  {
    "Id": "433350",
    "ThreadId": "209967",
    "Html": "<p>First off, I just want to tell you want a great product you have here. I am using your library in a multithreaded application where each thread creates its own instance of a ZipOutputStream. The problem I see is that execution wise everything seems to be working, but one of the output files does not seem to be created. That is I cannot see the file in explorer; but, if I trace through the with the debugger, it seems like the calls to Write, etc. are working. The&nbsp;files created on other threads seem to be working just fine. Even when the file is finally close, it still shows nothing. The other wierd thing is it does not seem to happen 100 percent of the time.</p>\r\n<p>When I first started to&nbsp;try out your lib, I asked you about multithreading&nbsp;and you stated it should work fine if each&nbsp;thread had its&nbsp;own instance.</p>\r\n<p>Thank you&nbsp;for any help you can give me.</p>\r\n<p><span style=\"font-size:x-small\"><span style=\"font-size:x-small\">&nbsp;</span><span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">private</span></span><span style=\"font-size:x-small\"> </span><span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">void</span></span><span style=\"font-size:x-small\"> OpenZipFile()</span></span><span style=\"font-size:x-small\"> </span>\r\n<p><span style=\"font-size:x-small\">{</span><span style=\"font-size:x-small\"><span style=\"font-size:x-small\"> <span style=\"font-size:x-small\"><span style=\"font-size:x-small\"><span style=\"font-size:x-small\">&lt;font size=&quot;2&quot;&gt;\r\n<p>&nbsp;</p>\r\n&lt;/font&gt;<span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">string</span></span><span style=\"font-size:x-small\"> FileName = FFilePath + FDatePartOfPath + FFilePrefix + FileDate + </span><span style=\"font-size:x-small;color:#a31515\"><span style=\"font-size:x-small;color:#a31515\">&quot;.zip&quot;</span></span><span style=\"font-size:x-small\">;</span></span><span style=\"font-size:x-small\">&lt;font size=&quot;2&quot;&gt; &lt;/font&gt;</span></span></span><span style=\"font-size:x-small\"><span style=\"font-size:x-small\">&nbsp;</span></span></span></span>\r\n<p><span style=\"font-size:x-small\"><span style=\"font-size:x-small\"><span style=\"font-size:x-small\"><span style=\"font-size:x-small\"><span style=\"font-size:x-small\">&lt;font size=&quot;2&quot;&gt;\r\n<p>&nbsp;</p>\r\n&lt;/font&gt;</span><span style=\"font-size:x-small\"><span style=\"font-size:x-small\">FZipStream = </span><span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">new</span></span><span style=\"font-size:x-small\"> </span><span style=\"font-size:x-small;color:#2b91af\"><span style=\"font-size:x-small;color:#2b91af\">FileStream</span></span><span style=\"font-size:x-small\"> (FileName, </span><span style=\"font-size:x-small;color:#2b91af\"><span style=\"font-size:x-small;color:#2b91af\">FileMode</span></span><span style=\"font-size:x-small\">.Append, </span><span style=\"font-size:x-small;color:#2b91af\"><span style=\"font-size:x-small;color:#2b91af\">FileAccess</span></span><span style=\"font-size:x-small\">.Write, </span><span style=\"font-size:x-small;color:#2b91af\"><span style=\"font-size:x-small;color:#2b91af\">FileShare</span></span><span style=\"font-size:x-small\">.Read);</span></span><span style=\"font-size:x-small\"> </span></span></span><span style=\"font-size:x-small\">&nbsp;</span></span></span><span style=\"font-size:x-small\">\r\n<p>\r\n<p>FZipFolderPath = FileName;</p>\r\n<span style=\"font-size:x-small\"><span style=\"font-size:x-small\"><span style=\"font-size:x-small\"><span style=\"font-size:x-small\">&lt;font size=&quot;2&quot;&gt;\r\n<p>FZip =</p>\r\n&lt;/font&gt;<span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">new</span></span><span style=\"font-size:x-small\"> </span><span style=\"font-size:x-small;color:#2b91af\"><span style=\"font-size:x-small;color:#2b91af\">ZipOutputStream</span></span><span style=\"font-size:x-small\">(FZipStream, </span><span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">true</span></span><span style=\"font-size:x-small\">);</span></span><span style=\"font-size:x-small\">&lt;font size=&quot;2&quot;&gt; &lt;/font&gt;</span></span></span><span style=\"font-size:x-small\"><span style=\"font-size:x-small\">&nbsp;</span></span></span></p>\r\n</span><span style=\"font-size:x-small\"><span style=\"font-size:x-small\"><span style=\"font-size:x-small\"><span style=\"font-size:x-small\"><span style=\"font-size:x-small\">&lt;font size=&quot;2&quot;&gt;\r\n<p>FZip.Password =</p>\r\n&lt;/font&gt;<span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">null</span></span><span style=\"font-size:x-small\">;</span></span><span style=\"font-size:x-small\"> </span></span></span><span style=\"font-size:x-small\">&nbsp;</span></span></span><span style=\"font-size:x-small\">\r\n<p>FZip.PutNextEntry(FFilePrefix + FileDate + FFileExtension);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Extension here is .trc; it is a log file.</p>\r\n<p><span style=\"font-size:x-small\"><span style=\"font-size:x-small\"><span style=\"font-size:x-small\"><span style=\"font-size:x-small\">&lt;font size=&quot;2&quot;&gt;\r\n<p>&nbsp;</p>\r\n&lt;/font&gt;</span><span style=\"font-size:x-small\">}</span></span></span></span></p>\r\n</span><span style=\"font-size:x-small\">\r\n<p>}</p>\r\n</span></p>\r\n<p>&nbsp;</p>\r\n<p>When I write to it:</p>\r\n<p><span style=\"font-size:x-small\">FCache.WriteTo(Stream);&lt;font size=&quot;2&quot;&gt;\r\n<p>\r\n<p>&nbsp;</p>\r\n<span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">byte</span></span><span style=\"font-size:x-small\">[] Bytes = </span><span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">new</span></span><span style=\"font-size:x-small\"> </span><span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">byte</span></span><span style=\"font-size:x-small\">[FCache.Position];&lt;font size=&quot;2&quot;&gt;\r\n<p>&nbsp;</p>\r\n&lt;/font&gt;</span><span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">int</span></span><span style=\"font-size:x-small\"> Pos = (</span><span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">int</span></span><span style=\"font-size:x-small\">)FCache.Position;\r\n<p>FCache.Position = 0;</p>\r\n<p>FCache.Read(Bytes, 0, Pos);</p>\r\n<p>FZip.Write(Bytes, 0, Pos);</p>\r\n<p>FCache.SetLength(0);</p>\r\n&lt;font size=&quot;2&quot;&gt;\r\n<p>&nbsp;</p>\r\n&lt;/font&gt;</span><span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">long</span></span>&lt;font size=&quot;2&quot;&gt; Temp = FZipStream.Position;&lt;/font&gt;</p>\r\n&lt;/font&gt;</span></p>\r\n<p>&nbsp;</p>\r\n</p>\r\n<p><span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">string</span></span><span style=\"font-size:x-small\"> FileDate = FFileDateTime.ToString(</span><span style=\"font-size:x-small;color:#a31515\"><span style=\"font-size:x-small;color:#a31515\">&quot;yyyyMMdd.HHmm&quot;</span></span><span style=\"font-size:x-small\">);</span></p>\r\n</p>\r\n<p>&nbsp;</p>\r\n<p>{</p>\r\n<p><span style=\"font-size:x-small\"><span style=\"font-size:x-small\"><span style=\"font-size:x-small\"><span style=\"font-size:x-small\">&lt;font size=&quot;2&quot;&gt;\r\n<p>&nbsp;</p>\r\n&lt;/font&gt;<span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">if</span></span><span style=\"font-size:x-small\"> (FZipStream == </span><span style=\"font-size:x-small;color:#0000ff\"><span style=\"font-size:x-small;color:#0000ff\">null</span></span><span style=\"font-size:x-small\">)</span></span><span style=\"font-size:x-small\"> </span></span></span></span></p>",
    "PostedDate": "2010-04-20T13:58:08.193-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "433690",
    "ThreadId": "209967",
    "Html": "<p>ok, I understand what you're saying.&nbsp; Your code didn't show up as readable, but I&nbsp;understand what you're saying.&nbsp;</p>\r\n<p>To solve it, I would need a test case, something that starts a bunch of threads, and writes zip files within them, and reproduces the behavior.</p>\r\n<p>It's possible there's some sort of problem in the Dotnetzip code.&nbsp; it's also possible there's a problem in the thread creation and dispatch code.&nbsp; Without a way to reliably reproduce the problem....&nbsp; I can't really diagnose it or solve it.</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-04-21T08:24:33.823-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "433780",
    "ThreadId": "209967",
    "Html": "<p>I found my problem, and it had nothing to do with your library. It was a startup problem on my part and the file was open but in another directory.</p>\r\n<p>I apologize for having wasted your time on this.</p>\r\n<p>Thank you.</p>",
    "PostedDate": "2010-04-21T11:04:58.56-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "433885",
    "ThreadId": "209967",
    "Html": "<p>no problem. glad you sorted it.</p>",
    "PostedDate": "2010-04-21T14:21:29.947-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]