Skip to content

Application crashes if Cursor content is bigger than 1MB #47

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

Closed
neuromancer85 opened this issue Mar 12, 2012 · 5 comments
Closed

Application crashes if Cursor content is bigger than 1MB #47

neuromancer85 opened this issue Mar 12, 2012 · 5 comments

Comments

@neuromancer85
Copy link

I know that this is a limit hard-coded in the CursorWindow implementation...
However I need to store a file in the encrypted db as a blob, but since it is bigger than 1mb I cannot retrive it without causing a crash... Is there a way to bypass this limitation? For example, is there a way to query the blob in chunks of max 1mb?

@developernotes
Copy link
Member

Hi neuromancer85,

You could look at using the Linux split tool to partition your file into more manageable sizes to insert into the database, or possibly encrypt the file and include it with your assets directory. You could also look to see if CursorJoiner would beneficial for your situation. We likely won't be changing the underlying CursorWindow constraints however.

@developernotes
Copy link
Member

Hello @neuromancer85,

I wanted to follow up with you regarding this report. Last week we released a new version of both SQLCipher and SQLCipher for Android. SQLCipher for Android included a fix that addresses the 1 MB limit previously reported. Please take a look when you have the opportunity. Thanks!

@ezengsvmx
Copy link

With cordova-sqlcipher-adapter 0.1.9-pre3 "Cordova sqlcipher adapter", I am still seeing this message below. Is this fix not included in 0.1.19?

E/CursorWindow: need to grow: mSize = 1048576, size = 1133544, freeSpace() = 1048409, numRows = 1
E/CursorWindow: Attempting to grow window beyond max size (1048576)
E/Cursor: Failed allocating 1133544 bytes for text/blob at 0,2

@developernotes
Copy link
Member

Hi @ezengsvmx

Are you referring to this project? If so, it is not a project we developed or maintain.

@ezengsvmx
Copy link

Thanks for the reply. Yes. However, it is based on sqlcipher 3.4.1 though.

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