-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
out of memory #568
Comments
Do you have an easy and minimal way to reproduce your issue? @kripken , any idea? |
Are you sure |
Compiling sqlite to js and quickjs to wasm to run one on the other strikes me as bizarre and inefficient. Why not compile sqlite to wasm directly if you have access to a wasm runtime ? |
I could get you a reproduction maybe after our next release, but it's not going to be "easy" because you would have to setup our dev environment. |
I don't think this matters in our case at all since we are using Though I'm not really sure what that path is supposed to do, when I logged it it was looking for a |
We're basically building a Node/Deno for the Internet Computer which is a Wasm runtime, and we are trying to allow developers to npm install any package and just use it. So we would like SQL.js to work without modifications. It was working...alas this bug that I can't seem to get around now. |
@lastmjs , what does the debug build output for you ? |
I think I tracked down the source of the issue, though I don't fully understand yet, my understanding is deepening. This seems to have to do with the order of some of our imports, particularly our importing of a polyfill of TextEncoding and TextDecoding. It's relatively project-specific, so not sure if this has anything to do with sql.js itself. It would be nice if the error could be better...I'm still investigating. I was able to reproduce and fix is the good part. |
First off, my JavaScript environment is very custom and different than the web or Node.js. We are running in a wasm32-wasi environment with QuickJS, using wasmedge-quickjs, and Wasmtime on the Internet Computer.
That being said, the strange thing is that I had this working about a week ago, but now it doesn't work. We've been doing a lot of low-level changes to our JS environment (we're working at the engine/platform level), but I just don't understand what could have caused this.
The simple problem is that we get an error just trying to initialize the database:
out of memory
Here's our code:
We have to use
asm
as our environment does not have a Wasm interpreter. I've triedsql-asm-memory-growth.js
as well and I get the same error. I've even gone back multiple versions to maybe 1.7.0 and the error is always there.Any ideas on what could cause this? I've also tried adding:
to the initSqlJs options.
The text was updated successfully, but these errors were encountered: