This project has moved and is read-only. For the latest updates, please go here.

Decoding custom text

Jun 6, 2013 at 2:33 PM
Hi. I am using Zxing in a Windows Store app.
I have troubles with decoding QR codes with "Custom text".
Using the same code (modified a little) I have no problems when decoding QR codes containing an URL, but I receive a NullReferenceException when I try to decode QR codes with arbitrary text. This happens also with the Windows RT demo client. This is the stack trace:
at ZXing.QrCode.Internal.AlignmentPattern.op_Implicit(AlignmentPattern point) in c:\Users\michael.jahn\Documents\SVN\ZXing.Net.WINMD\Source\lib\qrcode\detector\AlignmentPattern.cs:line 116
at ZXing.QrCode.Internal.Detector.processFinderPatternInfo(FinderPatternInfo info) in c:\Users\michael.jahn\Documents\SVN\ZXing.Net.WINMD\Source\lib\qrcode\detector\Detector.cs:line 149
at ZXing.QrCode.Internal.Detector.detect(IDictionary2 hints) in c:\Users\michael.jahn\Documents\SVN\ZXing.Net.WINMD\Source\lib\qrcode\detector\Detector.cs:line 93
at ZXing.QrCode.QRCodeReader.decode(BinaryBitmap image, IDictionary
2 hints) in c:\Users\michael.jahn\Documents\SVN\ZXing.Net.WINMD\Source\lib\qrcode\QRCodeReader.cs:line 86
at ZXing.MultiFormatReader.decodeInternal(BinaryBitmap image) in c:\Users\michael.jahn\Documents\SVN\ZXing.Net.WINMD\Source\lib\MultiFormatReader.cs:line 204
at ZXing.MultiFormatReader.decode(BinaryBitmap image, IDictionary`2 hints) in c:\Users\michael.jahn\Documents\SVN\ZXing.Net.WINMD\Source\lib\MultiFormatReader.cs:line 70
at ZXing.BarcodeReader.Decode(LuminanceSource luminanceSource) in c:\Users\michael.jahn\Documents\SVN\ZXing.Net.WINMD\Source\lib\BarcodeReader.WINMD.cs:line 340
at ZXing.BarcodeReader.Decode(WriteableBitmap barcodeBitmap) in c:\Users\michael.jahn\Documents\SVN\ZXing.Net.WINMD\Source\lib\BarcodeReader.WINMD.cs:line 314
at %PATH_TO_MY_CODE%\ProductScanPage.xaml.cs:line 142
Is this some kind of bug? Isn't there a workaround?
Jun 6, 2013 at 3:45 PM
Please post a sample image of a qr code which gives the exception.
Jun 6, 2013 at 3:48 PM
This, for example.
Jun 11, 2013 at 10:28 AM
Any solutions? Was I forgetting something in my code, or there is a bug in ZXing?
Jun 11, 2013 at 5:54 PM
Sorry for late answer. My Win8 system crashed.
I need to repair it before. It will take a little while.
Jun 13, 2013 at 9:30 PM
Jun 13, 2013 at 9:33 PM
Aug 8, 2013 at 4:04 PM
Has this fix been pushed to the Nuget package yet? I still seem to have issues with very short lines of text where the generated QR Code doesn't have an alignment box. I will get a Null Reference Exception every time I scan QR Codes without alignment points.

This QR Code doesn't work

But this one will
Aug 8, 2013 at 4:14 PM
It hasn't been pushed yet.
Hopefully I will finish the next release till the end of august.
Aug 8, 2013 at 4:47 PM
Alright, thanks! This is an amazing tool by the way.
Sep 11, 2013 at 5:02 PM

we actually use the version and also get the error with "Object reference not set to an instance of an object". Do you know, when this error is fixed and pushed?
We have a barcode which can be read at perfectly, but not in our Win8 app.


Thanks in advance.
Sep 12, 2013 at 7:07 AM
Hopefully within the next two weeks.