voronikpm
Topic Author
Posts: 6
Joined: 17 Sep 2017, 13:12

Issues with webassembly build

12 Apr 2024, 18:50

Hi!

We're looking into using noesis in our babylonjs app, so I've tried building and running wasm examples (noesis 3.2.3, built with make 4.4.1 and emscripten 3.1.8) and encountered some issues.
The critical one is an uncaught divide by zero error
[NOESIS/I] Noesis Init v3.2.3 (Emscripten Profile) Samples.HelloWorld.js:2607:19
onerror: RuntimeError: integer divide by zero localhost:8080:40:17
Uncaught RuntimeError: integer divide by zero
    createExportWrapper http://localhost:8080/Samples.HelloWorld.js:1521
    callMain http://localhost:8080/Samples.HelloWorld.js:5607
    doRun http://localhost:8080/Samples.HelloWorld.js:5664
    run http://localhost:8080/Samples.HelloWorld.js:5675
    setTimeout handler*run http://localhost:8080/Samples.HelloWorld.js:5671
    runCaller http://localhost:8080/Samples.HelloWorld.js:5585
    removeRunDependency http://localhost:8080/Samples.HelloWorld.js:1423
    receiveInstance http://localhost:8080/Samples.HelloWorld.js:1610
    receiveInstantiationResult http://localhost:8080/Samples.HelloWorld.js:1628
    promise callback*createWasm/instantiateAsync/< http://localhost:8080/Samples.HelloWorld.js:1662
    promise callback*instantiateAsync http://localhost:8080/Samples.HelloWorld.js:1654
    createWasm http://localhost:8080/Samples.HelloWorld.js:1691
    <anonymous> http://localhost:8080/Samples.HelloWorld.js:5273
Samples.HelloWorld.wasm:466934:1
    Noesis::PoolAllocator::Allocate() http://localhost:8080/Samples.HelloWorld.wasm:466934
    Noesis::Boxing::BoxingAllocate(unsigned long) http://localhost:8080/Samples.HelloWorld.wasm:466849
    Noesis::Boxed<bool>::operator new(unsigned long) http://localhost:8080/Samples.HelloWorld.wasm:467214
    Noesis::Boxing::Init() http://localhost:8080/Samples.HelloWorld.wasm:467077
    Noesis::Init() http://localhost:8080/Samples.HelloWorld.wasm:4354024
    NoesisApp::Launcher::Init() const http://localhost:8080/Samples.HelloWorld.wasm:4355147
    NoesisApp::DisplayLauncher::Run() http://localhost:8080/Samples.HelloWorld.wasm:2852516
    NsMain(int, char**) http://localhost:8080/Samples.HelloWorld.wasm:4700181
    main http://localhost:8080/Samples.HelloWorld.wasm:4700024
    createExportWrapper http://localhost:8080/Samples.HelloWorld.js:1521
    callMain http://localhost:8080/Samples.HelloWorld.js:5607
    doRun http://localhost:8080/Samples.HelloWorld.js:5664
    run http://localhost:8080/Samples.HelloWorld.js:5675
    (Async: setTimeout handler)
    run http://localhost:8080/Samples.HelloWorld.js:5671
    runCaller http://localhost:8080/Samples.HelloWorld.js:5585
    removeRunDependency http://localhost:8080/Samples.HelloWorld.js:1423
    receiveInstance http://localhost:8080/Samples.HelloWorld.js:1610
    receiveInstantiationResult http://localhost:8080/Samples.HelloWorld.js:1628
    (Async: promise callback)
    instantiateAsync http://localhost:8080/Samples.HelloWorld.js:1662
    (Async: promise callback)
    instantiateAsync http://localhost:8080/Samples.HelloWorld.js:1654
    createWasm http://localhost:8080/Samples.HelloWorld.js:1691
    <anonymous> http://localhost:8080/Samples.HelloWorld.js:5273
There are also a couple of minor issues with the makefiles - NoesisGUI-wasm.mk uses backslashes in paths, so linux builds fail immediately
make[1]: *** ..SrcProjectsNoesisAppwasm: No such file or directory.  Stop.
make: *** [NoesisGUI-wasm.mk:37: NoesisApp] Error 2
And another issue is that on windows if git bash is installed it will add the $SHELL variable, so cmd and powershell are incorrectly determined to be posix shells.
 
User avatar
jsantos
Site Admin
Posts: 3931
Joined: 20 Jan 2012, 17:18
Contact:

Re: Issues with webassembly build

13 Apr 2024, 03:19

The critical one is an uncaught divide by zero error
Unfortunately, this is something we broke in 3.2.3 (for Wasm). It is already fixed, please create a ticket and I will provide a hot-fix.
There are also a couple of minor issues with the makefiles - NoesisGUI-wasm.mk uses backslashes in paths, so linux builds fail immediately
Interesting, because the linux makefiles and properly generated. Could you please create a ticket for this too?
And another issue is that on windows if git bash is installed it will add the $SHELL variable, so cmd and powershell are incorrectly determined to be posix shells.
And another ticket for this? 😅

Thank you!
 
voronikpm
Topic Author
Posts: 6
Joined: 17 Sep 2017, 13:12

Re: Issues with webassembly build

15 Apr 2024, 11:28

I've created tickets for the first two issues, but weirdly enough I wasn't able to reproduce the last one, even though I've seen it both on Friday and a few days pror, when I first tried the windows build.
Thanks!
 
User avatar
jsantos
Site Admin
Posts: 3931
Joined: 20 Jan 2012, 17:18
Contact:

Re: Issues with webassembly build

15 Apr 2024, 14:00

Thank you for the tickets! (#3241 #3240)

We also provided a hot-fix for #3240.
 
voronikpm
Topic Author
Posts: 6
Joined: 17 Sep 2017, 13:12

Re: Issues with webassembly build

16 Apr 2024, 07:33

Thanks for the quick fix!

Who is online

Users browsing this forum: Ahrefs [Bot], kristoffer, Semrush [Bot], tandr and 5 guests