-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unhandled Exception while disposing ExtFileStream #10
Comments
Compile as release mode and try again. |
Then it could be heap corruption. |
Do you have any idea how to check if the heap is corrupted and/or how to fix it? I‘m not familar with problems like this. |
Just a quick glimpse the screen shot you attached, it seems you are using x64 release, as you can see ext4_write takes uint64 as input, however extfilestream passes int32. You said you were copying large file (2gb). This may be the reason. Try x86 mode, or use smaller file |
Thank you for your tips. I found out the error only occurs when ExtFileStream.Close() is called shortly before disposing. If I skip closing the stream before disposing, it works. Is disposing not closing the stream at all? I think this would be the expected behavior. Maybe we can improve the whole thing, Dispose should better not throw an error exception if the stream is closed. |
ExtFileStream inherits . Net Stream class and override close. It should be all handled by Stream base class. |
Hi,
I get an unhandled exception during disposing the ExtFileStream.
The target framework of my application is .NET 7.
I do simple copy operations of large files (up to 2 GB) from my NTFS-Disk to a Micro-SD (Ext4).
Source
The operation is successful but after the call of Dispose via the using-operator or calling Dispose I get the following exception:
![grafik](https://user-images.githubusercontent.com/12455803/207066300-60239626-09f3-481d-a0b6-29c2810a6f36.png)
![grafik](https://user-images.githubusercontent.com/12455803/207066359-93b19b75-5749-487b-9dff-df22bde4bfa2.png)
![grafik](https://user-images.githubusercontent.com/12455803/207066890-60ec8a13-6e17-4bb7-b0e1-f7807de8e695.png)
Is this the default behavior?
Any idea for a workaround?
~Best Regards
The text was updated successfully, but these errors were encountered: