ubuntu + opencv + qtcreator 出现无效指针 realloc(): invalid pointer解决方法

 配置的环境

首先提我电脑上所配置的环境是: ubuntu 13.04+opencv 2.4.0 +qtcreator 4.7.2~因为如果是不同的版本会导致出不同的问题,特别是在使用过程中库的调用。

首先提一下opencv 2.4.0 +qtcreator 4.7.2的安装与配置,由于qtcreator中4.8与4.7的库有很大的改动,且4.8以上的qtcreator可以直接在ubuntu 自带的 software center 中直接安装就可以,由于为与旧的程序接轨,不想重新更改旧工程中的库,本人不得不放弃software center 中便捷的安装方法。所以建议新安装的同学们,可以考虑直接在center 里面安装,方便又快捷。

QT用的源是qt-everywhere-opensource-src-4.7.2.tar.gz,安装方法是参考http://www.cppblog.com/dragon/archive/2011/12/15/162155.html ,当然前提是安装了G++。

Opencv用的源是OpenCV-2.4.0.tar.bz2,这些源建议大家直接去官方网上去下载,各种版本就有尽有。不过在安装opencv之前要装很多的依赖库,视频的音频的还有摄像头的。如果没有用到摄像头的话是参考http://blog.sina.com.cn/s/blog_8835a8480100x23h.html,视频/音频这些就可以搞定。

opencv qtcreator 安装完后,在qtcreator新建工程中添加opencv 库

LIBS +=  -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann

INCLUDEPATH += /usr/local/include \
                /usr/local/include/opencv \
                /usr/local/include/opencv2

LIBS += /usr/local/lib/libopencv_highgui.so \
        /usr/local/lib/libopencv_core.so \
        /usr/local/lib/libopencv_imgproc.so

利用测试程序都运行OK

。。。

好久时间过后,运行一个大的程序发现出现一个无效指针 realloc(): invalid pointer的问题:编译输出如下

realloc(): invalid pointer: 0xb6268f54 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x767e2)[0xb5d277e2]
/lib/i386-linux-gnu/libc.so.6(realloc+0x263)[0xb5d2b3e3]
/usr/lib/i386-linux-gnu/libQt5Core.so.5(_ZN9QListData7reallocEi+0x37)[0xb4752567]
/usr/lib/i386-linux-gnu/libQt5Core.so.5(_ZN9QListData6appendEi+0x7c)[0xb475264c]
/usr/lib/i386-linux-gnu/libQt5Core.so.5(_ZN9QListData6appendEv+0x23)[0xb47526d3]
/usr/lib/i386-linux-gnu/libQt5Core.so.5(+0x17f82e)[0xb483282e]
/usr/lib/i386-linux-gnu/libQt5Core.so.5(_Z21qRegisterResourceDataiPKhS0_S0_+0x101)[0xb482f211]
/usr/lib/i386-linux-gnu/libQt5Core.so.5(+0x2a7439)[0xb495a439]
/usr/lib/i386-linux-gnu/libQt5Core.so.5(+0x52d74)[0xb4705d74]
/lib/ld-linux.so.2(+0xf216)[0xb7780216]
/lib/ld-linux.so.2(+0xf2fc)[0xb77802fc]
/lib/ld-linux.so.2(+0x11df)[0xb77721df]
======= Memory map: ========
08048000-081cb000 r-xp 00000000 08:0c 260629     /home/lcmliao/qttest/v3-build-desktop/v3
081cb000-081cc000 r--p 00182000 08:0c 260629     /home/lcmliao/qttest/v3-build-desktop/v3
081cc000-081cd000 rw-p 00183000 08:0c 260629     /home/lcmliao/qttest/v3-build-desktop/v3
09809000-0982a000 rw-p 00000000 00:00 0          [heap]
b200c000-b2013000 rw-p 00000000 00:00 0  
b2013000-b3182000 r-xp 00000000 08:0a 267555     /usr/lib/i386-linux-gnu/libicudata.so.48.1.1
b3182000-b3183000 r--p 0116e000 08:0a 267555     /usr/lib/i386-linux-gnu/libicudata.so.48.1.1
b3183000-b3184000 rw-p 0116f000 08:0a 267555     /usr/lib/i386-linux-gnu/libicudata.so.48.1.1
b3184000-b31a9000 r-xp 00000000 08:0a 786790     /lib/i386-linux-gnu/liblzma.so.5.0.0
b31a9000-b31aa000 r--p 00024000 08:0a 786790     /lib/i386-linux-gnu/liblzma.so.5.0.0
b31aa000-b31ab000 rw-p 00025000 08:0a 786790     /lib/i386-linux-gnu/liblzma.so.5.0.0
b31ab000-b31ac000 rw-p 00000000 00:00 0  
b31ac000-b31b1000 r-xp 00000000 08:0a 266280     /usr/lib/i386-linux-gnu/libXdmcp.so.6.0.0
b31b1000-b31b2000 r--p 00004000 08:0a 266280     /usr/lib/i386-linux-gnu/libXdmcp.so.6.0.0
b31b2000-b31b3000 rw-p 00005000 08:0a 266280     /usr/lib/i386-linux-gnu/libXdmcp.so.6.0.0
b31b3000-b31b5000 r-xp 00000000 08:0a 266269     /usr/lib/i386-linux-gnu/libXau.so.6.0.0
b31b5000-b31b6000 r--p 00001000 08:0a 266269     /usr/lib/i386-linux-gnu/libXau.so.6.0.0
b31b6000-b31b7000 rw-p 00002000 08:0a 266269     /usr/lib/i386-linux-gnu/libXau.so.6.0.0
b31b7000-b31dc000 r-xp 00000000 08:0a 786763     /lib/i386-linux-gnu/libexpat.so.1.6.0
b31dc000-b31de000 r--p 00025000 08:0a 786763     /lib/i386-linux-gnu/libexpat.so.1.6.0
b31de000-b31df000 rw-p 00027000 08:0a 786763     /lib/i386-linux-gnu/libexpat.so.1.6.0
b31df000-b31e3000 r-xp 00000000 08:0a 786891     /lib/i386-linux-gnu/libuuid.so.1.3.0
b31e3000-b31e4000 r--p 00003000 08:0a 786891     /lib/i386-linux-gnu/libuuid.so.1.3.0
b31e4000-b31e5000 rw-p 00004000 08:0a 786891     /lib/i386-linux-gnu/libuuid.so.1.3.0
b31e5000-b31e6000 rw-p 00000000 00:00 0  
b31e6000-b333c000 r-xp 00000000 08:0a 266188     /usr/lib/i386-linux-gnu/libicuuc.so.48.1.1
b333c000-b3346000 r--p 00155000 08:0a 266188     /usr/lib/i386-linux-gnu/libicuuc.so.48.1.1
b3346000-b3347000 rw-p 0015f000 08:0a 266188     /usr/lib/i386-linux-gnu/libicuuc.so.48.1.1
b3347000-b334b000 rw-p 00000000 00:00 0  
b334b000-b3517000 r-xp 00000000 08:0a 267550     /usr/lib/i386-linux-gnu/libicui18n.so.48.1.1
b3517000-b351e000 r--p 001cb000 08:0a 267550     /usr/lib/i386-linux-gnu/libicui18n.so.48.1.1
b351e000-b351f000 rw-p 001d2000 08:0a 267550     /usr/lib/i386-linux-gnu/libicui18n.so.48.1.1
b351f000-b35ad000 r-xp 00000000 08:0a 266882     /usr/lib/i386-linux-gnu/liborc-0.4.so.0.17.0
b35ad000-b35ae000 r--p 0008e000 08:0a 266882     /usr/lib/i386-linux-gnu/liborc-0.4.so.0.17.0
b35ae000-b35b2000 rw-p 0008f000 08:0a 266882     /usr/lib/i386-linux-gnu/liborc-0.4.so.0.17.0
b35b2000-b3611000 r-xp 00000000 08:0a 266643     /usr/lib/i386-linux-gnu/libgstbase-0.10.so.0.30.0
b3611000-b3612000 r--p 0005e000 08:0a 266643     /usr/lib/i386-linux-gnu/libgstbase-0.10.so.0.30.0
b3612000-b3613000 rw-p 0005f000 08:0a 266643     /usr/lib/i386-linux-gnu/libgstbase-0.10.so.0.30.0
b3613000-b3652000 r-xp 00000000 08:0a 786838     /lib/i386-linux-gnu/libpcre.so.3.13.1
b3652000-b3653000 r--p 0003f000 08:0a 786838     /lib/i386-linux-gnu/libpcre.so.3.13.1
b3653000-b3654000 rw-p 00040000 08:0a 786838     /lib/i386-linux-gnu/libpcre.so.3.13.1
b3654000-b3655000 rw-p 00000000 00:00 0  
b3655000-b365a000 r-xp 00000000 08:0a 266507     /usr/lib/i386-linux-gnu/libffi.so.6.0.1
b365a000-b365b000 r--p 00005000 08:0a 266507     /usr/lib/i386-linux-gnu/libffi.so.6.0.1
b365b000-b365c000 rw-p 00006000 08:0a 266507     /usr/lib/i386-linux-gnu/libffi.so.6.0.1
b365c000-b37ac000 r-xp 00000000 08:0a 266281     /usr/lib/i386-linux-gnu/libxml2.so.2.9.0
b37ac000-b37b0000 r--p 00150000 08:0a 266281     /usr/lib/i386-linux-gnu/libxml2.so.2.9.0
b37b0000-b37b1000 rw-p 00154000 08:0a 266281     /usr/lib/i386-linux-gnu/libxml2.so.2.9.0
b37b1000-b37b2000 rw-p 00000000 00:00 0  
b37b2000-b37b5000 r-xp 00000000 08:0a 266600     /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0.3600.0
b37b5000-b37b6000 r--p 00002000 08:0a 266600     /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0.3600.0
b37b6000-b37b7000 rw-p 00003000 08:0a 266600     /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0.3600.0
b37b7000-b37c2000 r-xp 00000000 08:0a 262832     /usr/lib/i386-linux-gnu/libdrm.so.2.4.0
b37c2000-b37c3000 r--p 0000a000 08:0a 262832     /usr/lib/i386-linux-gnu/libdrm.so.2.4.0
b37c3000-b37c4000 rw-p 0000b000 08:0a 262832     /usr/lib/i386-linux-gnu/libdrm.so.2.4.0
b37c4000-b37c8000 r-xp 00000000 08:0a 266283     /usr/lib/i386-linux-gnu/libXxf86vm.so.1.0.0
b37c8000-b37c9000 r--p 00003000 08:0a 266283     /usr/lib/i386-linux-gnu/libXxf86vm.so.1.0.0
b37c9000-b37ca000 rw-p 00004000 08:0a 266283     /usr/lib/i386-linux-gnu/libXxf86vm.so.1.0.0
b37ca000-b37cb000 rw-p 00000000 00:00 0  
b37cb000-b37eb000 r-xp 00000000 08:0a 268659     /usr/lib/i386-linux-gnu/libxcb.so.1.1.0
b37eb000-b37ec000 r--p 0001f000 08:0a 268659     /usr/lib/i386-linux-gnu/libxcb.so.1.1.0
b37ec000-b37ed000 rw-p 00020000 08:0a 268659     /usr/lib/i386-linux-gnu/libxcb.so.1.1.0
b37ed000-b37f0000 r-xp 00000000 08:0a 266262     /usr/lib/i386-linux-gnu/libxcb-dri2.so.0.0.0
b37f0000-b37f1000 r--p 00003000 08:0a 266262     /usr/lib/i386-linux-gnu/libxcb-dri2.so.0.0.0
b37f1000-b37f2000 rw-p 00004000 08:0a 266262     /usr/lib/i386-linux-gnu/libxcb-dri2.so.0.0.0
b37f2000-b3808000 r-xp 00000000 08:0a 267128     /usr/lib/i386-linux-gnu/libxcb-glx.so.0.0.0
b3808000-b3809000 r--p 00016000 08:0a 267128     /usr/lib/i386-linux-gnu/libxcb-glx.so.0.0.0
b3809000-b380a000 rw-p 00017000 08:0a 267128     /usr/lib/i386-linux-gnu/libxcb-glx.so.0.0.0
b380a000-b380b000 r-xp 00000000 08:0a 266444     /usr/lib/i386-linux-gnu/libX11-xcb.so.1.0.0
b380b000-b380c000 r--p 00000000 08:0a 266444     /usr/lib/i386-linux-gnu/libX11-xcb.so.1.0.0
b380c000-b380d000 rw-p 00001000 08:0a 266444     /usr/lib/i386-linux-gnu/libX11-xcb.so.1.0.0
b380d000-b3812000 r-xp 00000000 08:0a 267130     /usr/lib/i386-linux-gnu/libXfixes.so.3.1.0
b3812000-b3813000 r--p 00004000 08:0a 267130     /usr/lib/i386-linux-gnu/libXfixes.so.3.1.0
b3813000-b3814000 rw-p 00005000 08:0a 267130     /usr/lib/i386-linux-gnu/libXfixes.so.3.1.0
b3814000-b3815000 rw-p 00000000 00:00 0  
b3815000-b3817000 r-xp 00000000 08:0a 266278     /usr/lib/i386-linux-gnu/libXdamage.so.1.1.0
b3817000-b3818000 r--p 00001000 08:0a 266278     /usr/lib/i386-linux-gnu/libXdamage.so.1.1.0
b3818000-b3819000 rw-p 00002000 08:0a 266278     /usr/lib/i386-linux-gnu/libXdamage.so.1.1.0
b3819000-b3828000 r-xp 00000000 08:0a 263646     /usr/lib/i386-linux-gnu/libglapi.so.0.0.0
b3828000-b3829000 ---p 0000f000 08:0a 263646     /usr/lib/i386-linux-gnu/libglapi.so.0.0.0
b3829000-b382b000 r--p 0000f000 08:0a 263646     /usr/lib/i386-linux-gnu/libglapi.so.0.0.0
b382b000-b3830000 rwxp 00011000 08:0a 263646     /usr/lib/i386-linux-gnu/libglapi.so.0.0.0
b3830000-b3833000 r-xp 00000000 08:0a 786758     /lib/i386-linux-gnu/libdl-2.17.so
b3833000-b3834000 r--p 00002000 08:0a 786758     /lib/i386-linux-gnu/libdl-2.17.so
b3834000-b3835000 rw-p 00003000 08:0a 786758     /lib/i386-linux-gnu/libdl-2.17.so
b3835000-b3968000 r-xp 00000000 08:0a 267142     /usr/lib/i386-linux-gnu/libX11.so.6.3.0
b3968000-b3969000 r--p 00132000 08:0a 267142     /usr/lib/i386-linux-gnu/libX11.so.6.3.0
b3969000-b396c000 rw-p 00133000 08:0a 267142     /usr/lib/i386-linux-gnu/libX11.so.6.3.0
b396c000-b397c000 r-xp 00000000 08:0a 266264     /usr/lib/i386-linux-gnu/libXext.so.6.4.0
b397c000-b397d000 r--p 0000f000 08:0a 266264     /usr/lib/i386-linux-gnu/libXext.so.6.4.0
b397d000-b397e000 rw-p 00010000 08:0a 266264     /usr/lib/i386-linux-gnu/libXext.so.6.4.0
b397e000-b397f000 rw-p 00000000 00:00 0  
b397f000-b39b6000 r-xp 00000000 08:0a 266515     /usr/lib/i386-linux-gnu/libfontconfig.so.1.6.2
b39b6000-b39b7000 r--p 00036000 08:0a 266515     /usr/lib/i386-linux-gnu/libfontconfig.so.1.6.2
b39b7000-b39b8000 rw-p 00037000 08:0a 266515     /usr/lib/i386-linux-gnu/libfontconfig.so.1.6.2
b39b8000-b39c0000 r-xp 00000000 08:0a 267135     /usr/lib/i386-linux-gnu/libXrender.so.1.3.0
b39c0000-b39c1000 r--p 00008000 08:0a 267135     /usr/lib/i386-linux-gnu/libXrender.so.1.3.0
b39c1000-b39c2000 rw-p 00009000 08:0a 267135     /usr/lib/i386-linux-gnu/libXrender.so.1.3.0
b39c2000-b39d8000 r-xp 00000000 08:0a 266201     /usr/lib/i386-linux-gnu/libICE.so.6.3.0
b39d8000-b39d9000 r--p 00015000 08:0a 266201     /usr/lib/i386-linux-gnu/libICE.so.6.3.0
b39d9000-b39da000 rw-p 00016000 08:0a 266201     /usr/lib/i386-linux-gnu/libICE.so.6.3.0
b39da000-b39dc000 rw-p 00000000 00:00 0  
b39dc000-b39e3000 r-xp 00000000 08:0a 266261     /usr/lib/i386-linux-gnu/libSM.so.6.0.1
b39e3000-b39e4000 r--p 00006000 08:0a 266261     /usr/lib/i386-linux-gnu/libSM.so.6.0.1
b39e4000-b39e5000 rw-p 00007000 08:0a 266261     /usr/lib/i386-linux-gnu/libSM.so.6.0.1
b39e5000-b3a7b000 r-xp 00000000 08:0a 266543     /usr/lib/i386-linux-gnu/libfreetype.so.6.10.0
b3a7b000-b3a7f000 r--p 00095000 08:0a 266543     /usr/lib/i386-linux-gnu/libfreetype.so.6.10.0
b3a7f000-b3a80000 rw-p 00099000 08:0a 266543     /usr/lib/i386-linux-gnu/libfreetype.so.6.10.0
b3a80000-b3a81000 rw-p 00000000 00:00 0  
b3a81000-b3af6000 r-xp 00000000 08:0a 529981     /usr/local/lib/libopencv_ml.so.2.4.6
b3af6000-b3af7000 ---p 00075000 08:0a 529981     /usr/local/lib/libopencv_ml.so.2.4.6
b3af7000-b3af8000 r--p 00075000 08:0a 529981     /usr/local/lib/libopencv_ml.so.2.4.6
b3af8000-b3af9000 rw-p 00076000 08:0a 529981     /usr/local/lib/libopencv_ml.so.2.4.6
b3af9000-b3b8f000 r-xp 00000000 08:0a 529964     /usr/local/lib/libopencv_calib3d.so.2.4.6
b3b8f000-b3b90000 ---p 00096000 08:0a 529964     /usr/local/lib/libopencv_calib3d.so.2.4.6
b3b90000-b3b91000 r--p 00096000 08:0a 529964     /usr/local/lib/libopencv_calib3d.so.2.4.6
b3b91000-b3b92000 rw-p 00097000 08:0a 529964     /usr/local/lib/libopencv_calib3d.so.2.4.6
b3b92000-b3c34000 r-xp 00000000 08:0a 529952     /usr/local/lib/libopencv_features2d.so.2.4.6
b3c34000-b3c35000 ---p 000a2000 08:0a 529952     /usr/local/lib/libopencv_features2d.so.2.4.6
b3c35000-b3c37000 r--p 000a2000 08:0a 529952     /usr/local/lib/libopencv_features2d.so.2.4.6
b3c37000-b3c39000 rw-p 000a4000 08:0a 529952     /usr/local/lib/libopencv_features2d.so.2.4.6
b3c39000-b3c9e000 r-xp 00000000 08:0a 299451     /usr/lib/i386-linux-gnu/libQt5OpenGL.so.5.0.1
b3c9e000-b3c9f000 r--p 00065000 08:0a 299451     /usr/lib/i386-linux-gnu/libQt5OpenGL.so.5.0.1
b3c9f000-b3ca0000 rw-p 00066000 08:0a 299451     /usr/lib/i386-linux-gnu/libQt5OpenGL.so.5.0.1
b3ca0000-b3ca1000 rw-p 00000000 00:00 0  
b3ca1000-b3cc5000 r-xp 00000000 08:0a 299521     /usr/lib/i386-linux-gnu/libQt5Test.so.5.0.1
b3cc5000-b3cc6000 r--p 00023000 08:0a 299521     /usr/lib/i386-linux-gnu/libQt5Test.so.5.0.1
b3cc6000-b3cc7000 rw-p 00024000 08:0a 299521     /usr/lib/i386-linux-gnu/libQt5Test.so.5.0.1
b3cc7000-b42bd000 r-xp 00000000 08:0a 299447     /usr/lib/i386-linux-gnu/libQt5Widgets.so.5.0.1
b42bd000-b42d2000 r--p 005f5000 08:0a 299447     /usr/lib/i386-linux-gnu/libQt5Widgets.so.5.0.1
b42d2000-b42d4000 rw-p 0060a000 08:0a 299447     /usr/lib/i386-linux-gnu/libQt5Widgets.so.5.0.1
b42d4000-b42d5000 rw-p 00000000 00:00 0  
b42d5000-b46a4000 r-xp 00000000 08:0a 264792     /usr/lib/i386-linux-gnu/libQt5Gui.so.5.0.1
b46a4000-b46a5000 ---p 003cf000 08:0a 264792     /usr/lib/i386-linux-gnu/libQt5Gui.so.5.0.1
b46a5000-b46af000 r--p 003cf000 08:0a 264792     /usr/lib/i386-linux-gnu/libQt5Gui.so.5.0.1
b46af000-b46b2000 rw-p 003d9000 08:0a 264792     /usr/lib/i386-linux-gnu/libQt5Gui.so.5.0.1
b46b2000-b46b3000 rw-p 00000000 00:00 0  
b46b3000-b4ade000 r-xp 00000000 08:0a 264058     /usr/lib/i386-linux-gnu/libQt5Core.so.5.0.1
b4ade000-b4adf000 ---p 0042b000 08:0a 264058     /usr/lib/i386-linux-gnu/libQt5Core.so.5.0.1
b4adf000-b4ae4000 r--p 0042b000 08:0a 264058     /usr/lib/i386-linux-gnu/libQt5Core.so.5.0.1
b4ae4000-b4ae5000 rw-p 00430000 08:0a 264058     /usr/lib/i386-linux-gnu/libQt5Core.so.5.0.1
b4ae5000-b4ae6000 rw-p 00000000 00:00 0  
b4ae6000-b4b29000 r-xp 00000000 08:0a 542798     /usr/local/lib/libswscale.so.2.1.100
b4b29000-b4b2a000 r--p 00042000 08:0a 542798     /usr/local/lib/libswscale.so.2.1.100
b4b2a000-b4b2b000 rw-p 00043000 08:0a 542798     /usr/local/lib/libswscale.so.2.1.100
b4b2b000-b4b2c000 rw-p 00000000 00:00 0  
b4b2c000-b4b50000 r-xp 00000000 08:0a 542820     /usr/local/lib/libavutil.so.51.54.100
b4b50000-b4b51000 r--p 00023000 08:0a 542820     /usr/local/lib/libavutil.so.51.54.100
b4b51000-b4b52000 rw-p 00024000 08:0a 542820     /usr/local/lib/libavutil.so.51.54.100
b4b52000-b4b55000 rw-p 00000000 00:00 0  
b4b55000-b4c93000 r-xp 00000000 08:0a 541125     /usr/local/lib/libavformat.so.54.6.100
b4c93000-b4c94000 r--p 0013e000 08:0a 541125     /usr/local/lib/libavformat.so.54.6.100
b4c94000-b4c9c000 rw-p 0013f000 08:0a 541125     /usr/local/lib/libavformat.so.54.6.100
b4c9c000-b541f000 r-xp 00000000 08:0a 541986     /usr/local/lib/libavcodec.so.54.23.100
b541f000-b5420000 r--p 00782000 08:0a 541986     /usr/local/lib/libavcodec.so.54.23.100
b5420000-b5430000 rw-p 00783000 08:0a 541986     /usr/local/lib/libavcodec.so.54.23.100
b5430000-b59a8000 rw-p 00000000 00:00 0  
b59a8000-b59c4000 r-xp 00000000 08:0a 266707     /usr/lib/i386-linux-gnu/libgstvideo-0.10.so.0.25.0
b59c4000-b59c5000 r--p 0001b000 08:0a 266707     /usr/lib/i386-linux-gnu/libgstvideo-0.10.so.0.25.0
b59c5000-b59c6000 rw-p 0001c000 08:0a 266707     /usr/lib/i386-linux-gnu/libgstvideo-0.10.so.0.25.0
b59c6000-b59d1000 r-xp 00000000 08:0a 266635     /usr/lib/i386-linux-gnu/libgstapp-0.10.so.0.25.0
b59d1000-b59d2000 r--p 0000a000 08:0a 266635     /usr/lib/i386-linux-gnu/libgstapp-0.10.so.0.25.0
b59d2000-b59d3000 rw-p 0000b000 08:0a 266635     /usr/lib/i386-linux-gnu/libgstapp-0.10.so.0.25.0
b59d3000-b59d4000 rw-p 00000000 00:00 0  
b59d4000-b5ad3000 r-xp 00000000 08:0a 786772     /lib/i386-linux-gnu/libglib-2.0.so.0.3600.0
b5ad3000-b5ad4000 r--p 000fe000 08:0a 786772     /lib/i386-linux-gnu/libglib-2.0.so.0.3600.0
b5ad4000-b5ad5000 rw-p 000ff000 08:0a 786772     /lib/i386-linux-gnu/libglib-2.0.so.0.3600.0
b5ad5000-b5b23000 r-xp 00000000 08:0a 266616     /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3600.0
b5b23000-b5b24000 r--p 0004d000 08:0a 266616     /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3600.0
b5b24000-b5b25000 rw-p 0004e000 08:0a 266616     /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3600.0
b5b25000-b5c07000 r-xp 00000000 08:0a 266683     /usr/lib/i386-linux-gnu/libgstreamer-0.10.so.0.30.0
b5c07000-b5c0a000 r--p 000e1000 08:0a 266683     /usr/lib/i386-linux-gnu/libgstreamer-0.10.so.0.30.0
b5c0a000-b5c0b000 rw-p 000e4000 08:0a 266683     /usr/lib/i386-linux-gnu/libgstreamer-0.10.so.0.30.0
b5c0b000-b5c0c000 rw-p 00000000 00:00 0  
b5c0c000-b5c33000 r-xp 00000000 08:0a 786850     /lib/i386-linux-gnu/libpng12.so.0.49.0
b5c33000-b5c34000 r--p 00026000 08:0a 786850     /lib/i386-linux-gnu/libpng12.so.0.49.0
b5c34000-b5c35000 rw-p 00027000 08:0a 786850     /lib/i386-linux-gnu/libpng12.so.0.49.0
b5c35000-b5c87000 r-xp 00000000 08:0a 263640     /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
b5c87000-b5c89000 r--p 00051000 08:0a 263640     /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
b5c89000-b5c8d000 rwxp 00053000 08:0a 263640     /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
b5c8d000-b5c8e000 rwxp 00000000 00:00 0  
b5c8e000-b5c8f000 rw-p 00000000 00:00 0  
b5c8f000-b5c96000 r-xp 00000000 08:0a 786863     /lib/i386-linux-gnu/librt-2.17.so
b5c96000-b5c97000 r--p 00006000 08:0a 786863     /lib/i386-linux-gnu/librt-2.17.so
b5c97000-b5c98000 rw-p 00007000 08:0a 786863     /lib/i386-linux-gnu/librt-2.17.so
b5c98000-b5caf000 r-xp 00000000 08:0a 786896     /lib/i386-linux-gnu/libz.so.1.2.7
b5caf000-b5cb0000 r--p 00016000 08:0a 786896     /lib/i386-linux-gnu/libz.so.1.2.7
b5cb0000-b5cb1000 rw-p 00017000 08:0a 786896     /lib/i386-linux-gnu/libz.so.1.2.7
b5cb1000-b5e5e000 r-xp 00000000 08:0a 786743     /lib/i386-linux-gnu/libc-2.17.so
b5e5e000-b5e60000 r--p 001ad000 08:0a 786743     /lib/i386-linux-gnu/libc-2.17.so
b5e60000-b5e61000 rw-p 001af000 08:0a 786743     /lib/i386-linux-gnu/libc-2.17.so
b5e61000-b5e64000 rw-p 00000000 00:00 0  
b5e64000-b5e7f000 r-xp 00000000 08:0a 786768     /lib/i386-linux-gnu/libgcc_s.so.1
b5e7f000-b5e80000 r--p 0001a000 08:0a 786768     /lib/i386-linux-gnu/libgcc_s.so.1
b5e80000-b5e81000 rw-p 0001b000 08:0a 786768     /lib/i386-linux-gnu/libgcc_s.so.1
b5e81000-b5ec2000 r-xp 00000000 08:0a 786791     /lib/i386-linux-gnu/libm-2.17.so
b5ec2000-b5ec3000 r--p 00040000 08:0a 786791     /lib/i386-linux-gnu/libm-2.17.so
b5ec3000-b5ec4000 rw-p 00041000 08:0a 786791     /lib/i386-linux-gnu/libm-2.17.so
b5ec4000-b5ec5000 rw-p 00000000 00:00 0  
b5ec5000-b5fa1000 r-xp 00000000 08:0a 267036     /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
b5fa1000-b5fa2000 ---p 000dc000 08:0a 267036     /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
b5fa2000-b5fa6000 r--p 000dc000 08:0a 267036     /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
b5fa6000-b5fa7000 rw-p 000e0000 08:0a 267036     /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
b5fa7000-b5fae000 rw-p 00000000 00:00 0  
b5fae000-b5fc5000 r-xp 00000000 08:0a 786855     /lib/i386-linux-gnu/libpthread-2.17.so
b5fc5000-b5fc6000 r--p 00016000 08:0a 786855     /lib/i386-linux-gnu/libpthread-2.17.so
b5fc6000-b5fc7000 rw-p 00017000 08:0a 786855     /lib/i386-linux-gnu/libpthread-2.17.so
b5fc7000-b5fc9000 rw-p 00000000 00:00 0  
b5fc9000-b625f000 r-xp 00000000 08:0a 565815     /usr/local/Trolltech/Qt-4.7.2/lib/libQtCore.so.4.7.2
b625f000-b6260000 ---p 00296000 08:0a 565815     /usr/local/Trolltech/Qt-4.7.2/lib/libQtCore.so.4.7.2
b6260000-b6267000 r--p 00296000 08:0a 565815     /usr/local/Trolltech/Qt-4.7.2/lib/libQtCore.so.4.7.2
b6267000-b626a000 rw-p 0029d000 08:0a 565815     /usr/local/Trolltech/Qt-4.7.2/lib/libQtCore.so.4.7.2
b626a000-b6365000 r-xp 00000000 08:0a 566490     /usr/local/Trolltech/Qt-4.7.2/lib/libQtNetwork.so.4.7.2
b6365000-b6366000 ---p 000fb000 08:0a 566490     /usr/local/Trolltech/Qt-4.7.2/lib/libQtNetwork.so.4.7.2
b6366000-b6369000 r--p 000fb000 08:0a 566490     /usr/local/Trolltech/Qt-4.7.2/lib/libQtNetwork.so.4.7.2
b6369000-b636a000 rw-p 000fe000 08:0a 566490     /usr/local/Trolltech/Qt-4.7.2/lib/libQtNetwork.so.4.7.2
b636a000-b636b000 rw-p 00000000 00:00 0  
b636b000-b6de8000 r-xp 00000000 08:0a 566692     /usr/local/Trolltech/Qt-4.7.2/lib/libQtGui.so.4.7.2
b6de8000-b6e08000 r--p 00a7d000 08:0a 566692     /usr/local/Trolltech/Qt-4.7.2/lib/libQtGui.so.4.7.2
b6e08000-b6e12000 rw-p 00a9d000 08:0a 566692     /usr/local/Trolltech/Qt-4.7.2/lib/libQtGui.so.4.7.2
b6e12000-b6e16000 rw-p 00000000 00:00 0  
b6e16000-b6e86000 r-xp 00000000 08:0a 529942     /usr/local/lib/libopencv_flann.so.2.4.6
b6e86000-b6e88000 r--p 0006f000 08:0a 529942     /usr/local/lib/libopencv_flann.so.2.4.6
b6e88000-b6e89000 rw-p 00071000 08:0a 529942     /usr/local/lib/libopencv_flann.so.2.4.6
b6e89000-b6f9a000 r-xp 00000000 08:0a 543114     /usr/local/lib/libopencv_legacy.so.2.4.6
b6f9a000-b6f9c000 r--p 00110000 08:0a 543114     /usr/local/lib/libopencv_legacy.so.2.4.6
b6f9c000-b6f9e000 rw-p 00112000 08:0a 543114     /usr/local/lib/libopencv_legacy.so.2.4.6
b6f9e000-b6f9f000 rw-p 00000000 00:00 0  
b6f9f000-b701c000 r-xp 00000000 08:0a 534403     /usr/local/lib/libopencv_objdetect.so.2.4.6
b701c000-b701d000 r--p 0007c000 08:0a 534403     /usr/local/lib/libopencv_objdetect.so.2.4.6
b701d000-b701e000 rw-p 0007d000 08:0a 534403     /usr/local/lib/libopencv_objdetect.so.2.4.6
b701e000-b7070000 r-xp 00000000 08:0a 532318     /usr/local/lib/libopencv_video.so.2.4.6
b7070000-b7071000 ---p 00052000 08:0a 532318     /usr/local/lib/libopencv_video.so.2.4.6
b7071000-b7072000 r--p 00052000 08:0a 532318     /usr/local/lib/libopencv_video.so.2.4.6
b7072000-b7073000 rw-p 00053000 08:0a 532318     /usr/local/lib/libopencv_video.so.2.4.6
b7073000-b72a4000 r-xp 00000000 08:0a 529948     /usr/local/lib/libopencv_highgui.so.2.4.6
b72a4000-b72a9000 r--p 00230000 08:0a 529948     /usr/local/lib/libopencv_highgui.so.2.4.6
b72a9000-b72b0000 rw-p 00235000 08:0a 529948     /usr/local/lib/libopencv_highgui.so.2.4.6
b72b0000-b72b8000 rw-p 00000000 00:00 0  
b72b8000-b749f000 r-xp 00000000 08:0a 522786     /usr/local/lib/libopencv_imgproc.so.2.4.6
b749f000-b74a2000 r--p 001e7000 08:0a 522786     /usr/local/lib/libopencv_imgproc.so.2.4.6
b74a2000-b74a3000 rw-p 001ea000 08:0a 522786     /usr/local/lib/libopencv_imgproc.so.2.4.6
b74a3000-b7538000 rw-p 00000000 00:00 0  
b7538000-b7749000 r-xp 00000000 08:0a 522338     /usr/local/lib/libopencv_core.so.2.4.6
b7749000-b774a000 ---p 00211000 08:0a 522338     /usr/local/lib/libopencv_core.so.2.4.6
b774a000-b774c000 r--p 00211000 08:0a 522338     /usr/local/lib/libopencv_core.so.2.4.6
b774c000-b7751000 rw-p 00213000 08:0a 522338     /usr/local/lib/libopencv_core.so.2.4.6
b7751000-b7753000 rw-p 00000000 00:00 0  
b776d000-b7770000 rw-p 00000000 00:00 0  
b7770000-b7771000 r-xp 00000000 00:00 0          [vdso]
b7771000-b7791000 r-xp 00000000 08:0a 786719     /lib/i386-linux-gnu/ld-2.17.so
b7791000-b7792000 r--p 0001f000 08:0a 786719     /lib/i386-linux-gnu/ld-2.17.so
b7792000-b7793000 rw-p 00020000 08:0a 786719     /lib/i386-linux-gnu/ld-2.17.so
bfdcd000-bfdee000 rw-p 00000000 00:00 0          [stack]
程序异常终止。

由于之前程序运行过没有问题,所以开始的时候不考虑是安装配置所带来的问题,网上查了些资料很多都是说指针动态分配存在的问题。问题是对程序排查一次又一次后没有发现什么问题。又重新修改配置后发现又出现其他新的问题~在平台上重新运行一个小程序时发现出现同样的错误,那明显的问题是出现在平台上而非代码上,但独自运行opencv  qt 时又可以正常运行,最后重新将opencv重新装了一次,参考的是http://www.samontab.com/web/2012/06/installing-opencv-2-4-1-ubuntu-12-04-lts/  泪流满面,终于可以运行了。

总结:

由于网上的资源有很多,但适合自己的不是很多,要综合参与并根据自己的实际情况思考后再做出判断。像刚开始,装opencv的教程一查就一大把,但你在考虑用opencv的时候是处理图像还是视频音频还是都要,这就要适时做出调整。并且做完这件事后,哪怕一开始不懂,但在做完后要知道为什么这样子做,下次自己就可以独立解决,good luck to all of you~

你可能感兴趣的:(QT,C++,Opencv)