-
Notifications
You must be signed in to change notification settings - Fork 183
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
Segmentation fault at 'MST_linkage_core(N,D,Z)" in Consensus.cpp #27
Comments
I've played with this algorithm in the past, and I believe the problem you're running into has to do with the case where there is exactly one keypoint. N,D,Z are initialized like this:
But in the case where there is one keypoint, it simplifies to this:
This doesn't cause a crash on my native machine, but it would give junk data that gets thrown out since a single keypoint is treated as noise. However, I think it could cause crashes in environments where memory is more controlled, such as a VM. Have you tried catching the case of keypoints.size() == 1 and throwing it out as early as you can? It may remove the crash. |
Yup, I can confirm that bailing out from consensus when number of keypoints is exactly one fixes this for me. Good find! In fact, I believe issue #10 is just a duplicate of this one. Will try to submit a pull request with this fix shortly. |
… least two points are available.
… least two points are available.
When I'm running the program with a VM the tracker usually crashes at that part of the code, usually when the number of active points is very low.
When I run the code in a native Ubuntu machine, usually I don't have any issue.
The text was updated successfully, but these errors were encountered: