Attempted to read or write protected memory
Posted: Mon Feb 07, 2011 3:38 pm
Hi there,
We are getting the above error, specifically "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
This is when we try to do barcode recognition as per the following code snippet:
string curFile = "c:\\test.tif";
ArrayList arBarcodes = new ArrayList();
int iImg = gdImaging1.CreateGdPictureImageFromFile(curFile);
gdImaging1.Barcode1DReaderDoScan(iImg, Barcode1DReaderScanMode.BestQuality);
for (int i = 1; i <= gdImaging1.Barcode1DReaderGetBarcodeCount(); i++)
{ arBarcodes.Add(gdImaging1.Barcode1DReaderGetBarcodeValue(i)); }
We are running the current version of GdPicture.NET on VS2008 with all updates and service packs installed. The purpose of this application is to run through thousands of .tif files and take action depending on any barcodes found in the files. I would estimate around one in 10000 files cause this error.
Thank you in advance for your help. Let me know if you need a file that causes this error.
We are getting the above error, specifically "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
This is when we try to do barcode recognition as per the following code snippet:
string curFile = "c:\\test.tif";
ArrayList arBarcodes = new ArrayList();
int iImg = gdImaging1.CreateGdPictureImageFromFile(curFile);
gdImaging1.Barcode1DReaderDoScan(iImg, Barcode1DReaderScanMode.BestQuality);
for (int i = 1; i <= gdImaging1.Barcode1DReaderGetBarcodeCount(); i++)
{ arBarcodes.Add(gdImaging1.Barcode1DReaderGetBarcodeValue(i)); }
We are running the current version of GdPicture.NET on VS2008 with all updates and service packs installed. The purpose of this application is to run through thousands of .tif files and take action depending on any barcodes found in the files. I would estimate around one in 10000 files cause this error.
Thank you in advance for your help. Let me know if you need a file that causes this error.