ChecksumValidation.Default incorrect with MSI barcode

Hello, we’ve encountered an issue with MSI barcode recognition using ChecksumValidation.Default and Aspose.Barcode 24.12.0. According to documentation checksum for MSI is optional, but since 24.12.0 it does not seem to be the case. You can check this behavior using following code snippet:

using Aspose.BarCode.BarCodeRecognition;
using Aspose.BarCode.Generation;

var filename = string.Format("D:\\MsiTEST\\{0}.png", Aspose.BarCode.BuildVersionInfo.AssemblyVersion);

using (BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.MSI, "0831139"))
{
  gen.Parameters.Barcode.IsChecksumEnabled = EnableChecksum.No;
  gen.Save(filename, BarCodeImageFormat.Png);
}

Console.WriteLine("ReadChecksum:");
Console.WriteLine("ChecksumValidation: Default");
using (BarCodeReader read = new BarCodeReader(filename, DecodeType.MSI))
{
  read.BarcodeSettings.ChecksumValidation = ChecksumValidation.Default;
  foreach (BarCodeResult result in read.ReadBarCodes())
  {
    Console.WriteLine($"CodeType:{result.CodeTypeName}");
    Console.WriteLine($"CodeText:{result.CodeText}");
    Console.WriteLine($"1D Value:{result.Extended.OneD.Value}");
    Console.WriteLine($"1D CheckSum:{result.Extended.OneD.CheckSum}");
  }
}

If you run this code with Aspose.Barcode version 24.12.0 or higher you will see that generated MSI barcode is not being recognized, but on version 24.11.0 and lower it gets recognized.
It seems like since 24.12.0 ChecksumValidation.Default for MSI is equal to YES, when according to documentation it should be equal to NO, as it was in earlier versions.

@directum,

Thanks for the details and code snippet.

I am able to reproduce the issue as you mentioned by using your sample code snippet. I found ChecksumValidation.Default is incorrect with MSI barcode in newer versions. It works as expected when I use 24.11.0 or older versions.

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-39248

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.

There is also seem to be a problem with MSI barcode generation.

using (BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.MSI, "0831139"))
{
  gen.Parameters.Barcode.CodeTextParameters.Location = CodeLocation.Below;
  gen.Save(filename, BarCodeImageFormat.Png);
}

Generated barcodes with this code differ between 24.11.0 and 24.12.0. Seems like source of problem is the same but worth noting.

24.11.0.png (4.0 KB)

24.12.0.png (4.1 KB)

@directum,

Thank you for sharing additional details and the barcode images.

You are correct; there are slight differences between the barcode images generated by the older and newer versions. We have logged this under your existing ticket in our system and will investigate the issue promptly.

Yes, we changed MSI recognition with checksum by the default, because:

Sorry, that we did not inform about these changes in release notes.