This project has moved and is read-only. For the latest updates, please go here.

WPF Application crashing with Exception Code c0000005

Jul 15, 2014 at 1:26 PM
I am converting a large number of PDFs to PNGs in a multi-threaded WPF application that gets document locations from a database and after conversion, I put the location of the converted document into another database. The program runs fine until after some time (around an hour maybe) it just crashes with an Exception Code c0000005.

The following is the details of the exception:
Problem signature:
  Problem Event Name:   BEX64
  Application Name: iGen.exe
  Application Version:  1.0.0.0
  Application Timestamp:    53c3af4f
  Fault Module Name:    StackHash_1dc2
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   00000000
  Exception Offset: 0000000000000000
  Exception Code:   c0000005
  Exception Data:   0000000000000008
  OS Version:   6.1.7601.2.1.0.256.48
  Locale ID:    2057
  Additional Information 1: 1dc2
  Additional Information 2: 1dc22fb1de37d348f27e54dbb5278e7d
  Additional Information 3: eae3
  Additional Information 4: eae36a4b5ffb27c9d33117f4125a75c2
I am using the 6.8.9.401 Magick.NET x64 version and .NET 4. It doesn't seem to be on a particular file since I was able to convert all the remaining documents (after the crash) in another process.

I have never got this error in Visual Studio's debugging mode, only when I run the application without VS. In the VS, I sometimes get another error saying 'Attempted to read or write protected memory'

Could this be the Magick.NET library?
Jul 15, 2014 at 2:19 PM
I would first advise you to upgrade to the latest version of Magick.NET. Can you reproduce the issue when you disable OpenCL? (MagickNET.UseOpenCL = false)
Jul 16, 2014 at 10:12 AM
I get the following error on MagickNET.UseOpenCL = false :

An exception of type 'System.TypeInitializationException' occurred in Magick.NET-x64.dll but was not handled in user code.
Additional information: The type initializer for 'ImageMagick.MagickNET' threw an exception.

Jul 16, 2014 at 10:49 AM
Can you try again with this development build: https://www.dropbox.com/sh/2omlarb120mecwz/AAB_d_JPd4X_ubmW0UlVfmX_a.
Jul 16, 2014 at 2:14 PM
I can't access dropbox or any other file sharing utilities at my work place so I can't get the build. Is there any other way I could get the file?
Jul 16, 2014 at 2:20 PM
Contact me trough CodePlex and I will get your email. I can e-mail it to you.
Jul 18, 2014 at 1:52 PM
Edited Jul 18, 2014 at 2:25 PM
The problem still exists with the development build. However, it ran for around three hours this time.

Update: Just started another process that crashed not long after it started with the same exception.