-
-
Notifications
You must be signed in to change notification settings - Fork 177
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
Segfault when calling iterator without open #134
Comments
I also get it when opening another leveldown on the same location: var level = require('leveldown')
var db1 = level('test')
var db2 = level('test')
db1.open(function () {
db2.open(function () {
db2.iterator()
})
}) |
Yeah, maybe we should show something nice than a segfault, however you need to open the db before using it - so these cases will still create an error for you. With regards to the second case - when you try to open it a second time you should be getting an error, so the database isn't open then. See https://github.com/google/leveldb#limitations for more info https://github.com/Level/deferred-leveldown or https://github.com/rvagg/node-levelup can help you out |
Ah yeah so the second example can be reduced to the first one. To be clear I am aware that both of these snippets are wrong. I just don't think a segfault is an acceptable error here. |
Agreed @finnp, it's always been our priority to fix any segfaultage and this comes under that category. Thanks for reporting, if you have time to investigate a fix then we'd love to see it! It should be fairly straight forward state checking and returning (or throwing) an error. |
Still problems on |
Hey,
when calling the iterator without open first I get a
when doing this with a missing open:
Best,
Finn
The text was updated successfully, but these errors were encountered: