-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ancient regression in qrdectxt.c #237
Comments
I have to say that qr_code_data_list_extract_text() is a freakish example of what LT calls the "function-growth-hormone-imbalance syndrome."
That's an over-complicated way of saying there's one QR_MODE_BYTE entry with a 3-byte UTF-8 BOM, followed by a QR_MODE_ALNUM entry with the actual useful text. |
Maybe this helps? |
I noticed that too, and tried it. Nope, it makes no difference in my case. |
Not really sure there, that function is weird, kinda hard to tell in what cases will fall through to the I mean if |
+1, see above. Also some unit tests. |
Ow! Ow! Ow! This code is making my head hurt! |
Seems to fix issues mchehab#106 and mchehab#237 Could use more testing
I posted my development tree at https://github.com/ldoolitt/zbar/tree/qrdectxt_work |
No comments positive or negative in two months. |
In the olden times, when men were men and giants roamed the earth,
zbar could decode the attached image as "LBNL DIGITIZER V1.1 SN 342".
Starting with merge commit 9222475 (Feb 4, 2019), it fails. I localized the actual origin to commit 6d02875, "handle multi-byte sequence split apart", pushed to a branch in Feb, 2014. Props to git for letting me find this! I was actually able to build a zbarimg binary on stock Debian Bullseye with commit dbb82d7 that works.
After isolating the problem, I found chatter here #64 suggesting that add the -Sqr.binary flag would work around the problem.
It does. :-)
I call it a workaround because "LBNL DIGITIZER V1.1 SN 342" is not actually binary. Also, code from the Debian Stretch era handled this case without needing a binary flag.
I'm convinced that patch from 2014 is buggy. It's pretty complicated, and it would take me a while to try to improve it without breaking a bunch of other use cases. @benck, do you remember how that commit was intended to work, and maybe help figure out how this case trips it up?
The text was updated successfully, but these errors were encountered: