1

I used OpenCV in my ROS codebase. I saw a segmentation fault in a function in OpenCV. It may not be a problem in OpenCV, but it'll be helpful for me to debug if I know what exactly the error is.

However, the symbol table is not available:

(gdb) bt full
#0  0x00007ffff633eefe in CvANN_MLP::predict(cv::Mat const&, cv::Mat&) const () from /opt/ros/hydro/lib/libopencv_ml.so.2.4
No symbol table info available.

I have linked OpenCV in the CMakeList.txt.

find_package(OpenCV REQUIRED)
target_link_libraries(agentlib debug ${OpenCV_LIBS})

2 Answers 2

1

If You installed OpenCV and ROS form packages, try to also install -dbg packages. If You built the libraries on Your own, try building them in debug configuration. To set debug version for a CMake project You need to set CMAKE_BUILD_TYPE variable to Debug.

Sign up to request clarification or add additional context in comments.

Comments

0

Combination cmake -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -D CMAKE_BUILD_TYPE=DEBUG successfully appends debug information.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.