Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET xceed out of memory error

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #20530 |
    We have an application that packages it’s files using the xceed software. When the application is consuming a lot of resources, we get the following out of memory exception on the following code:
     
    DiskFolder repositoryFolder = new DiskFolder(repositoryFolderPath);
    //Copy project root object file to zip
    repositoryFolder.CopyFilesTo(archive, true, true, Path.GetFileName(repositoryFilePath)); 
     
     
    Throws following exception: 
    Exception of type ‘System.OutOfMemoryException’ was thrown.    at Xceed.FileSystem.AbstractFolder.CopyFilesTo(FileSystemEvents events, Object userData, AbstractFolder destinationFolder, Boolean recursive, Boolean replaceExistingFiles, Object[] filters)
       at Xceed.FileSystem.AbstractFolder.CopyFilesTo(AbstractFolder destinationFolder, Boolean recursive, Boolean replaceExistingFiles, Object[] filters)
     
    Is there a more memory efficient way to configure a DiskFolder?
     
    Thanks, 
    Dan 

    Imported from legacy forums. Posted by Dan (had 744 views)

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi Dan,

    If you are not using the latest version, then the first thing to do would be to download the latest build and do a new test to see if this issue has already been fixed.

    http://xceed.com/ZIN_Download.html

    If the issue is still present when using the latest build, then please “drill down” the inner exception to get more information and send us the result. Each System.Exception object contains an InnerException property. You can loop on each inner exception, taking note of each exception along the way until InnerException is null.

    For example:

       try
       {
          // TODO: Code that causes an exception
       }
       catch( Exception exception )
       {
          // Output some information about it
          Console.WriteLine( “–>{0}: {1}\n{2}”, exception.GetType().Name, exception.Message, exception.StackTrace );

          // Fetch the inner exception
          exception = exception.InnerException;

          // While there is an exception
          while( exception != null )
          {
             // Output some information about it
             Console.WriteLine( “–>Inner exception: {0}: {1}\n{2}”, exception.GetType().Name, exception.Message, exception.StackTrace );

             // Fetch the inner exception
             exception = exception.InnerException;
          }
       }

    Thank you.

    Imported from legacy forums. Posted by Diane [Xceed] (had 861 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.