Physics extension problem


I have a object with physics automatism enabled on it.
the object is on scene1.
when I go from scene1 to scene2 back and forth again and again then on probably 7th transition the error occues

“code.js:16 Uncaught Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.”

because on scene1 transition the object is not DESTROYING before going to scene2.

delete object does not works and also I have tried the following code

window.baseStand = runtimeScene.getObjects(“baseStand”)[0];

but still not works

I need a way to Destroy body from BOX2D world

Please help me out

This is my 3rd post on this issue

Dude… You made 3 topics about the same thing? Why is that? You can edit your posts if you have more things to ask :slight_smile:
I don’t know how to solve your problem, though.

I’m currently fixing the issue. With a simple fix, the scene can be changed without problem until another bug appears (approximately after 20 scenes changes). So, I’m now fixing the second bug. :slight_smile:

Thanks for fixing.

When it will be fixed totally and should I need to download new version of Gdevelop or can you not provide me javascript hack for it

Actually I’m on edge of releasing game so I need a quick FIX for this one.

Thank you very much

We are currently trying to fix the second bug, so don’t expect the fix because the next stable release of GDevelop.

There was “Stop Automation” action to stop the Physics automation on any object may be that can FIX the issue but I can’t see this action in current version of Gdevelop.

Actually I’m doing the following event using Physics extension

Can I achieve the same thing without physics extension If not then please provide me JavaScript code to Destroy “ball” object from the BOX2D world


You won’t fix the bug by destroying the ball in the box2d world. :wink:

EDIT : I may have a solution for you. You can try to use the fixed js files instead of the one provided by the current stable version of GDevelop. It may not work if some incompatible changes happened but it’s worth it. So, put :

  • scenestack.js (2.41 KB) in the main folder of your exported game
  • physicsruntimebehavior.js (20.5 KB) in the Extensions/PhysicsBehavior folder of your exported game
  • box2d.js (794 KB) in the Extensions/PhysicsBehavior/box2djs folder of your exported game

Thanks for fix but on execution it produces the following error

So, you will have to wait the next version of GDevelop.

I have only 5 days to release the game. No time at all

Thanks for your help I have to find another solution

Or you build yourself the lastest GDevelop version from the Github repo : (Click on “Download ZIP” to download the sources)

I find the QUICK JAVASCRIPT FIX for it without releasing the new version :wink:
just do the following in scene in which Physics Extension is being used


do this whenever going from Physics Extension Scene to any other scene.

Actually Gdevelop is inserting elements every time we load physics extension scene as sa array is global so it not destroys when we reload scene
sa.length == 20
when it overflows then it says
“finished up all the reserved function pointers”