phillipp / SevenZipSharp

Fork of http://sevenzipsharp.codeplex.com/
11 stars 10 forks source link

System.InvalidOperationException in SevenZipSharp.dll #2

Open sepehr1014 opened 9 years ago

sepehr1014 commented 9 years ago

Hello dear @phillipp and thanks for this great project. Trying the WPF sample, after extracting a file, an exception is thrown: System.InvalidOperationException was unhandled by user code HResult=-2146233079 Message=SevenZipExtractor instance must not be disposed while making an asynchronous method call. Source=SevenZipSharp StackTrace: at SevenZip.SevenZipExtractor.Dispose() in c:\Users\Sepehr\Desktop\SevenZipSharp-master\SevenZip\SevenZipExtractor.cs:line 807 at SevenZipTestWPF.MainWindow.extr_ExtractionFinished(Object sender, EventArgs e) in c:\Users\Sepehr\Desktop\SevenZipSharp-master\SevenZipTestWPF\MainWindow.xaml.cs:line 78 at SevenZip.SevenZipBase.<OnEvent>b__0[T](EventHandler1 h, T ee) in c:\Users\Sepehr\Desktop\SevenZipSharp-master\SevenZip\Common.cs:line 141

sepehr1014 commented 9 years ago

We can remove the call to Dispose method after completion, but isn't it necessary?