journeyapps / node-sqlcipher

SQLCipher bindings for Node
https://journeyapps.com
BSD 3-Clause "New" or "Revised" License
207 stars 66 forks source link

Crash running under electron 14+ using large blobs and each or all functions #94

Open MrPrimate opened 2 years ago

MrPrimate commented 2 years ago

I have a weird issue that I think is to do with a change that must have been made in electron 14+, but unsure.

When accessing tables with a blob field, where the blob is a large text object, say 50000+ characters, then when using the .each method (or .all) causes an Electron exited with signal SIGTRAP. error. Sometimes it can seem to semi process some of the rows.

If I reduce the rows in a table it gets to a point eventually where it will process them. The same code works perfectly when run directly under the same version of node that electron is using, and in Electron 12 and 13. Within Electron sqlcipher is called from within the main process. If I switch out node-sqlcipher for sqlite3 package then it works fine.

I was hoping you might have some insight into what might be causing this?

I have a fiddle of some code that can reproduce it here: https://gist.github.com/MrPrimate/4ca99a5672411166cf5eb92d7a3f4e3a

yykoypj commented 1 year ago

I'm having the same problem.Is there any way to solve it rather than switch to better-sqlite3?

Electorn 22.3.9 sequenlize 6.12.2 @journeyapps/sqlcipher 5.3.1 Node 16