Index outside the bounds error message when try to scan an a barcode image via Aspose.BarCode for .NET

Aspose.BarCode for .NET 5.7.0.0

using Aspose.BarCodeRecognition.dllv

Images come from an email and each image is checked to see if it is the bar code with the code below. When it encounters image004.gif which I have attached from an email the barcode reader crashes and hangs system on reader2.Read() with error:

Index was outside the bounds of the array.

Stack trace:

at . . (Byte[] , Byte[] , Int32 , Int32 , Int32 , Color[] , Int64[] )

at . . ( )

at . . ( )

at . . ( )

at Aspose.BarCodeRecognition.BarCodeReader. . . () at Aspose.BarCodeRecognition.BarCodeReader. . .Read()

at Aspose.BarCodeRecognition.BarCodeReader.Read()

at LLR.ScheduledJobs.RelaesEmailConverter.Entity.UnconvertedEmail.lookForBarCodeData(String attFileName, String upperExt) in c:\Users\BreedenD\Documents\Visual Studio 2012\Projects\LLR.ScheduledJobs.RelaesEmailConverter\LLR.ScheduledJobs.RelaesEmailConverter\Entity\UnconvertedEmail.cs:line 128

at LLR.ScheduledJobs.RelaesEmailConverter.Entity.UnconvertedEmail.loadAttachments(EmailMessage mail) in c:\Users\BreedenD\Documents\Visual Studio 2012\Projects\LLR.ScheduledJobs.RelaesEmailConverter\LLR.ScheduledJobs.RelaesEmailConverter\Entity\UnconvertedEmail.cs:line 98

at LLR.ScheduledJobs.RelaesEmailConverter.Entity.UnconvertedEmail..ctor(EmailMessage mail) in c:\Users\BreedenD\Documents\Visual Studio 2012\Projects\LLR.ScheduledJobs.RelaesEmailConverter\LLR.ScheduledJobs.RelaesEmailConverter\Entity\UnconvertedEmail.cs:line 46

at LLR.ScheduledJobs.RelaesEmailConverter.ConvertEmailsJob.processEmail(EmailMessage mail) in c:\Users\BreedenD\Documents\Visual Studio 2012\Projects\LLR.ScheduledJobs.RelaesEmailConverter\LLR.ScheduledJobs.RelaesEmailConverter\ConvertEmailsJob.cs:line 88

at LLR.ScheduledJobs.RelaesEmailConverter.ConvertEmailsJob.readEmails() in c:\Users\BreedenD\Documents\Visual Studio 2012\Projects\LLR.ScheduledJobs.RelaesEmailConverter\LLR.ScheduledJobs.RelaesEmailConverter\ConvertEmailsJob.cs:line 79

at LLR.ScheduledJobs.RelaesEmailConverter.ConvertEmailsJob.Execute(IJobExecutionContext context) in c:\Users\BreedenD\Documents\Visual Studio 2012\Projects\LLR.ScheduledJobs.RelaesEmailConverter\LLR.ScheduledJobs.RelaesEmailConverter\ConvertEmailsJob.cs:line 42

at Quartz.Core.JobRunShell.Run()
Aspose.BarCodeRecognition.License license1 = new Aspose.BarCodeRecognition.License();

license1.SetLicense("Aspose.BarCode.lic");

BarCodeReadType readType = BarCodeReadType.QR;

System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(attFileName);


using (BarCodeReader reader2 = new BarCodeReader(bmp, readType))

{

while (reader2.Read())

{

this.BarCodeData = reader2.GetCodeText();

barCodeDataFound = true;

}

}

bmp.Dispose();

Hi Chip,


Thank you for contacting support. I managed to replicate the the error message. I have logged this problem under ticket id BARCODENET-33676 in our issue tracking. Your request has also been linked to this issue and you will be notified as soon as it is fixed. We’re sorry for your inconvenience.

Hi Chip,


We have a good news for you is BARCODENET-33676 has now been resolved and its fix will be included in the next version of Aspose.BarCode for .NET 5.8.0. Which is expected after two or three weeks. We will inform you via this forum thread as soon as the new release is published.

The issues you have found earlier (filed as BARCODENET-33676) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.