CreateGdPictureImageFromFile throws AccessViolationException

Discussions about image processing and document imaging.
Post Reply
Username
Posts: 16
Joined: Wed Jul 18, 2012 12:11 am

CreateGdPictureImageFromFile throws AccessViolationException

Post by Username » Sat Oct 06, 2012 7:22 pm

Hello,

I'm using GdPicture 9.2.4 and from time to time i get the following exception when calling CreateGdPictureImageFromFile :
"AccessViolationException crossed the native/managed boundary - Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

The call stack when this happens is the following:
at gdpicture_ᜒ.gdpicture_ᜂ(Int32 A_0, String A_1, Int32 A_2)
at gdpicture_ᜒ.gdpicture_ᜀ(Int32 A_0, String A_1, Int32 A_2)
at gdpicture_ᜒ.gdpicture_ᜀ(ᜃ& A_0, String A_1, Boolean& A_2, Boolean A_3, Boolean A_4, Boolean A_5, Boolean A_6)

This call is made in parallel from 4 threads from 4 different instances of GdPictureImaging with different source file names. something like this:

Parallel.ForEach(list, po, x => {
GdPictureImaging img = new GdPictureImaging();
int imageId = img.CreateGdPictureImageFromFile(x.SourceFileName);
});

I have experience the problem with the following two type of TIFF source files:
"CCITT T.4" compressed, 600 dpi, 4968x7016, TIFF
"LZW" compressed, 300 dpi, 1672x2343, TIFF

If it makes any difference - the class instance that in turn calls GdPictureImaging.CreateGdPictureImageFromFile is created using Activator.CreateInstance(Type), not with "new" keyword.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: CreateGdPictureImageFromFile throws AccessViolationExcep

Post by Loïc » Sun Oct 07, 2012 2:42 pm

Hello,

to investigate such issue we need a standalone application reproducing the issue.

You can send it through https://www.gdpicture.com/support/getting-support-from-our-team

Kind regards,

Loïc

Username
Posts: 16
Joined: Wed Jul 18, 2012 12:11 am

Re: CreateGdPictureImageFromFile throws AccessViolationExcep

Post by Username » Sun Oct 07, 2012 6:55 pm

It could be very time consuming creating such application. As I said, I have this exception from time to time. When I hit the exception, all my 4 threads are at this call - none of them passed to the next statement. And when this happens (probably most of the times), this is first 4 calls (because of 4 threads) to function after I start the program. Nothing more is called except registering license keys and creating new instance of GdPictureImaging. I start it under the Visual Studio 2010 debugger. Is registering licenses thread safe ? I have 3 license keys that are registered in every thread.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest