LINUX+QT+OPENCV Camera Debugging experience (3)----GLIBC detected * * FREE (): Invalid Pointer:0xafeff000__linux

Source: Internet
Author: User

The camera preview is normal, when you click the "Exit button", or when you close the running form, the following compiler output bar pops up with a bunch of warnings, as follows:

GLIBC detected * * */home/yan/qt/camera_read_opencv_v1-build-desktop-desktop_qt_4_8_0_for_gcc__qt_sdk____/ Camera_read_opencv_v1:free (): Invalid pointer:0xafeff000 * * *
======= BackTrace: =========
/lib/i386-linux-gnu/libc.so.6 (+0X6EBC2) [0X908BC2]
/lib/i386-linux-gnu/libc.so.6 (+0x6f862) [0x909862]
/lib/i386-linux-gnu/libc.so.6 (CFREE+0X6D) [0x90c94d]
/usr/lib/libcxcore.so.2.1 (_zn2cv8fastfreeepv+0x23) [0XE236A3]
/usr/lib/libcxcore.so.2.1 (cvfree_+0x1c) [0xe23c2c]
/usr/lib/libcxcore.so.2.1 (CVRELEASEIMAGEHEADER+0X6A) [0xe5b7ba]
/usr/lib/libcxcore.so.2.1 (cvreleaseimage+0x3f) [0XE5B8FF]
/home/yan/qt/camera_read_opencv_v1-build-desktop-desktop_qt_4_8_0_for_gcc__qt_sdk____/camera_read_opencv_v1[ 0X804A679]
/home/yan/qt/camera_read_opencv_v1-build-desktop-desktop_qt_4_8_0_for_gcc__qt_sdk____/camera_read_opencv_v1[ 0X804A1F3]
/lib/i386-linux-gnu/libc.so.6 (__LIBC_START_MAIN+0XF3) [0x8b3113]
/home/yan/qt/camera_read_opencv_v1-build-desktop-desktop_qt_4_8_0_for_gcc__qt_sdk____/camera_read_opencv_v1[ 0X804A249]
======= Memory Map: ========
00110000-003f1000 R-xp 00000000 08:01 557615/home/yan/qtsdk/desktop/qt/4.8.0/gcc/lib/libqtcore.so.4.8.0
003f1000-003f8000 r--p 002e0000 08:01 557615/home/yan/qtsdk/desktop/qt/4.8.0/gcc/lib/libqtcore.so.4.8.0
003f8000-003fb000 rw-p 002e7000 08:01 557615/home/yan/qtsdk/desktop/qt/4.8.0/gcc/lib/libqtcore.so.4.8.0
003fb000-00417000 R-xp 00000000 08:01 394171/lib/i386-linux-gnu/libgcc_s.so.1
00417000-00418000 r--p 0001b000 08:01 394171/lib/i386-linux-gnu/libgcc_s.so.1 ........ Wait a lot.

Cause: In the destructor of Camerawidget, the order of releasing the pointer is not correct, it should be cvreleasecapture (&capture), then Cvreleaseimage (&img);

Remark: img = cvqueryframe (capture). This warning occurs if the memory release order is reversed.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.