AddImageFile throws AccessViolationException

  • Last Post 10 December 2014
Darren posted this 13 November 2013

We have a simple prototype that only uses the FRDocument model currently. We are only adding a single image file. We work in VS 2010 and 2013 and get the same issue from either build. We are using 10.5 and 11 and get the same error.

Error occurs on a simple line of code: document.AddImageFile(InputFile, null, null)

The full error is: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at FREngine.IFRDocument.AddImageFile(String ImageFileName, PrepareImageMode PrepareMode, IntsCollection PageIndices)

The "document" object is instantiated the same way as most of the sample projects.

The error never occurs on the first document run through the engine. It occurs on the 2nd or later document run through the engine. It is not consistent but I have not been able to get more than 4 documents through before the error occurs.

The only thing I have found that seems to work is to set this class to "x86" rather than "Any CPU". That worked for 10.5 but we really would like to use 11's 64-bit support.

Anyone seen anything like this?

  • Liked by
  • Julia Anikushina
Order By: Standard | Newest | Votes
Julia Anikushina posted this 15 November 2013

We have added an article about this issue to our Knowledge Base: Please try to follow recommendations provided there.

Matt posted this 10 December 2014

Hi .. the above link doesn't work any more .. can you fix / redirect to a location that does please?

Lilya Chesnova posted this 10 December 2014

Please try to use the following link: