Hi there!
I have come across some unusual behavior while using the latest version of Aspose.Barcode .NET (24.7.0) to read barcodes. I made a test program to run barcode recognition 100 times: ReproduceBarcodeIssue.zip (27.7 KB)
It runs barcode recognition on the following image:
BarcodeTypes.zip (4.9 MB)
Which is placed in the C:\Test\TestInput
directory.
Note that I did not include the license or NuGet dependencies, so you need to add your license as ReproduceBarcodeIssue.Properties.Resources.Aspose_Total_NET
and install the latest version of System.Drawing.Common
and of course Aspose.Barcode
.
The results are written and appended to BarCodes.txt
in the executable directory.
When trying to read barcodes from the multi page TIFF image and extract the barcode values and types, there are different results on different machines. On machine #1 I ran barcode recognition 100 times. The function was able to extract 4 barcodes on page 1 as seen below:
Supplement : 82
EAN8 : 12345670
Supplement : 17
EAN8 : 00345675
But only 95/100 times. 5/100 times it did not recognize any barcodes on page 1.
When running the exact same program on machine #2, it produced different results:
EAN8 : 12345670
EAN8 : 00345675
It did not recognize the two Supplement
codes. It’s also interesting to note that it recognized these barcodes on page 1 100/100 times, unlike on machine #1.
The barcodes recognized on page 2 were always the same. Page 3 never had any barcodes recognized.
In other words; there seems to be entirely different barcode recognition behavior depending on the machine it is run on, and the barcode recognition is sometimes unreliable.
I’m not sure if this is unintended behavior but it would at least be nice to get an explanation on why this could happen. Either way it seems unintended and should be fixed, as this is unreliable.
@frimbingpickering,
Thanks for the sample app, multi-page TIFF image and details.
I tested your exact project with your provided TIFF image and got consistent results. It gives me same results all the way from 1 to 100 iterations. Please find attached the output text file with results for reference.
BarCodes.zip (1.1 KB)
I tested it in VS.NET 2022 on my system (OS: Windows11, cpu: core i7 64-bit (x64-based)). Could you please give us your machine configurations where it did not give consistent results?
Thanks for the quick response!
It is strange, but entirely possible that you got the same results in the 100 iterations as I have seen consistent results on one system. Of course the trouble is that it seemed to vary from system to system.
The two systems I ran this test on have the following specs:
System 1:
OS: Windows 11 Pro (x64)
CPU: Intel i5-8350U
RAM: 8GB
System 2:
OS: Windows Server 2016 Standard (x64)
CPU: Intel Xeon E5-2687W
RAM: 12GB
Here are the results from my runs on the two systems:
BarCodeResults.zip (2.1 KB)
I did more runs than just these, but with different versions of Aspose.Barcode. All runs showed similar results.
@frimbingpickering,
Thanks for providing further details and output text files.
One of the text files shows valid and consistent results. Could you please share its machine details and configurations? It may help a bit. In any case, since you find the issue and find different results on different machines, we will investigate why BarCode recognition is inconsistent and behaves differently on different machines.
We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): BARCODENET-39088
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
EAN-8 and Supplement(EAN-5 and EAN-2) have checksum with insufficient for low quality (~75dpi) barcode images, which are provided in the issue (especially EAN-2).
Our recognition engine tries to recognize it, but:
- the engine is run multi-threadly, this could sometimes (rare cases) create different result on machines with different number of processor cores on doubtful barcodes;
- on low quality images it is impossible to recognize correct result and the engine provides most suitable result.
We will try to fix fake recognition, but I do not think that the barcodes with provided quality could be recognized correctly.