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

Bugfix UPCAReader #4

Closed
wants to merge 6 commits into from
Closed

Bugfix UPCAReader #4

wants to merge 6 commits into from

Conversation

SebGDev
Copy link
Contributor

@SebGDev SebGDev commented Jan 20, 2015

The maybeReturnResult function checks whether the Result is UPCA or EAN13. The old version returned an uninitialised Ref (at the EAN13 case) which let MultiFormatUPCEANReader::decodeRow (line 90)
crash because a Result is assumed.

The bugfix is technically oriented at the java version.

Note: This error doesn't appear at normal tests because the MultiFormatUPCEANReader
uses the EAN13 reader for UPC-A detection. The UPCAReader is only used if
DecodeHints BarcodeFormat::UPC_A ist set.

…Result

is UPCA or EAN13. The old version returned an uninitialised Ref<Result>
(at the EAN13 case) which let MultiFormatUPCEANReader::decodeRow (line 90)
crash because a Result is assumed.

The bugfix is technically oriented at the java version.

Note: This error doesn't appear at normal tests because the MultiFormatUPCEANReader
uses the EAN13 reader for UPC-A detection. The UPCAReader is only used if
DecodeHints BarcodeFormat::UPC_A ist set.
Old zxing issue:
https://code.google.com/p/zxing/issues/detail?id=1796

This is really strange, because GenericGF has a GenericGFPoly reference and
GenericGFPoly has a GenericGF reference the zxing:Ref "garbage collection" is
not working properly.
The bugfix replaced GenericGF zxing:Ref in GenericGFPoly with a normal reference.
The same trick is used at ModulusPoly.h (pdf417\decoder\ec).
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

Successfully merging this pull request may close these issues.

None yet

3 participants