AmmoJs SoftbodyImpostor - "b._free is not a function" error

Hello forum,

Story:
Recently I wanted to try out soft-body physics in WebGL with AmmoJs. Everything worked, but when I tried to add a second soft-body object, it always fails. Both in BabylonJs and ThreeJs.
The error I get: b._free is not a function.
When:

  • when trying to press Play in BabylonJs Playground,
  • when trying to add a second soft-body object.
    Where:
    Latest BabylonJs/ThreeJs, chrome, firefox, chrome android.

Reproduce:
It happens for me even in the Playground - No need for the second soft-body physics object, just press the Play button again and you’ll get that bug. It is the AmmoJs’s problem I think, but I was surprised that no one from Babylon and from ThreeJs reported about this bug. Or am I the only one with this bug?

Video: BabylonJs/ThreeJs/AmmoJs bug - b._free is not a function - YouTube

Thank you!

Hi @ruzrobert and welcome to the forum! This was discussed in this forum thread Adding @Cedric / @RaananW to re-hydrate the discussion to see if there is a fix.

2 Likes

I quite busy this week. I’ll take a look next Monday.

3 Likes

Thank you @thomlucc ! Will be waiting for the update!
Also, it looks like the forum’s content is hidden from google search bots in the robots.txt, and that’s why I wasn’t able to find anything about my bug from the outside :frowning:

1 Like

ohhh @RaananW might have clues regarding SEO

the robots.txt file does not limit googlebot from indexing the page. Not sure where you see it?

Google indexes the forum at its own pace, so there might be some pages that were not yet indexed. we are sadly not in control of that… But you do get results when searching in google:

image

1 Like

Hey @RaananW , thank you for checking. You seem right, google search is working for this forum. I was trying to search specifically the “b._free is not a function” part and wasn’t able to find anything. Now, this topic appears there, so everything’s good :slight_smile:

1 Like

Hey @ruzrobert, was wondering if you ever figured out this issue? Am running into the same problem.

Yes, it does feel like the ammo build is missing a function. @Cedric is a little busy for the next day or two, but I am sure he will find time to investigate.

It’s the same issue as Physics demo messed up? - #11 by Cedric
Did we update ammojs build recently?
Can we have a CI build that build ammo with needed parameters automatically?

sure, let’s dicuss this internally and see how we can get that to work. And no - we didn’t build ammo lately, so I am not sure what changed

@leeren @RaananW @Cedric This bug happens only for a non-wasm build of the ammo.js, I think (it was like that when I was using Three js). From what I’ve found out, this is probably related to the build arguments for the non-wasm build of ammo, or idk. Hope that it can be fixed :slight_smile: