Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET An unexpected internal failure occurred in the FileSystem component, or one of its descendants

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #20425 |

    Hi,

    I’m using zip for .net and in my application I can choose if I run the zip on the main thread or if I run it on a new thread. When I run it on the main thread I don’t get any exceptions. If I switch it to use background threads then I sometimes get exceptions that mention an internal exception.

    I wonder if I can use zip for .net in a multithreaded application or if I need to switch to the real time zip components you are selling.

     Regards,

    Pieter

    Imported from legacy forums. Posted by Pieter (had 1020 views)

    Xceed Support
    Member
    Post count: 5658

    You can use Xceed Zip for .NET in a multithreaded application but you need to be very careful how you go about it because the component isn’t thread-safe by design.

    Only one thread should be performing operations on a zip archive at the same time.

    Please send us the multithreaded code that performs the zip operations and we can have a look to see if it can be made to work and to be sure there’s no bug on our end.

    Also, when you get the exception, can you “drill down” the inner exceptions and report them to us? This will allow us to know the real cause behind the exception you’re getting.

    Each System.Exception object contains a InnerException property. You can loop on each inner exception, taking note of each exception along the way until InnerException is null.

    Example (C#):

    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;
      }
    }

    Example (VB.NET):

    Try
      ‘ TODO: Code that causes an exception
    Catch exception As Exception
      ‘ Output some information about it
      Console.WriteLine(“–>{0}: {1}” & Constants.vbLf & “{2}”, exception.GetType().Name, exception.Message, exception.StackTrace)

      ‘ Fetch the inner exception
      exception = exception.InnerException

      ‘ While there is an exception
      Do While exception IsNot Nothing
        ‘ Output some information about it
        Console.WriteLine(“–>Inner exception: {0}: {1}” & Constants.vbLf & “{2}”, exception.GetType().Name, exception.Message, exception.StackTrace)

        ‘ Fetch the inner exception
        exception = exception.InnerException
      Loop
    End Try

    Imported from legacy forums. Posted by Michel [Xceed] (had 1007 views)

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