[
  {
    "Id": "161951",
    "ThreadId": "48515",
    "Html": "I created a backup utility that, with the exception of a few issues, seems to work well. The utility zips the My Documents directory.<br>\r\nIn live beta testing, the error I'm getting is on a particular person/computer is an outlook pst file inside My Documents. The pst file is 1.76GB, the total size of My Documents is 21.7GB. (She has another pst file that is 5+GB (jeez - don't get me started) but the zipping process had not yet reached that far) Anyway..<br>\r\nAll my testing, with the exception of xlsx files in use (another post), zips successfully. I even tested pst files (and pst files in use by outlook) successfully - though they were smaller.<br>\r\n<br>\r\nIs the overall size of the archive being created causing an issue?<br>\r\n<br>\r\nThe code is basically:<br>\r\n<span style=\"font-size:13px\">zipArchive.AddDirectory(SourceFolder)<br>\r\nzipArchive.CompressionLevel = Zlib.CompressionLevel.LEVEL9_BEST_COMPRESSION<br>\r\nzipArchive.UseZip64WhenSaving = Ionic.Zip.Zip64Option.Always<br>\r\nzipArchive.Save(DestinationFile)\r\n<p>&nbsp;</p>\r\n</span>\r\n",
    "PostedDate": "2009-02-25T08:57:45.013-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "161967",
    "ThreadId": "48515",
    "Html": "BFJ - large files should work successfully.<br>\r\nsome questions.  <br>\r\nWhat version of DotNetZip, specifically? <br>\r\nCan you provide a stack trace of the exception?<br>\r\n",
    "PostedDate": "2009-02-25T09:26:37.483-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "161978",
    "ThreadId": "48515",
    "Html": "1.7.2.6 <br>\r\nI'll provide more info as soon as I retest...<br>\r\nThanks,<br>\r\njeff<br>\r\nPS-The zip process had been running for about an hour or so on the test subjects pc before it bombed. I just assumed it was overall file size of the archive and the pst file pushed it over the cliff. \r\n",
    "PostedDate": "2009-02-25T09:40:07.817-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "162004",
    "ThreadId": "48515",
    "Html": "YES - Jeff there was a previous problem reported with the progress events, specifically having to do with an arithmetic overflow.  <br>\r\nI fixed it in v1.7.2.7, which is the latest v1.7 release.  <br>\r\nCan you please try it with that? <br>\r\n",
    "PostedDate": "2009-02-25T10:31:21.093-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "162045",
    "ThreadId": "48515",
    "Html": "I tried 1.7.2.7 and still got the error. <br>\r\nThe error is happening on the e.TotalBytesToTransfer when the SaveProgress event fires.<br>\r\nThis may help:<br>\r\nSystem.OverflowException was unhandled<br>\r\n  Message=&quot;Arithmetic operation resulted in an overflow.&quot;<br>\r\n  Source=&quot;SMG Backup&quot;<br>\r\n  StackTrace:<br>\r\n       at SMG_Backup.MainForm.zipArchive_SaveProgress(Object sender, SaveProgressEventArgs e) in C:\\Users\\jeffy.SELLETHICS\\Documents\\Visual Studio 2005\\Projects\\SMG Backup\\SMG Backup\\MainForm.vb:line 218<br>\r\n       at Ionic.Zip.ZipFile.OnSaveBlock(ZipEntry entry, Int64 bytesXferred, Int64 totalBytesToXfer) in c:\\dinoch\\dev\\dotnet\\zip\\DotNetZip\\Zip Partial DLL\\ZipFile.cs:line 3777<br>\r\n       at Ionic.Zip.ZipEntry.OnWriteBlock(Int64 bytesXferred, Int64 totalBytesToXfer) in c:\\dinoch\\dev\\dotnet\\zip\\DotNetZip\\Zip Partial DLL\\ZipEntry.cs:line 1717<br>\r\n       at Ionic.Zip.ZipEntry._WriteFileData(Stream s) in c:\\dinoch\\dev\\dotnet\\zip\\DotNetZip\\Zip Partial DLL\\ZipEntry.cs:line 2953<br>\r\n       at Ionic.Zip.ZipEntry._EmitOne(Stream outstream) in c:\\dinoch\\dev\\dotnet\\zip\\DotNetZip\\Zip Partial DLL\\ZipEntry.cs:line 3310<br>\r\n       at Ionic.Zip.ZipEntry.Write(Stream outstream) in c:\\dinoch\\dev\\dotnet\\zip\\DotNetZip\\Zip Partial DLL\\ZipEntry.cs:line 3268<br>\r\n       at Ionic.Zip.ZipFile.Save() in c:\\dinoch\\dev\\dotnet\\zip\\DotNetZip\\Zip Partial DLL\\ZipFile.cs:line 2915<br>\r\n       at Ionic.Zip.ZipFile.Save(String zipFileName) in c:\\dinoch\\dev\\dotnet\\zip\\DotNetZip\\Zip Partial DLL\\ZipFile.cs:line 3086<br>\r\n       at SMG_Backup.MainForm.ZipSave(String SourceFolder, String DestFile) in C:\\Users\\jeffy.SELLETHICS\\Documents\\Visual Studio 2005\\Projects\\SMG Backup\\SMG Backup\\MainForm.vb:line 81<br>\r\n       at SMG_Backup.MainForm.btnZip_Click(Object sender, EventArgs e) in C:\\Users\\jeffy.SELLETHICS\\Documents\\Visual Studio 2005\\Projects\\SMG Backup\\SMG Backup\\MainForm.vb:line 66<br>\r\n       at System.Windows.Forms.Control.OnClick(EventArgs e)<br>\r\n       at System.Windows.Forms.Button.OnClick(EventArgs e)<br>\r\n       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)<br>\r\n       at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)<br>\r\n       at System.Windows.Forms.Control.WndProc(Message&amp; m)<br>\r\n       at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)<br>\r\n       at System.Windows.Forms.Button.WndProc(Message&amp; m)<br>\r\n       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)<br>\r\n       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)<br>\r\n       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)<br>\r\n       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)<br>\r\n       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)<br>\r\n       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)<br>\r\n       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)<br>\r\n       at System.Windows.Forms.Application.Run(ApplicationContext context)<br>\r\n       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()<br>\r\n       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()<br>\r\n       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)<br>\r\n       at SMG_Backup.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81<br>\r\n       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)<br>\r\n       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)<br>\r\n       at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)<br>\r\n       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()<br>\r\n       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)<br>\r\n       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)<br>\r\n       at System.Activator.CreateInstance(ActivationContext activationContext)<br>\r\n       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()<br>\r\n       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)<br>\r\n       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<br>\r\n       at System.Threading.ThreadHelper.ThreadStart()<br>\r\n",
    "PostedDate": "2009-02-25T12:16:07.49-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "162056",
    "ThreadId": "48515",
    "Html": "<p>Ok, <br>\r\nIt looks like the exception is occuring in <strong>your</strong> code.</p>\r\n<p>Can you show me line 218 in MainForm.vb?    I suspect you are assigning an Int64 value to an Int32 field, like the Value property on the progressBar ?<br>\r\nAlso, regarding the other issue: you can see if the temporary XLSX problem is fixed with v1.7.2.9.  </p>\r\n",
    "PostedDate": "2009-02-25T12:38:18.83-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "162058",
    "ThreadId": "48515",
    "Html": "That is my saveprogess event, line 218 is: pbarCurrent.Maximum = e.TotalBytesToTransfer<br>\r\n<br>\r\n<span style=\"font-size:13px;color:#0000ff\"><span style=\"font-size:13px;color:#0000ff\">\r\n<p>Private</p>\r\n</span>\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Sub</span><span style=\"font-size:13px\"> zipArchive_SaveProgress(</span><span style=\"font-size:13px;color:#0000ff\">ByVal</span><span style=\"font-size:13px\"> sender </span><span style=\"font-size:13px;color:#0000ff\">As</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Object</span><span style=\"font-size:13px\">, </span><span style=\"font-size:13px;color:#0000ff\">ByVal</span><span style=\"font-size:13px\"> e </span><span style=\"font-size:13px;color:#0000ff\">As</span><span style=\"font-size:13px\"> Ionic.Zip.SaveProgressEventArgs) </span><span style=\"font-size:13px;color:#0000ff\">Handles</span><span style=\"font-size:13px\"> zipArchive.SaveProgress\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p><span style=\"font-size:13px;color:#0000ff\">If</span><span style=\"font-size:13px\"> e.EntriesTotal &gt; 0 </span><span style=\"font-size:13px;color:#0000ff\">Then\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>pbarTotal.Maximum = e.EntriesTotal</p>\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">End</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">If\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">If</span><span style=\"font-size:13px\"> e.EntriesSaved &gt; 0 </span><span style=\"font-size:13px;color:#0000ff\">Then\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>pbarTotal.Value = e.EntriesSaved</p>\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">End</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">If\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">If</span><span style=\"font-size:13px\"> e.TotalBytesToTransfer &gt; 0 </span><span style=\"font-size:13px;color:#0000ff\">Then\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>pbarCurrent.Maximum = e.TotalBytesToTransfer</p>\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">End</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">If\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">If</span><span style=\"font-size:13px\"> e.BytesTransferred &gt; 0 </span><span style=\"font-size:13px;color:#0000ff\">Then\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>pbarCurrent.Value = e.BytesTransferred</p>\r\n<p>lblCurrentFile.ResetText()</p>\r\n<p>lblCurrentFile.Text = e.CurrentEntry.FileName</p>\r\n<p>lblCurrentFile.Update()</p>\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">End</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">If\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<span style=\"font-size:13px\">\r\n<p>Application.DoEvents()</p>\r\n<p>&nbsp;</p>\r\n</span>\r\n<p><span style=\"font-size:13px;color:#0000ff\">End</span><span style=\"font-size:13px\"> </span><span style=\"font-size:13px;color:#0000ff\">Sub\r\n<p>&nbsp;</p>\r\n</span></p>\r\n",
    "PostedDate": "2009-02-25T12:42:43.567-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "162066",
    "ThreadId": "48515",
    "Html": "I think I see..<br>\r\nProgress bar is Integer, TotalBytesToTransfer is long. So the value exceeded limitations.<br>\r\n<br>\r\nI'm testing again (after this test, I'll try the xlsx test), but I change the code to set the progressbar max to 100, convert the long to integer, divide the bytestransferred by totaltotransfer * 100.<br>\r\n<br>\r\n<p>    Private Sub zipArchive_SaveProgress(ByVal sender As Object, ByVal e As Ionic.Zip.SaveProgressEventArgs) Handles zipArchive.SaveProgress</p>\r\n<p>        If e.EntriesTotal &gt; 0 Then<br>\r\n            pbarTotal.Maximum = e.EntriesTotal<br>\r\n        End If</p>\r\n<p>        If e.EntriesSaved &gt; 0 Then<br>\r\n            pbarTotal.Value = e.EntriesSaved<br>\r\n        End If</p>\r\n<p>        If e.BytesTransferred &gt; 0 Then<br>\r\n            pbarCurrent.Value = CType((e.BytesTransferred / e.TotalBytesToTransfer) * 100, Integer)<br>\r\n            lblCurrentFile.ResetText()<br>\r\n            lblCurrentFile.Text = e.CurrentEntry.FileName<br>\r\n            lblCurrentFile.Update()<br>\r\n        End If</p>\r\n<p>        Application.DoEvents()</p>\r\n<p>    End Sub</p>\r\n",
    "PostedDate": "2009-02-25T13:01:45.283-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "162072",
    "ThreadId": "48515",
    "Html": "I downloaded the  <a id=\"ctl00_ctl00_MasterContent_Content_ReleasePanelOrderingContainer_ReleaseFilesCtrl_FileList_ctl01_FileNameLink\" tabindex=9><span style=\"color:#3e62a6\">DotNetZipLib-DevKit-v1.7.zip</span></a> but all that was in there was a chm file... <br>\r\n(In order to get 1.7.2.9)\r\n",
    "PostedDate": "2009-02-25T13:37:20.837-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "162119",
    "ThreadId": "48515",
    "Html": "ok, I'm having release problems! <br>\r\nSorry about that! I'll get that fixed pronto.\r\n",
    "PostedDate": "2009-02-25T16:13:53.593-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "162129",
    "ThreadId": "48515",
    "Html": "OK, Jeff, v1.7.2.10 is up there, it corrects the &quot;missing files&quot;.\r\n",
    "PostedDate": "2009-02-25T17:09:20.257-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "162153",
    "ThreadId": "48515",
    "Html": "Yes, your code looks right now.  The overflow you were seeing was because of the long==&gt;int conversion, as you said.<br>\r\n",
    "PostedDate": "2009-02-25T20:56:11.63-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "162334",
    "ThreadId": "48515",
    "Html": "Success.<br>\r\n<br>\r\nI used 1.7.2.11 to zip a directory, My Documents, and prior to the zip process I opened the following files: .gif, .jpg, .pdf, .doc, .docx, .xls, .xlsx, and .mdb. The zip process completed successfully. I then opened the zip archive and any temp files that were created by opening the original file, were inside the zip archive. I then closed all the files I had open, then ran the update feature I have in my program, which enumerates the files in My Documents and compares to the zip archive, and it updated successfully (replaces an older file with the newer version, adds new files/folders, removes files if they no longer exist).<br>\r\n<br>\r\nNow if we could just get that file exception/inclusion feature.... :)<br>\r\n<br>\r\nI might not understand your answer, but what was different about the xlsx file compared to the others?\r\n",
    "PostedDate": "2009-02-26T07:22:51.133-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "162548",
    "ThreadId": "48515",
    "Html": "You will understand just fine.  The xslx file is apparenly opened with Delete permissions by Excel.  When DotNetZip was trying to open the file initially, it did not specify FileShare.Delete, implying that the open would fail if another process (in this case, Excel) had the file open with Delete access on the file pointer.  What I did was further relax the Open call in DotNetZip, so that it would not fail, even if another party held rights to delete the file after I had opened it.  <br>\r\n<br>\r\nPreviously I had set the Open in DotNetZip to succeed if another process had Read or Write access on the file.  That works for a .xlsx file, but not for a temporary xslx file.  <br>\r\n<br>\r\nAnd prior to that change, DotNetZip   would just fail if the file was open by another process. <br>\r\n<br>\r\nSo it took me a couple tries to get it relaxed enough for the Excel case.<br>\r\nThere still is a chance it will fail of course - Excel could delete the temporary xslx file while your app is zipping.  The library will just throw an exception in that case.  but the point is, the zip process may still fail. <br>\r\n",
    "PostedDate": "2009-02-26T16:27:44.83-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]