zxing-cpp: Assert in RegressionLine::evaluate due to empty points
15:00:41: Starting D:\DEV\Qt\build-zxing-qt-Desktop_Qt_6_3_2_MSVC2019_64bit-Debug\debug\zxing-qt.exe...
QML debugging is enabled. Only use this in a safe environment.
Aztec|Codabar|Code39|Code93|Code128|DataBar|DataBarExpanded|DataMatrix|EAN-8|EAN-13|ITF|MaxiCode|PDF417|QRCode|UPC-A|UPC-E|MicroQRCode
15:00:43: D:\DEV\Qt\build-zxing-qt-Desktop_Qt_6_3_2_MSVC2019_64bit-Debug\debug\zxing-qt.exe crashed.
Also, BarcodeFormat::Any
is missing at ZXingQtReader.h
Any = LinearCodes | MatrixCodes
PS: build: 6.3.2 Qmake MSVC 2019 64bit PS2: Crash also on 6.5.0: https://github.com/zxing-cpp/zxing-cpp/discussions/559#discussioncomment-5826563
Edit:
Commenting MediaDevices
& derived code (comboBox model etc) avoids the immediate crash but the app hangs until it crashes.
Not having a proper barcode (or any) in front of the camera seems to make it crash quicker.
Disabling Try Harder
and Matrix Codes
“improves” when no barcode is detected but hangs (not like before, at least) when it can’t easily decode the barcode
Having a barcode in front of the camera avoids the crash for some time
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 21 (13 by maintainers)
Commits related to this issue
- DataMatrix: fix assert in RegressionLine::evaluate (fix #593) — committed to DreamForTek/zxing-cpp by axxel 8 months ago
I think it did help. 😃. It made me realize that it is indeed quite possible that I could end up with a set of points who’s regression line is in fact further away than 3 pixels from all individual points. I still don’t understand how the code could end up placing those random points into the
line
but that is enough insight for me to fix this without feeling that I missed something completely.Thanks for the detailed set of screenshots. You seem to know your way around a debugger. Would it be possible for you do something along the lines of what I described here? The goal would be to generate a png-file from your camera input that I can then use to reproduce the issue on my machine. This (second) crash has likely nothing to do with Qt.
The immediate crash might but to get closer to that problem, a trace of that crash would be required as well.