-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Image.NewFromStream throws an exception #58
Comments
Free it when the image is unreferenced instead. This bug was introduced in v1.2.0.
Thanks for reporting this! This bug was introduced in Commit 9f099f7 should fix this. If you want to test this, you can use the nightly version of NetVips. Add the <packageSources>
<add key="netvips-nightly" value="https://ci.appveyor.com/nuget/net-vips" />
</packageSources> And update NetVips to 1.2.1 (build number 177 - prerelease). I'll make a new release soon. |
I've tested it with NetVips 1.2.1.177-develop + NetVips.Native 8.9.1 and it works perfecty. 👍 |
1.2.0 Can't be used in production because of this bug. My application randomly goes down on load. |
NetVips v1.2.1 is now available. Sorry for the delay. |
I'm trying to read image from
FileStream
. Here's the example code:Example app
Example input file.
This code throws an exception, while writing tiles. Exception text:
This happens only with NetVips 1.2.0, version 1.2.0-rc2 doesn't throw an exception and works fine.
I also tried running test with reading as
Image.NewFromFile
and writing asImage.WriteToStream
(with writing toFileStream
) and it works good, so it seems for me, that the error is only happens on reading.Tested it on Windows 10 x64 and Ubuntu 18.04 x64.
P.S.
The exception is thrown not exactly on this line, it's pretty hard to catch. But I think it’s the line, that causes it.
The text was updated successfully, but these errors were encountered: