Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aruco thread switching segmentation fault #1643

Closed
st-le opened this issue May 16, 2018 · 3 comments
Closed

Aruco thread switching segmentation fault #1643

st-le opened this issue May 16, 2018 · 3 comments

Comments

@st-le
Copy link

st-le commented May 16, 2018

System information (version)
  • OpenCV => opencv contrib 3.4.1
  • Operating System / Platform => Ubuntu 14.04 64b
  • Compiler =>
Detailed description

I have thread switching segmentation fault when invoking detectMarkers. The original sample detect_markers.cpp does not have error though. Here is partial gdb bt.

test_detectMarkers -c=camera.yaml -d=10 --dp=detector_params.yml -l=100
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe4da0700 (LWP 28168)]
[New Thread 0x7fffe3eaf700 (LWP 28170)]
[New Thread 0x7fffe36ae700 (LWP 28171)]
[New Thread 0x7fffe2ead700 (LWP 28172)]
[New Thread 0x7fffe26ac700 (LWP 28173)]
[New Thread 0x7fffe1eab700 (LWP 28174)]
[New Thread 0x7fffe16aa700 (LWP 28175)]
[New Thread 0x7fffe0ea9700 (LWP 28176)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe0ea9700 (LWP 28176)]
0x00007ffff648f66c in cv::aruco::identifyOneCandidate(cv::Ptrcv::aruco::Dictionary const&, cv::InputArray const&, std::vector<cv::Point, std::allocator<cv::Point > >&, int&, cv::Ptrcv::aruco::DetectorParameters const&) [clone .constprop.342] () from /usr/local/opencv-3.4.1_contrib3.4.1_n_ts/lib/x86_64-linux-gnu/libopencv_aruco.so.3.4
(gdb) bt
#0 0x00007ffff648f66c in cv::aruco::identifyOneCandidate(cv::Ptrcv::aruco::Dictionary const&, cv::InputArray const&, std::vector<cv::Point, std::allocator<cv::Point > >&, int&, cv::Ptrcv::aruco::DetectorParameters const&) [clone .constprop.342] () from /usr/local/opencv-3.4.1_contrib3.4.1_n_ts/lib/x86_64-linux-gnu/libopencv_aruco.so.3.4
#1 0x00007ffff648fd18 in cv::aruco::IdentifyCandidatesParallel::operator()(cv::Range const&) const () from /usr/local/opencv-3.4.1_contrib3.4.1_n_ts/lib/x86_64-linux-gnu/libopencv_aruco.so.3.4
#2 0x00007ffff68eb67a in (anonymous namespace)::ParallelLoopBodyWrapper::operator()(cv::Range const&) const () from /usr/local/opencv-3.4.1_contrib3.4.1_n_ts/lib/x86_64-linux-gnu/libopencv_core.so.3.4
#3 0x00007ffff680a6cf in cv::ParallelJob::execute(bool) [clone .constprop.46] () from /usr/local/opencv-3.4.1_contrib3.4.1_n_ts/lib/x86_64-linux-gnu/libopencv_core.so.3.4
#4 0x00007ffff680c5ae in cv::WorkerThread::thread_body() () from /usr/local/opencv-3.4.1_contrib3.4.1_n_ts/lib/x86_64-linux-gnu/libopencv_core.so.3.4
#5 0x00007ffff680c679 in cv::WorkerThread::thread_loop_wrapper(void*) () from /usr/local/opencv-3.4.1_contrib3.4.1_n_ts/lib/x86_64-linux-gnu/libopencv_core.so.3.4
#6 0x00007ffff2e67184 in start_thread (arg=0x7fffe0ea9700) at pthread_create.c:312
#7 0x00007ffff5c8637d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Steps to reproduce

ArucoMarkerDetector_test.zip

@st-le
Copy link
Author

st-le commented May 17, 2018

today, I built opencv 3.4.1 with contrib 3.4.1 again in debug mode to trace further the crash. Here is the gdb log. I still can't seem to identify why it crashes

gdb_log.txt

@st-le
Copy link
Author

st-le commented May 19, 2018

Is there any hint that I can try to fix? just in case this bug is not considered high priority or to be fixed any time soon

@st-le
Copy link
Author

st-le commented May 31, 2018

I've found a bug in the class I wrote ArucoMarkerDetector. A pointer is not initialized and so issues the segmentation fault. I am closing the issue now

@st-le st-le closed this as completed May 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants