win 2003 create sfx error v1.8.4.24 Ionic.Zip.ZipFile._SaveSfxStub

Oct 9, 2009 at 1:04 PM

Hey Cheeso,

I've recently come back to some code i was developing using your excellent library and have hit an unusual problem.

Originally the code used the v1.8.4.14 build (and this still works in all test cases) . I've just updated to the latest stable release v. and now finding errors when trying to create an sfx which didnt happen previously.

Scenario: - Win2003 server SP2

Code process flow: - pick up all files in a given directory and package to datetime (call ref) stamped zips based on creation datetime. Once a zip is created all associated raw files are deleted. Once all zips are created it then packages zips into date stamped sfx's with aes256 encryption.

At the point where the code starts to build the sfx's we are now getting an error. At this point the folder contains 1693 zips which have a total size of 253mb.

Error stack trace:

Error Message:
Errors compiling the extraction logic!  C:\Documents and Settings\nick
Local Settings\Temp\1\Ionic.Zip-2009Oct09-105501-1.cs
Error StackTrace:
   at Ionic.Zip.ZipFile._SaveSfxStub(String exeToGenerate, SelfExtractorFlavor f
lavor, String defaultExtractLocation, String postExtractCmdLine, String nameOfIc
   at Ionic.Zip.ZipFile.SaveSelfExtractor(String exeToGenerate, SelfExtractorFla
vor flavor, String defaultExtractDirectory, String postExtractCommandToExecute,
String iconFile)
   at Ionic.Zip.ZipFile.SaveSelfExtractor(String exeToGenerate, SelfExtractorFla
vor flavor)
   at ICR.IVR.UTTERANCEARCHIVER.ZipAndArchive2.BuildZip(List`1 filepaths, String
 zipFullName, String passWord, Boolean encryptAES256, Boolean selfextractexe, Li
st`1 ammendedFileNames)
   at ICR.IVR.UTTERANCEARCHIVER.UtteranceArchiver.Archive()
ng[] args)

On the same platform with a much smaller file set (i.e.) single days worth of zips therefore its only creating a single sfx the process works. The process also works on an XP Pro platform without any issues.

Having gone round in circles to try and identify the cause... I have reverted back to the original v1.8.4.14 build and this works perfectly in all cases.

Has something major changed within the builds between 14 - 24 with the creation of sfx's ?

If you need any further info or a copy of the Ionic.Zip-2009Oct09-105501-1.cs temp file just let me know.


Thanks Nick


Oct 9, 2009 at 4:38 PM

yes, can you open a workitem and post that .cs file please?

Oct 10, 2009 at 12:04 PM

Work item 8966 created mate. Contains outline description, error stacktrace and ionic temp extraction cs file.

cheers nick

Oct 10, 2009 at 4:19 PM

Hey Nick, yes, the logic for saving self-extracting archives did change .   One of the changes introduced was, in v1.8.4.24,  the SFX gets a win32 icon, which requires creating a filesystem file.   There were other changes, too.

I don't clearly see how or why those changes would have caused the problem.  It might be a timeout or race condition with the new icon file.   Or it might be something else. Is this problem reproducible?  if it is, would it be possible for you to run the debug version of the library so the stack trace would show the line numbers? 

Is there any other message aside from what you've posted?


Oct 10, 2009 at 5:31 PM

Forget it - using the debug library won't help me. But, I've attached an update version of the DLL for testing purposes to the workitem ( .

If you run with that updated version, I'll get some better visibility into the problem , and I'll be able to fix it.



Oct 10, 2009 at 7:54 PM

Sorry dude... been out all day.

Yep the problem is easily reproducible. However the above is from a release version one of our production boxes. basically the app just dumps the top level error msg and stacktrace on error. I've not yet had chance to run with a debug version on a win 2003 box but can do if you think it'll highlight more. All dev is currently done on win 2000 & XP.

I've just re-run with the dll and updated the workitem with the generated extraction logic cs file

cheers nick


Oct 10, 2009 at 9:15 PM

Sounds good Nick.

No apologies necessary - when I said "Forget it" I just wanted to revise my suggestion because it wasn't going to help anyway.

Oct 12, 2009 at 12:30 PM

Just a note for anybody else experiencing this issue.

Check your framework build version - ours was running the original .net 2.0 version (due to it being live boxes - auto updates are not applied and patches only applied as and when there is a need to - not my decision... lol)

The issue revolves around the icon for the sfx during the sfx build process - (The work item above outlines the details more precisely).

After updating the framework to SP2 v2.0.50727.3053 the issue has been resolved.

Big thanks to Cheeso for his help in identifing the issue!

Cheers Nick