Description
System information (version)
- OpenCV => 4.5.4
- Operating System / Platform => Ubuntu 20.04
- Compiler => Visual Studio Code 1.63.2
Detailed description
I've implemented the WeChat QR Code Scanner in a similar fashion to the one included in guides such as this one and this one (C++ implementations). The QR scanner seems to work in general, but we have noticed occasions where the process just crashes silently. After launching the script in debugging mod we have cached the following errors:
Object "/usr/local/lib/libopencv_wechat_qrcode.so.4.5", at 0x7fae230675ca, in cv::wechat_qrcode::WeChatQRCode::detectAndDecode[abi:cxx11](cv::_InputArray const&, cv::_OutputArray const&)
Object "/usr/local/lib/libopencv_wechat_qrcode.so.4.5", at 0x7fae23066fdb, in cv::wechat_qrcode::WeChatQRCode::Impl::decode[abi:cxx11](cv::Mat const&, std::vector<cv::Mat, std::allocator<cv::Mat> >&, std::vector<cv::Mat, std::allocator<cv::Mat> >&)
Thread 1 "qr_scan" received signal SIGSEGV, Segmentation fault. 0x00007ffff7cc1097 in zxing::qrcode::Detector::sizeOfBlackWhiteBlackRun(int, int, int, int) () from target:/usr/local/lib/libopencv_wechat_qrcode.so.4.5
Steps to reproduce
For reproducing, you can use the scanner method detectAndDecode
with the following image. We have found that this image manages to crash the scanner: