ERROR! recast.js

Actuality Recast.js have error

4ee6cca5c8cf816a78989a26801e7030a917968a.js:680 TypeError: Cannot read property ‘apply’ of undefined
at Module._emscripten_bind_rcConfig_rcConfig_0 (recast.js:40)
at new rcConfig (recast.js:40)
at e.createMavMesh (babylon.js:16)
at createScene (:36:22)
at :135:9
at fastEval (4ee6cca5c8cf816a78989a26801e7030a917968a.js:693)
at 4ee6cca5c8cf816a78989a26801e7030a917968a.js:784
handleException @ 4ee6cca5c8cf816a78989a26801e7030a917968a.js:680

i can´t run my code. HELP

Pinging @Cedric

Hi @Alex_Balam_Sandoval

Do you have a playground with that issue?
Which version of Babylonjs are you using?
Can you copy/paste the parameters used to create the navmesh?

Hi Cedric.

In this link you can see the error the first time, when you hit the play button the error disappears.

The version is 4.1.0-beta.20, but 2 days ago I didn’t have the error

navigationPlugin.createMavMesh(staticMesh, navmeshParameters);

when i want to call createMavMesh the error appears.

You can see it in all the projects that use navmesh with recast.js

ok, I can reprodruce it!
It seems like it’s an issue with async loading of the module.

@sebavan I get this error : “Module.asm.X is undefined” wen the PG is loaded but clicking the play button make the PG to run fine. Looks like async loading issue. Any idea?

hi. after you update recast on preview channel i got errors and rollback to v. 1

yes, something is wrong in my recastjs update. Don’t know yet why.

I recompiled recastjs with an older version of emscripten (1.38.48).
the PR is here recastjs compiled with emscripten 1.38.48 by CedricGuillemet · Pull Request #7480 · BabylonJS/Babylon.js · GitHub
I need more time to find out why it’s not working with the latest emscripten.


@Cedric I am back online :slight_smile: let me know if I can help