-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
"TypeError: Invalid ArrayBuffer pointer, pointer is null" while reading blob column #122
Comments
Ohh, I think this is a case where |
Mm, I don't think so. I just tried it on the test db, which does have some null values in the blob columns, and it properly reads the column and puts a We have three different databases we are trying this on:
This leads me to somewhat believe it's due to some difference between our database files. My coworker's db has a much larger SQLite database, and we have different SQLite versions when you Working db file:
Problem db file:
|
Hey @DjDeveloperr any additional thoughts or questions here? It seemed like an issue with how this library is using Thanks for your help! |
The issue here is how is the column value type Are we able to confirm here if the column we're trying to read here in the problematic db file has a null value? If it does, this should be an easy fix. Not sure why this changed at all across versions though. Or you can provide me a minimum reproducible example that I can use to fix this bug myself! Sorry for responding late, quite overloaded with college and job workload :( |
Hey, no worries, we've all got busy lives! I need to get some more info about this. It's happening on someone else's machine, so I need to get a copy of their db or figure out how to repro it myself. The query it's failing on is a Thanks, |
I think I got it: From https://www.sqlite.org/c3ref/column_blob.html
The blob is just zero length, and that case is not handled here. |
Amazing, thank you so much! I'll give that a try with my coworker. Do you plan on creating a release with this? |
There's a new release now - 0.11.1, you can try that out! |
A coworker of mine is getting a null pointer exception from this line: https://github.com/denodrivers/sqlite3/blob/0.10.0/src/statement.ts#L112 while running
all()
on a prepared statement. I don't have this issue on my machine, but it's cropped up on theirs.I don't know if I'm reading that line correctly, but it looks to me like the library is calling
UnsafePointerView.getArrayBuffer()
statically when it looks like it expects an instance to be created with a constructor containing the pointer, andgetArrayBuffer()
can be called on that instance. (Reference forgetArrayBuffer()
)Any thoughts or ideas for troubleshooting this? I'm not entirely clear why this works on my machine, but not my coworker's, so I'm not sure if this is an environmental issue or library issue.
The text was updated successfully, but these errors were encountered: