Skip to content
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

Try that and never works #32

Open
swang206 opened this issue Nov 22, 2021 · 4 comments
Open

Try that and never works #32

swang206 opened this issue Nov 22, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@swang206
Copy link

Can you show us a demo on how to run

#include<stdio.h>
int main()
{
puts("Hello World\n");
}

?

@swang206
Copy link
Author

/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:1840
let loadOffset = ins.args[0].value;
^

TypeError: Cannot read properties of undefined (reading 'value')
at wasm2lua.processInstructionsPass2 (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:1840:62)
at wasm2lua.processFunc (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:853:30)
at wasm2lua.processModule (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:434:38)
at wasm2lua.process (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:335:38)
at new wasm2lua (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:105:14)
at Object. (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/bin/wasm2lua.js:85:12)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)

@swang206
Copy link
Author

cqwrteur@Home-Server:~/myhome/wasm2lua$ wasm2lua ./a out.lua
/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:1790
let loadOffset = ins.args[0].value;
^

TypeError: Cannot read properties of undefined (reading 'value')
at wasm2lua.processInstructionsPass2 (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:1790:58)
at wasm2lua.processFunc (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:853:30)
at wasm2lua.processModule (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:434:38)
at wasm2lua.process (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:335:38)
at new wasm2lua (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:105:14)
at Object. (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/bin/wasm2lua.js:85:12)
at Module._compile (node:internal/modules/cjs/loader:1097:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)

Node.js v18.0.0-pre

@SwadicalRag
Copy link
Owner

I may not be able to debug this myself, but could I ask a favour? Could you attach the .wasm file that you used to generate this error?

If you are feeling extra brave, you can also try to attach a minimum reproducible example

@SwadicalRag SwadicalRag self-assigned this Dec 14, 2021
@SwadicalRag SwadicalRag added the bug Something isn't working label Dec 14, 2021
@Diminim
Copy link

Diminim commented Nov 7, 2022

Hi I'd like to 1 this issue. I installed wasm2lua using yarn and ran into a similar if not the same error report. I tested this on .wasm files you provided in https://github.com/SwadicalRag/bullet3-lua/releases/ and https://github.com/SwadicalRag/brotli-lua/releases/ and did not have any success. Are you still able to get it to work yourself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants