Closed rjmatthews62 closed 4 years ago
same for "ZXing.HybridBinarizer.pas"
procedure THybridBinarizer.BinarizeEntireImage;
...
newMatrix := nil; //+
try
...
self.matrix := newMatrix;
newMatrix := nil; //+
finally
//newMatrix := nil; //-
newMatrix.Free; //+
...
@m
I'm getting an Access violation in: Lib\Classes\2D Barcodes\Decoder\ZXing.Datamatrix.Internal.Decoder.pas
function TDataMatrixDecoder.decode(bits: TBitMatrix): TDecoderResult;
It's happening when the finally section frees DataBlock
And this is happening because there are some situations where Datablock is undefined at that point. The fix is the initialize DataBlock to nil at the top of the function.
Issue is occurring in Delphi 10.2, Win 32, VCL
Thanks! The fix will be in the next release today.
procedure THybridBinarizer.BinarizeEntireImage; ... newMatrix := nil; //+ try ... self.matrix := newMatrix; newMatrix := nil; //+ finally //newMatrix := nil; //- newMatrix.Free; //+ ...
Hi Pult,
I do not agree with you here:
self.matrix points now to the newMatrix. Freeing newMatrix will free self.matrix. The initialization of the the varaible newMatrix is good and will be in the next release (today).
If I have it wrong please open a seperate issue and we can discuss it.
see: newMatrix := nil; newMatrix is freed only in case of an exception
Hi Spelt! For some reason, when generating a new QR Code, it consistently omits all zeros (0). Is there a setting for this, or could it possibly be a bug? When I use leading zeros for a string to encode, all the zeros show up. But whenever a zero finds itself in the middle pf a string, ZXing omits it. All zeros are simply removed from the result string. Code output is set to Auto and the quiet zone is set to 4.
I'm getting an Access violation in: Lib\Classes\2D Barcodes\Decoder\ZXing.Datamatrix.Internal.Decoder.pas
function TDataMatrixDecoder.decode(bits: TBitMatrix): TDecoderResult;
It's happening when the finally section frees DataBlock
And this is happening because there are some situations where Datablock is undefined at that point. The fix is the initialize DataBlock to nil at the top of the function.
Issue is occurring in Delphi 10.2, Win 32, VCL