Compile to wasm produces undefined stackAlloc [error]
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 30/100
- Tipo de issue
- Bug
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Estagnada
- Stack de tecnologia
- javascript, sqlite, wasm
- Domínio
- build-system, databases, web-dev
Direção de pesquisa
Start by comparing the wasm/debug flags in Makefile with the generated exports and Module.asm.stackAlloc usage in sql-debug.js. Reproduce the failure using the index.html example and the browser errors; done means the wasm module loads and the Database/SQL example runs without the undefined stackAlloc error.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Hello, I am trying to compile and run using native wasm. I updated Makefile like so:
wasm/debug: EMFLAGS= -O1 -g -s INLINING_LIMIT=10 -s RESERVED_FUNCTION_POINTERS=64 -s WASM=1
wasm/debug: js/sql-debug.js
I'm loading a module into sql-debug.js following the pattern in emscripten generated html output:
here is a gist with a few more details.
errors:
#chrome Version 57.0.2984.0 dev (64-bit)
Uncaught TypeError: Cannot read property 'apply' of undefined
at Object.Module.stackAlloc (sql-debug.js:6069)
at sql-debug.js:6388
at sql-debug.js:7229
#firefox 54.0a1 (2017-03-06) (64-bit)
TypeError: Module.asm.stackAlloc is undefined[Learn More]
if stackAlloc is left undefined by doing this in sql-debug.js
//original
var stackAlloc = Module["stackAlloc"] = function() { return Module["asm"]["stackAlloc"].apply(null, arguments) };
//edit
var stackAlloc = Module["stackAlloc"] = function() { return Module["stackAlloc"].apply(null, arguments) };
then this is executed in index.html before errors are thrown when stackAlloc is called to execute SQL.
var sql = window.SQL;
// Create a database
var db = new sql.Database();
// NOTE: You can also use new sql.Database(data) where
// data is an Uint8Array representing an SQLite database file
// Execute some sql
sqlstr = "CREATE TABLE hello (a int, b char);";
sqlstr += "INSERT INTO hello VALUES (0, 'hello');"
sqlstr += "INSERT INTO hello VALUES (1, 'world');"
db.run(sqlstr); // Run the query without returning anything
- Linguagem predominante
- JavaScript
- Estrelas
- 13.7k
- Forks
- 1.1k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de sql-js/sql.js
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
-
Add the WebWorker API docs Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 45/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
Todas as issues de sql-js/sql.js
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
mksglu/context-mode#1200 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
neondatabase/website#5944 ·
-
module: core
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
bigbluebutton/bigbluebutton#25849 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
jaegertracing/jaeger-ui#4506 ·