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 on empty points #116

Closed
STNLd2 opened this issue Jun 24, 2024 · 4 comments · Fixed by #119
Closed

Segmentation fault on empty points #116

STNLd2 opened this issue Jun 24, 2024 · 4 comments · Fixed by #119

Comments

@STNLd2
Copy link
Contributor

STNLd2 commented Jun 24, 2024

Please add a check for empty point array in KDTree input.

tree = KDTree(np.array([]))

falls with the segmentation fault.

@mraspaud
Copy link
Collaborator

@STNLd2 thanks for bring this to our attention! is this anything you are willing to provide a fix for?

@STNLd2
Copy link
Contributor Author

STNLd2 commented Jun 25, 2024

@mraspaud Could you take care of it? Don't want to mess with forking just for 2 lines of code :)

@djhoese
Copy link
Collaborator

djhoese commented Jun 25, 2024

@STNLd2 I know that @mraspaud is getting ready to go on holiday so he might not have time for this. I know I don't right now either. Since you found the issue, filed the bug, and have the use case where you'd like this check, it may be best for you to tackle this. And it wouldn't be just 2 lines of code because this could use a test in the test_tree.py module too.

@STNLd2
Copy link
Contributor Author

STNLd2 commented Jul 8, 2024

Sorry, I've just noticed the last message.
I see. I'll do it.

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

Successfully merging a pull request may close this issue.

3 participants