Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Interger overflow" error occur #133

Closed
wwq0071 opened this issue May 20, 2022 · 8 comments
Closed

"Interger overflow" error occur #133

wwq0071 opened this issue May 20, 2022 · 8 comments

Comments

@wwq0071
Copy link

wwq0071 commented May 20, 2022

1
I can't recognize this picture。it raise an error "Interger overflow" ,and This QR code is legal!!!

@DValue
Copy link

DValue commented Jun 1, 2022

It happens to me, too, quite often

@Spelt
Copy link
Owner

Spelt commented Jun 1, 2022

Which platform ? Windows 32? Winows 64? IOS? Or Android?

@DValue
Copy link

DValue commented Jun 1, 2022

Which platform ? Windows 32? Winows 64? IOS? Or Android?

My problem appears in Android,1D or 2D encountered

@Spelt
Copy link
Owner

Spelt commented Jun 1, 2022

On Windows and IOS64 it works.

I don't have an Android here to test. That has to wait.

Do you use PURE_BARCODE ? Like:

hints := TDictionary<TDecodeHintType, TObject>.Create();
hints.Add(TDecodeHintType.PURE_BARCODE, nil);
result := Decode('problem-qr-android 64bit.png', TBarcodeFormat.QR_CODE, hints);

If you do can you try again without this option?

@wwq0071
Copy link
Author

wwq0071 commented Jun 2, 2022

Which platform ? Windows 32? Winows 64? IOS? Or Android?

On Windows 32 or 64.

@wwq0071
Copy link
Author

wwq0071 commented Jun 2, 2022

you can try "vclTestApp" this demo to build it with win32. and use the QR Code Pictures I provided to test!

Spelt pushed a commit that referenced this issue Jun 3, 2022
@Spelt
Copy link
Owner

Spelt commented Jun 3, 2022

Hi,

I provided an update.

The cause of this over flow bug is in the EAN decoder. What exacly the cause of this bug is is unknown. I fixed it by eating the exception. It will happen only once when scanning the same type of barcodes. If there is an attached Delphi debugger the exception will still be thrown in the IDE.

Some extra information:
When the decoder is set to TBarcodeFormat.Auto then all the available 1D decoders (Like EAN, Code128) and then all 2D decoders (QRCode) gets executed in that order until a decode is successfull. If a barcode is successfully decoded then this decoder will be set in the top of the decoder list so when a next scan happens the first decoder will probably be the succesfull decoder.

if you know in front that you only scan QR Codes then you can also set:
result := Decode('q8.png', TBarcodeFormat.QR_CODE);

@Spelt
Copy link
Owner

Spelt commented Nov 18, 2022

I close this one. If there are any problems, please reopen.

@Spelt Spelt closed this as completed Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants