-
-
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
App pool crashed due to System.ExecutionEngineException was thrown #168
Comments
Hi @hieudole, I'm not sure if the upcoming libvips 8.13 would fix this. Are you able to provide a sample image and a standalone code sample that demonstrates this problem? Also, do you think this issue is related to #164? If it's a bug in the native code, it's a bit weird that the (now obsolete) using var image = Image.Black(100, 100);
using var image2 = image.Bandjoin(Array.Empty<int>()); Would throw a
libvips 8.13 allows users to block any operation with the You could also prevent certain loaders from running using the net-vips/samples/NetVips.Samples/Samples/ThumbnailPipeline.cs Lines 61 to 69 in fc320a7
if (loader.StartsWith("VipsForeignLoadHeif"))
{
// Disable processing HEIF images.
throw new Exception("HEIF support is disabled.");
} Or, using the // The failOn option makes NetVips throw an exception on a file format error
using var image = Image.NewFromBuffer(buffer, failOn: Enums.FailOn.Error, access: Enums.Access.Sequential);
// vips-loader is the operation nickname, rather than the
// canonical name returned by vips_foreign_find_load().
var vipsLoader = (string)image.Get("vips-loader");
if (vipsLoader.StartsWith("heifload"))
{
throw new Exception("HEIF support is disabled.");
} |
Hi @kleisauke, I think this issue is not related to #164. I'm trying to reproduce it. I also got
|
Hi @kleisauke, I could reproduce the using var stream = fileInfo.OpenRead();
var image = Image.NewFromStream(stream, access: Enums.Access.Sequential); It took more than 10 seconds until throwing the unhandled exception. When I used The |
The The Just wondering, do you process untrusted images on your web server? If so, you might be interested in these security/performance tips for image processing with libvips: #96 (comment). |
No, I did not process untrusted images. Thanks @kleisauke for the tips of processing images with libvips. |
I'm removing the triage label, without a reproduction it'll be hard to debug further. |
@hieudole Were you able to make any progress with this? |
@kleisauke I'm closing this issue since I'm not able to reproduce it. |
Hi @kleisauke,
I got System.ExecutionEngineException when my app was processing a specific image using NetVips 2.0.1 and NetVips.Native 8.11.4. Most of images were processed successfully, but it failed when processing several specific images. Although I had try catch all exceptions, my app pool crashed, and it was unable to recover.
This error was disappear after I upgraded the libraries to the latest version (NetVips 2.1.0, NetVips.Native 8.12.2). I think it was fixed in this version, but today I get this error again.
Managed Exception = System.ExecutionEngineException:
CallStack - Managed Exception
CallStack - Crashing Thread
Is there any way to handle this exception to prevent app pool from crashing for the quick fix while waiting for a fix in native library?
Thank you!
The text was updated successfully, but these errors were encountered: