Spire.Barcode is a professional barcode library specially designed for .NET developers (C#, VB.NET, ASP.NET, .NET Core) and Java developers (J2SE and J2EE) to generate, read and scan 1D & 2D barcodes.

Fri Jan 23, 2015 3:52 am

I am getting this error from spire barcode with some image scans:

Index was outside the bounds of the array.

at sprᢧ.ᜀ(sprឧ A_0)
at sprᢧ.ᜀ(sprឧ A_0, spr᣾ A_1)
at sprᢧ.ᜀ(spr᣾ A_0)
at sprᢷ.ᜀ(Object A_0, spr៉ A_1)
at spr᣿.ᜀ(Object A_0, spr៉ A_1)
at sprᢓ.ᜀ(spr᣾ A_0)
at sprឯ.ᜁ(sprᣥ A_0)
at sprឯ.ᜀ(sprᣥ A_0)
at sprᢜ.ᜁ(sprᣥ A_0)
at sprᢜ.ᜀ(sprᣥ A_0)
at spr᠘.ᜁ.ᜍ()
at spr᠘.ᜁ.ᜟ()
at spr᠘.ᜎ()
at Spire.Barcode.BarcodeScanner.Scan(Bitmap bitmap)

It doesn't happen all the time but it does occur quite often, maybe one in 100 or so.


Posts: 1
Joined: Fri Jan 23, 2015 3:49 am

Fri Jan 23, 2015 6:08 am

Hello richardsawyer,

Thanks for your inquiry.

To help us reproduce this issue, can you send us some test images and code snippets? It would be very helpful if you can share a sample project.

Thank you.
Best Regards,
E-iceblue Support Team
User avatar

Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Tue Jan 27, 2015 3:03 pm

I have something similar but at image generation:

Code: Select all
   w sprក.ᜁ(String A_0, Int32 A_1)
   w sprក.ᜄ(String A_0)
   w sprក.ᜀ(String A_0, Boolean A_1)
   w sprក.ᜀ(String A_0)
   w sprᡅ.ᜅ()
   w sprᡅ.ᜒ()
   w sprᡅ.᜗()
   w sprb.ᜐ()
   w Spire.Barcode.BarCodeGenerator.GenerateImage()

And here's the code:
Code: Select all
            BarcodeSettings settings = new BarcodeSettings()
                X = BarModule,
                BarHeight = Height,
                Unit = GraphicsUnit.Millimeter,
                AutoResize = true,
                Data = BarValue,
                Type = BarCodeType.EAN128,
                ResolutionType = ResolutionType.Printer,
            BarCodeGenerator generator = new BarCodeGenerator(settings);
            Image theImage = generator.GenerateImage();

This error shows up only and every time when BarcodeSettings.Data ends with "f" and there're no other chars then digits nad "f" in the input string. Examples: "020000005005914010ff", "020000fffff005005914010ff", but "020000a005005914010ff" is OK.


Posts: 1
Joined: Tue Jan 27, 2015 2:35 pm

Wed Jan 28, 2015 2:26 am

Hello Psztymucel,

Thanks for your inquiry.

I have reproduced this problem and posted it to our dev team, we will inform you if there is any update.
Best Regards,
E-iceblue Support Team
User avatar

Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.BarCode