-
Notifications
You must be signed in to change notification settings - Fork 24
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
Posible array out of bounds in QNode #40
Comments
@ng-dmc Thanks, I will have a look. Do you happen to have a test case? |
Here it is:
|
@ng-dmc Thanks, excellent test! I found at least two problems, a logical one and a precision problem. I fill first fix the logical problem (should be easy enough) and then, in a separate patch, fix the precision problem. This may take a few days to resolve. As a workaround I can suggest using the PH-tree instead (which doesn't have precision problems like quadtrees do). Alternatively if you want to use the qt2 index, you could
|
Also, in case you are using the PH-Tree, and in case you want to store duplicate points (as in the unit test), make sure to use the |
Thanks! I will check it out. |
I'll close the issue. Let me know if the problem occurs again. |
Hi,
I believe it's possible to get OOB if
values.length == 0
here:tinspin-indexes/src/main/java/org/tinspin/index/qthypercube2/QNode.java
Lines 116 to 123 in fc9e7fd
And the empty array could be created here:
tinspin-indexes/src/main/java/org/tinspin/index/qthypercube2/QNode.java
Line 335 in fc9e7fd
The text was updated successfully, but these errors were encountered: