[
  {
    "Id": "263127",
    "ThreadId": "76966",
    "Html": "<p>Hi,</p>\r\n<p>I'm having weird intermitant issue when using the 1.9.0.30 library within vbscript .</p>\r\n<p>I'm using the component in Sql 2000 DTS ActiveX Script - This package is running 10 simultaneous times. I'm firing stored procedure creating a file of each results and i want to zip these files i.e 10 of these processes&nbsp;running at once - I'm using the packages threading capabilities to speed the report generation up ~1000 reports.&nbsp;</p>\r\n<p>So over a few days i've noticed these errors and when i rerun it all works fine. drilling into the issue a bit more today and out of 4 tests this morning my script has worked fine twice and twice its failed on every file created. This type of error has only been seen post&nbsp; trying to use 1.9.0.29</p>\r\n<p>Have you any ideas why? , Anyway to get some more detailed information out in my scenario</p>\r\n<p>Hoping you can help</p>\r\n<p>Matt</p>\r\n<p>&nbsp;</p>\r\n<p>Heres the code,</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre><span style=\"color:Blue\">On</span> <span style=\"color:Blue\">Error</span> <span style=\"color:Blue\">Resume</span> <span style=\"color:Blue\">Next</span></pre>\r\n<pre><span style=\"color:Blue\">...</span></pre>\r\n<pre><span style=\"color:Blue\">Call</span> Err.Clear()\r\n<span style=\"color:Green\">'Create a new zip</span>\r\n<span style=\"color:Blue\">Set</span> objZip = CreateObject(<span style=\"color:#A31515\">&quot;Ionic.Zip.ZipFile&quot;</span>)\r\n<span style=\"color:Blue\">If</span> Err.Number &lt;&gt; 0 <span style=\"color:Blue\">Then</span>\t\r\n    <span style=\"color:Blue\">Call</span> LogDatabase(105566, Err.Description)\r\n    <span style=\"color:Blue\">Call</span> LogZipCreateError(objZip, <span style=\"color:#A31515\">&quot;Cannot create zip&quot;</span>)\t\r\n    <span style=\"color:Blue\">Exit</span> <span style=\"color:Blue\">Function</span>\t\r\n<span style=\"color:Blue\">End</span> <span style=\"color:Blue\">If</span>\r\n...</pre>\r\n<pre><span style=\"color:Blue\">Sub</span> LogZipCreateError(objZip, strDescription)\r\n\t<span style=\"color:Blue\">Call</span> LogDatabase(105565, strDescription &amp; <span style=\"color:#A31515\">&quot; - (&quot;</span> &amp; Err.Description &amp; <span style=\"color:#A31515\">&quot;)&quot;</span>)\r\n\t<span style=\"color:Blue\">On</span> <span style=\"color:Blue\">Error</span> <span style=\"color:Blue\">Resume</span> <span style=\"color:Blue\">Next</span>\r\n\t<span style=\"color:Green\">'Kill zip obj if exists</span>\r\n\t<span style=\"color:Blue\">Call</span> objZip.Dispose()\r\n\t<span style=\"color:Blue\">Set</span> objZip = <span style=\"color:Blue\">Nothing</span>\r\n\t<span style=\"color:Blue\">Call</span> Err.Clear()\r\n<span style=\"color:Blue\">End</span> <span style=\"color:Blue\">Sub</span>\r\n</pre>\r\n</div>\r\n<p>Heres the records from the LogDatabase function, this function is fine its used everywhere in my code</p>\r\n<p>105566 Invalid procedure call or argument<br>105565 Cannot create zip - (Invalid procedure call or argument)</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-12-03T03:54:46.377-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "263294",
    "ThreadId": "76966",
    "Html": "<p>Yes, I've seen something similar in an environment where many ZIPs were being created simultaneously.&nbsp; The other one was also SQL Server.&nbsp;</p>\r\n<p>In 1.9.0.30, I introduced a parallel deflation capability within the library itself.&nbsp; It allocates a number of additional buffers and starts threads to perform the compression in parts.&nbsp; This is often faster, but it takes much more memory. Also it make be counterproductive if you already have a parallel task running.&nbsp; You can run out of memory, for example.</p>\r\n<p>The parallel deflation happens automatically, but you can disable it.&nbsp; Set the ParallelDeflateThreshold property on the zipfile instance to -1.&nbsp; like this:</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre><span style=\"color:Blue\">Set</span> objZip = CreateObject(<span style=\"color:#A31515\">&quot;Ionic.Zip.ZipFile&quot;</span>)\r\n<span style=\"color:Green\">'' check return here</span>\r\nobjZip.ParallelDeflateThreshold = -1\r\n\r\n</pre>\r\n</div>\r\n<p>This reverts the behavior of the library to the pre-1.9.0.30 behavior - all compression is done on a single-threaded basis.</p>\r\n<p>Try this and see if it works for you.</p>",
    "PostedDate": "2009-12-03T09:59:22.787-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "263607",
    "ThreadId": "76966",
    "Html": "<p>Thanks for the reply, Cheeso</p>\r\n<p>Unfortunately i can't set the property my creatobject statement blows out with Invalid procedure call or argument.</p>\r\n<p>I've looked at the default constructor in the source and i can't see anything here could cause the issue.</p>\r\n<p>The really strange thing is that sometimes it works and sometimes it doesn't, On other test servers it creates the object perfectly .</p>\r\n<p>The process is running under a SqlAgentJob, the jobs owner is part of the sysadmin fixed role hence should have full server permissions</p>\r\n<p>Perhaps its something to do with registering the object</p>\r\n<p>here is how i register and unregister via a bat files .....</p>\r\n<pre><em>Register.Bat...</em>\r\nD:\r\ncd D:\\Bin\\Tools\\\r\ngacutil -i D:\\Bin\\DotNetZip\\1.9.0.30\\Ionic.Zip.dll\r\n\r\nC:\r\ncd C:\\WINNT\\Microsoft.NET\\Framework\\v2.0.50727\\\r\nregasm D:\\Bin\\DotNetZip\\1.9.0.30\\Ionic.Zip.dll\r\npause\r\n\r\ncscript D:\\Bin\\DotNetZip\\1.9.0.30\\TestRegistration.vbs\r\npause</pre>\r\n<pre><pre><em>Unregesiter.bat ...</em>\r\nD:\r\ncd D:\\Bin\\Tools\\\r\ngacutil -u Ionic.Zip\r\nC:\r\ncd C:\\WINNT\\Microsoft.NET\\Framework\\v2.0.50727\\\r\nregasm D:\\Bin\\DotNetZip\\1.9.0.30\\Ionic.Zip.dll /u\r\npause\r\n\r\ncscript D:\\Bin\\\\DotNetZip\\1.9.0.30\\TestRegistration.vbs\r\npause</pre>\r\n<pre>I would apprecaite any further insight </pre>\r\n<pre>Matt</pre>\r\n</pre>",
    "PostedDate": "2009-12-04T05:25:25.71-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "263924",
    "ThreadId": "76966",
    "Html": "<p>Ah, I see.</p>\r\n<p>I was thinking it had to do with a memory problem, maybe the object creation was failing due to lack of memory.</p>\r\n<p>But that's not what you're seeing.&nbsp; You appear to just be seeing an intermittent problem.&nbsp;</p>\r\n<p>I don't know why that would happen.</p>\r\n<p>If I were troubleshooting this I would install the PRocMon tool from sysinternals (<a href=\"http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx\">http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx</a>), and look at what happens when the CreateObject fails.</p>\r\n<p>Also, try the hints on debugging failures in loading assemblies.&nbsp;&nbsp; <a href=\"http://blogs.msdn.com/suzcook/archive/2003/05/29/57120.aspx\">http://blogs.msdn.com/suzcook/archive/2003/05/29/57120.aspx</a>&nbsp;</p>\r\n<p>Old stuff, but still handy.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-12-05T05:58:12.967-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "463846",
    "ThreadId": "76966",
    "Html": "<p>Hi</p>\r\n<p>Did you find the solution? I am having the same problem with SSIS &quot;Cannot create ActiveX component&nbsp;&quot;. It works fine on dev server but when deployed the test server it is giving me the error &quot;Cannot create ActiveX component&quot;. I am just hitting the wall with that.</p>\r\n<p>Any help will be appritiated.</p>\r\n<p>Siraj</p>",
    "PostedDate": "2010-07-06T09:36:33.493-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]