8000 Insertion fails after rbush becomes empty · Issue #10 · mourner/rbush · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Insertion fails after rbush becomes empty #10

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 s 8000 tatement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
twpayne opened this issue Nov 4, 2013 · 5 comments
Closed

Insertion fails after rbush becomes empty #10

twpayne opened this issue Nov 4, 2013 · 5 comments
Assignees
Labels

Comments

@twpayne
Copy link
Contributor
twpayne commented Nov 4, 2013

After removing all items from an rbush, inserting new items fails.

Quick steps to reproduce

Extra information

The console displays:

Uncaught TypeError: Cannot read property 'leaf' of undefined rbush.js:223
rbush._chooseSubtree rbush.js:223
rbush._insert rbush.js:259
rbush.insert rbush.js:89
(anonymous function) viz-uniform.html:37
@mourner
Copy link
Owner
mourner commented Nov 4, 2013

Interesting! It works perfectly for me with the steps you provided in Chrome / OS X. What browser / OS are you using? Could you check other browsers?

@mourner
Copy link
Owner
mourner commented Nov 4, 2013

Oh, I see now! I clicked "bulk-insert" instead of insert. Thanks for the report!

@ghost ghost assigned mourner Nov 4, 2013
@twpayne
Copy link
Contributor Author
twpayne commented Nov 4, 2013

Good that you can duplicate it. I've observed this in Mac OS X / Chrome Canary (32) but you're already on the case...

@mourner
Copy link
Owner
mourner commented Nov 5, 2013

Yeah. The problem is that _condense doesn't update tree height and leaf status when condensing the tree after removal (which potentially can lead to other performance problems).

@mourner mourner closed this as completed in 02164f7 Nov 5, 2013
@twpayne
Copy link
Contributor Author
twpayne commented Nov 5, 2013

Nice work @mourner! Thanks for the super-quick fix!

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

No branches or pull requests

2 participants
0