We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com



I get an IndexOutOfRangeException when I call the Read-Method on the BarCodeReader. But just with the QR Code.

To reproduce the Error, I’ve attached the PNG-File which is not working.

I am using the DLL-Version of Aspose.BarCodeRecognition.dll



Hi Christian,

Thank you for inquiry.

I have reproduced the issue at my end and logged a bug in our system (ID: 21002). We will look into it and will inform you when it will be resolved. Sorry for the inconvenience.


There’s another really serious problem with the BarCodeRecognition. May you please check out the attached solution. You will see that the reading of the BarcodeInformation is in a Parallel statement. This was just a workaround to be able to reproduce the bug.

When you run the application from VS in debug mode, then it will fail with an AccessViolationException. This is the first strange thing, due the fact, that this exception should be catched explicit. Then press F10. The cursor goes to the Exception block, not to the AccessViolationException block. This is the next strange thing, and you will see that the exception is now an ArgumentException.

Next try to run the application with the ConsoleApplication1.exe directly. It crashes. But it souldn’t, because there’s a try/catch around the problematical lines.

So, there are two really serious problems. The first is, that it crashes. It has to do with the Constructor of the BarCodeReader with the Bitmap parameter. When using the filename, only, and only sometimes, the IndexOutOfRange Exception occures, which is not such a big problem, because you can catch it.

And this is the really hard problem now with the AccessViolationException. Because you can’t catch it! Never seen that. In production this can cause a total crash of the hole Application!!

I tryed also to use the lock statemant. In this case it works, and it does not crash anymore. But in the real application I had still the same problem even with the lock, and just sometimes…



Hi Christian,

The IndexOutOfRangeException raised during recognition is a bug and we are working on it.

But, the AccessViolationException is due to the usage of BarCodeReader class in a multi-threaded environment. This class is not thread safe. It would work as expected, if you use it without “Parallel.For” statement. I have also logged this issue in our system (ID: 21553). We will check if it can be made threadsafe, so that it could be used in multi-threaded environment.

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

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

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

This message was posted using Notification2Forum from Downloads module by aspose.notifier.