This project has moved. For the latest updates, please go here.

Any known issues with AMD processors? SEHException

Jan 15, 2014 at 9:08 PM
We are using Magick.NET.dll version 6.8.5.4 in a .net 4.0 winforms app to do some image conversion. For the most part this is working fine. Occasionally we get a user with this error:

System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
at Magick.Image.{ctor}(Image* )
at ImageMagick.MagickImage..ctor()

This happens on the call to MagickImage image = new MagickImage();

The app is compiled in x86 and we are using the x86 dll version. Whenever I test this locally or on any test machine it works fine. It works fine for the vast majority of our users. The only common link I see with users that have this problem is they are using an AuthenticAMD processor in their system info. All users are also running windows xp SP3.

Thanks for any help!
Coordinator
Jan 15, 2014 at 9:19 PM
Edited Jan 15, 2014 at 9:27 PM
I am not aware of an issue with AMD processors. Can you upgrade your version of Magick.NET to the latest version and see if the problem still occurs? There have been a lot of fixes and improvements since your version. You will have one dll and you no longer need the separate ImageMagick dlls.
Jan 15, 2014 at 10:16 PM
Thank you for the quick response! I will update to the latest version and try to deploy on a problem machine as soon as I can. I will report back here after that happens.
Jan 16, 2014 at 7:30 PM
Edited Jan 16, 2014 at 7:37 PM
Ok, I have tested the new dll version and now I get a different error on the client machine:

Could not load file or assembly 'Magick.NET-x86.dll' or one of its dependencies. Exception from HRESULT: 0xC000001D.

The dll is in the same folder as the exe and is properly referenced in the project. On my local machine and virtual test machines this works great.

I did some research on this error code and found this information: " It seems that the 0xC000001D error code means: illegal instruction, and appears often on older AMD machines (Athlon XP) that don't have SSE2 on board." The machines that are experiencing this problem happen to be Athlon XP processors.
Coordinator
Jan 16, 2014 at 8:50 PM
Edited Jan 17, 2014 at 4:49 AM
Edit:

I was reading the documentation for the wrong compiler. According to the documentation here: http://msdn.microsoft.com/en-us/library/7t5yh4fd%28v=vs.90%29.aspx SSE2 and SSE are not used by default. Can you try the .NET 2.0 build of Magick.NET?
Jan 17, 2014 at 4:36 PM
I tried the 2.0 version and it did indeed fix the issue. I appreciate the help! Thanks!

If someone is deploying on ancient machines (Athlon XP) the 2.0 version is the way to go.
Jan 17, 2014 at 7:23 PM
Any idea what causes this?

Could not load file or assembly 'Magick.NET-x86.dll' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)

This version works fine locally but exhibits this behavior on a virtual machine running XP. This is using the .net 2.0 version.

Running REGSVR32 on the DLL gives me the same type of error.
Coordinator
Jan 17, 2014 at 7:38 PM
Did you install the Visual C++ Redistributable for Visual Studio 2008? You now need this version because you switched to the .NET 2.0 version.
Jan 17, 2014 at 8:44 PM
Doh! That is a silly mistake to make. Works great, thanks!