You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed quite a large memory leak using the Hybrid Binarizer (at least under certain circumstances). I've started debugging but so far haven't figured it out. Any ideas about this? Below is a repro (will eat up several GB quickly) as well as some valgrind output. Any help would be appreciated.
Valgrind:
==14603== 13,160,000 bytes in 7 blocks are possibly lost in loss record 1,401 of 1,408
==14603== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==14603== by 0x4E7FC28: zxing::BitMatrix::BitMatrix(int, int) (in /usr/local/lib/libzxing.so)
==14603== by 0x4E88FFB: zxing::HybridBinarizer::getBlackMatrix() (in /usr/local/lib/libzxing.so)
==14603== by 0x4E7E771: zxing::BinaryBitmap::getBlackMatrix() (in /usr/local/lib/libzxing.so)
==14603== by 0x4EE05F6: zxing::qrcode::QRCodeReader::decode(zxing::Ref<zxing::BinaryBitmap>, zxing::DecodeHints) (in /usr/local/lib/libzxing.so)
==14603== by 0x4EA9211: zxing::MultiFormatReader::decodeInternal(zxing::Ref<zxing::BinaryBitmap>) (in /usr/local/lib/libzxing.so)
==14603== by 0x4EAA40C: zxing::MultiFormatReader::decode(zxing::Ref<zxing::BinaryBitmap>, zxing::DecodeHints) (in /usr/local/lib/libzxing.so)
==14603== by 0x113D31: read_image(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, zxing::Ref<zxing::LuminanceSource>, bool, bool, bool) (in /media/user/data/doc/dev/test/zxing-opencv/build/zxtest)
==14603== by 0x114679: decodeDataMatrix[abi:cxx11](cv::Mat const&) (in /media/user/data/doc/dev/test/zxing-opencv/build/zxtest)
==14603== by 0x1148B4: main (in /media/user/data/doc/dev/test/zxing-opencv/build/zxtest)
==14603==
==14603== 148,527,568 (4,128 direct, 148,523,440 indirect) bytes in 86 blocks are definitely lost in loss record 1,406 of 1,408
==14603== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==14603== by 0x4E88FEA: zxing::HybridBinarizer::getBlackMatrix() (in /usr/local/lib/libzxing.so)
==14603== by 0x4E7E771: zxing::BinaryBitmap::getBlackMatrix() (in /usr/local/lib/libzxing.so)
==14603== by 0x4EE05F6: zxing::qrcode::QRCodeReader::decode(zxing::Ref<zxing::BinaryBitmap>, zxing::DecodeHints) (in /usr/local/lib/libzxing.so)
==14603== by 0x4EA9211: zxing::MultiFormatReader::decodeInternal(zxing::Ref<zxing::BinaryBitmap>) (in /usr/local/lib/libzxing.so)
==14603== by 0x4EAA40C: zxing::MultiFormatReader::decode(zxing::Ref<zxing::BinaryBitmap>, zxing::DecodeHints) (in /usr/local/lib/libzxing.so)
==14603== by 0x113D31: read_image(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, zxing::Ref<zxing::LuminanceSource>, bool, bool, bool) (in /media/user/data/doc/dev/test/zxing-opencv/build/zxtest)
==14603== by 0x114679: decodeDataMatrix[abi:cxx11](cv::Mat const&) (in /media/user/data/doc/dev/test/zxing-opencv/build/zxtest)
==14603== by 0x1148B4: main (in /media/user/data/doc/dev/test/zxing-opencv/build/zxtest)
==14603==
==14603== 152,287,568 (4,128 direct, 152,283,440 indirect) bytes in 86 blocks are definitely lost in loss record 1,408 of 1,408
==14603== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==14603== by 0x4E88FEA: zxing::HybridBinarizer::getBlackMatrix() (in /usr/local/lib/libzxing.so)
==14603== by 0x4E7E771: zxing::BinaryBitmap::getBlackMatrix() (in /usr/local/lib/libzxing.so)
==14603== by 0x4EE05F6: zxing::qrcode::QRCodeReader::decode(zxing::Ref<zxing::BinaryBitmap>, zxing::DecodeHints) (in /usr/local/lib/libzxing.so)
==14603== by 0x4EA9211: zxing::MultiFormatReader::decodeInternal(zxing::Ref<zxing::BinaryBitmap>) (in /usr/local/lib/libzxing.so)
==14603== by 0x4EAA40C: zxing::MultiFormatReader::decode(zxing::Ref<zxing::BinaryBitmap>, zxing::DecodeHints) (in /usr/local/lib/libzxing.so)
==14603== by 0x113D31: read_image(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, zxing::Ref<zxing::LuminanceSource>, bool, bool, bool) (in /media/user/data/doc/dev/test/zxing-opencv/build/zxtest)
==14603== by 0x11454D: decodeDataMatrix[abi:cxx11](cv::Mat const&) (in /media/user/data/doc/dev/test/zxing-opencv/build/zxtest)
==14603== by 0x1148B4: main (in /media/user/data/doc/dev/test/zxing-opencv/build/zxtest)
I've noticed quite a large memory leak using the Hybrid Binarizer (at least under certain circumstances). I've started debugging but so far haven't figured it out. Any ideas about this? Below is a repro (will eat up several GB quickly) as well as some valgrind output. Any help would be appreciated.
Valgrind:
Repro:
The text was updated successfully, but these errors were encountered: