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

QuadTree.remove NullPointerException #308

Closed
xsorifc28 opened this issue Aug 28, 2016 · 3 comments
Closed

QuadTree.remove NullPointerException #308

xsorifc28 opened this issue Aug 28, 2016 · 3 comments

Comments

@xsorifc28
Copy link

xsorifc28 commented Aug 28, 2016

Summary:

NPE when items being removed from cluster.

Steps to reproduce:

Random, cannot quantify.

Expected behavior:

Remove item from cluster.

Observed behavior:
Crashes

Device and Android version:

Various phones and API levels between 18-24

Issue:

com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:176)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:171)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:171)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:163)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:171)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:169)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:169)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:165)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:169)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:165)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:163)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:163)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:163)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:169)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:165)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:165)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:169)
com.google.maps.android.quadtree.PointQuadTree.remove (PointQuadTree.java:153)
com.my.package.maps.NonHierarchicalDistanceBasedAlgorithm.removeItem (NonHierarchicalDistanceBasedAlgorithm.java:96)

Not sure why this is happenng, and can't reproduce it, I'm just tracking crash reports from users. Even if mQuadTree is wrapped with !null, still tends to crash.

@philipbjorge
Copy link

This occurs when I try and remove items before I've ever inserted into the QuadTree.

@barbeau
Copy link
Collaborator

barbeau commented Sep 10, 2016

I believe I have a fix for this, I'll open a PR shortly.

@barbeau
Copy link
Collaborator

barbeau commented Sep 10, 2016

@philipbjorge Thanks for the hint! I opened a PR that should hopefully fix this at #314.

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

3 participants