Ask Your Question
0

opencv-2.4.6.1-1 and qt5 and qtcreator-2.8.0

asked 2013-07-15 16:23:44 -0600

theodore gravatar image

updated 2013-07-16 07:57:52 -0600

Hi, after the last update of opencv while i am compiling the project correctly when i am trying to run them, i get the following bunch or errors:

    *** Error in `<folder_path_where_the_project_is_located>': realloc(): invalid pointer: 0x00007f65d7f37820 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x788ae)[0x7f65d6f0b8ae]
/usr/lib/libc.so.6(realloc+0x24a)[0x7f65d6f0f56a]
/usr/lib/libQt5Core.so.5(_ZN9QListData7reallocEi+0x1e)[0x7f65d2634c6e]
/usr/lib/libQt5Core.so.5(_ZN9QListData6appendEi+0x6a)[0x7f65d2634d2a]
/usr/lib/libQt5Core.so.5(+0x1788ec)[0x7f65d26d28ec]
/usr/lib/libQt5Core.so.5(_Z21qRegisterResourceDataiPKhS0_S0_+0x2b9)[0x7f65d26ce989]
/usr/lib/libQt5Core.so.5(+0x6f823)[0x7f65d25c9823]
/lib64/ld-linux-x86-64.so.2(+0xea9a)[0x7f65da5caa9a]
/lib64/ld-linux-x86-64.so.2(+0xeb6c)[0x7f65da5cab6c]
/lib64/ld-linux-x86-64.so.2(+0x14ea)[0x7f65da5bd4ea]
======= Memory map: ========
***REMOVED MEMORY MAP, IT SEEMS QUITE USELESS AND MAKES OVERVIEW HARD***
The program has unexpectedly finished.

does someone have any idea what might be the problem. If i use opencv v2.4.5-3 with qt5 everything is working nicely but with the new version not.

edit retag flag offensive close merge delete

Comments

Probably you had somewhere a pointer that was doing something wrong and now a try catch has been placed around the event to capture this problem. However, the ouput gives us zero basics to start. Please add your code that goes wrong ...

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-16 07:56:27 -0600 )edit
1

Problem solved, there was a miswriting in the .pro file. The strange think is that this miswriting was not causing any problem previously. Anyway, thanks @steven.

theodore gravatar imagetheodore ( 2013-07-17 04:36:38 -0600 )edit

Probably not catching the problem was a bug that was being reported before, resulting in a bugfix that has been included in the new release. Happy you fixed it, might be good to post the exact error in an answer and accept it as the correct one.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-17 04:47:42 -0600 )edit

I have the same problem, it is very strange. I do not know where is going wrong. could you tell me? Here I cannot post the pro file, it is unformat.

lyw8120 gravatar imagelyw8120 ( 2015-12-14 09:09:45 -0600 )edit

try to clean the project and manually delete any Debug/Release folders or Makefile leftovers and then rebuild the project from scratch. Also reinstall opencv, qt, qtcreator.

theodore gravatar imagetheodore ( 2015-12-14 15:19:53 -0600 )edit

No, it still does not work

lyw8120 gravatar imagelyw8120 ( 2015-12-15 04:25:46 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-08-04 00:55:37 -0600

ichingchang gravatar image

I have met the same problem, I search it the whole morning and solve it by re-install the OpenCV. My opencv was the version 2.4.9, and build on the Ubuntu 12.04 system following the post , I installed the QT creator later using the Linux installer. The version of QT creator is 3.1.2 based on the QT 5.3.1. My OpenCV was installed on a customized path. I just deleted the build folder

cd opencv-2.4.9
rm -r build

and I just build the OpenCV again without the -D WITH_QT flag in cmake

mkdir build
cd build
cmake -D WITH_XINE=ON -D WITH_OPENGL=ON -D WITH_TBB=ON -D BUILD_EXAMPLES=ON ..
make -j4
sudo make install

the -j4 flag in the make means that make in 4 cores parallel. and the Magic happens, the code works! the reason why it does not work is that when using the cmake WITH_QT flag the system build the opencv using the system default version of the qt, which is not compatible with the newest version of the qt downloaded from the website. however, to make it work, we must have the right version of the QT

edit flag offensive delete link more

Comments

It works perfectly with Qt 5.3.1, have it running here...

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-04 02:15:35 -0600 )edit

Question Tools

Stats

Asked: 2013-07-15 16:23:44 -0600

Seen: 1,526 times

Last updated: Aug 04 '14