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

Segmentation fault #3

Closed
crackcomm opened this issue May 3, 2022 · 6 comments
Closed

Segmentation fault #3

crackcomm opened this issue May 3, 2022 · 6 comments

Comments

@crackcomm
Copy link

crackcomm commented May 3, 2022

Hey, I wrote OCaml bindings for this library and while testing with random variables I got segmentation fault error.

I tried with the Python binding, the same error occurs.

Here is the data that can reproduce the error:

points = np.array([
    [2.8982, -2.7502],
    [2.0700, 4.6681],
    [-3.3455, -0.8006],
    [0.7183, 4.6198],
    [-0.7986, -1.7616],
    [4.1368, 1.7246],
    [3.7679, 4.1976],
    [3.2638, 2.1536],
    [1.8979, 1.6000],
    [2.7282, -3.5276],
    [-2.4856, 2.7415]])

gdb tells me it fails on following line:

pargeo::parBufCollect<std::tuple<pargeo::_point<2, double, double, pargeo::_empty>*, pargeo::_point<2, double, double, pargeo::_empty>*, double> >(pargeo::parBuf<std::tuple<pargeo::_point<2, double, double, pargeo
::_empty>*, pargeo::_point<2, double, double, pargeo::_empty>*, double> >**, unsigned long)::{lambda(unsigned long)#1}::operator()(unsigned long) const::{lambda(unsigned long)#1}::operator()(unsigned long) const (
parent=<optimized out>, __closure=<optimized out>) at parBuf.h:154
154                              all[vecSizes[p] + buf->m_parentSizes[parent] + elem] = buf->m_parent[parent][elem];

I've began debugging it and trying to understand where the error might come from but I decided to submit an issue if you might have an answer or a hint.

@wangyiqiu
Copy link
Owner

Thanks for your feedback. I will try to reproduce the error and see what's wrong. Could you let me know the minPts value that you used to get the segfault?

@crackcomm
Copy link
Author

Hey, I used 3 but I tried many random combinations and many of them resulted in segfaults.

@wangyiqiu
Copy link
Owner

I see, thanks. I will try to see what's wrong with the code.

@wangyiqiu
Copy link
Owner

Hi, I had some trouble reproducing the error you had. I tried your input data using both the executable and the Python binding, and they seem to work fine. I tried to valgrind the executable but no memory errors were reported. Did you figure out what's wrong?
If you let me know the hardware and OS you are using it may also be helpful.

@wangyiqiu
Copy link
Owner

Please open a new issue if the problem persists. Thank you for your feedback.

@crackcomm
Copy link
Author

I will try to come back to this issue when I have some free time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants