Memory Access out of bounds Error

Hello,

After 10 to 20 seconds of gameplay memory access out of bounds error is coming…

:arrow_forward: Following is error code:

Uncaught RuntimeError: memory access out of bounds
    at https://launch.playcanvas.com/api/assets/files/Ammo/ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:wasm-function[206]:0xc8ac
    at https://launch.playcanvas.com/api/assets/files/Ammo/ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:wasm-function[164]:0xa279
    at https://launch.playcanvas.com/api/assets/files/Ammo/ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:wasm-function[1376]:0x520f5
    at https://launch.playcanvas.com/api/assets/files/Ammo/ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:wasm-function[565]:0x2da4a
    at https://launch.playcanvas.com/api/assets/files/Ammo/ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:wasm-function[1663]:0x69c03
    at https://launch.playcanvas.com/api/assets/files/Ammo/ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:wasm-function[1661]:0x69b3d
    at https://launch.playcanvas.com/api/assets/files/Ammo/ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:wasm-function[627]:0x33cf6
    at https://launch.playcanvas.com/api/assets/files/Ammo/ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:wasm-function[1917]:0x89a51
    at Uc (https://launch.playcanvas.com/api/assets/files/Ammo/ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:wasm-function[557]:0x2c6b7)
    at x.stepSimulation (https://launch.playcanvas.com/api/assets/files/Ammo/ammo.wasm.js?id=37840971&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=6b7ab3989e4f9f17c86e44380f9181c6:507:451)
(anonymous) @ ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:0xc8ac
(anonymous) @ ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:0xa279
(anonymous) @ ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:0x520f5
(anonymous) @ ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:0x2da4a
(anonymous) @ ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:0x69c03
(anonymous) @ ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:0x69b3d
(anonymous) @ ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:0x33cf6
(anonymous) @ ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:0x89a51
Uc @ ammo.wasm.wasm?id=37840972&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=a6819ea71a53e67f1dfe3e42957c2971:0x2c6b7
x.stepSimulation @ ammo.wasm.js?id=37840971&branchId=626e8937-3262-4bec-a31d-bdcc366e04f6&t=6b7ab3989e4f9f17c86e44380f9181c6:507
onUpdate @ playcanvas-stable.dbg.js:43021
_helper @ playcanvas-stable.dbg.js:28955
update @ playcanvas-stable.dbg.js:28966
update @ playcanvas-stable.dbg.js:49332
(anonymous) @ playcanvas-stable.dbg.js:49940
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:49927

And i think this error is coming after enabling red Box colliders… (red box has triggerenter event to detect falling car)
image

How i can fix this issue?
Thanks in Advance…

Can you try running this against version 1.27.4 of the engine? There may be related bugs based on changes to the physics engine

Documentation here: https://developer.playcanvas.com/en/user-manual/scripting/custom_engine/

1 Like

I try to run game this way:
https://launch.playcanvas.com/XXXXXXX?debug=true&use_local_engine=https://code.playcanvas.com/playcanvas-1.27.4.js

But it is giving me error…

The game must be using some newer API although I don’t think it has changed that much between the versions.

There’s no simple answer to these physics crashes. It can be a combination of how the physics rigidbodies have been put together with different types and how it is moved in the scene.

As you are using compound physics, I’m guessing it’s related to: https://github.com/playcanvas/engine/issues/2152

1 Like

Basically i have many Kinematic platform (red and white platform) and colliders (red platform with triggerenter event)
image
As above image i have multiple tracks…

Which i am moving further according to car position… Then this error comes…

Yes i think so, it is somewhat related to it.

Hope it fix before this sunday. [Deadline :sweat_smile:]

Try using teleport on the rigidbody for the kinematic rigidbodies instead of setPosition. That solve an issue in one case on the forums.

1 Like

But unfortunately those kinematic rigidbodies and colliders are child of trackTypes1 (so i have multiple trackTypes like this)
image

So i guess i have to wait till it get fixed… :face_with_head_bandage:

Thanks @yaustar for help and information. :smiley:

Can you DM the project URL to me @Ketan_ATA, I would like to check if it’s the same bug?

1 Like

@yaustar Sent. Please Check!

Looks like it happens at the 223 mark every time when GamePlayManagerScript.prototype.initTrack is called

1 Like

Right, I think there’s some going on with your pooling track logic where you may be trying to do something with a track part that is already in use or similar? Maybe spawning it on top of something else?

1 Like

I’ve sent the OP a DM with a workaround fix. This bug has been reported here: https://github.com/playcanvas/engine/issues/2572

There’s some odd combination of enabling/disabling a cloned entity in the frame that it is cloned that is causing issues.

1 Like

Yes you are on right track…

Yes i am disabling previous tracks and reusing it further next…

Wonderful! You successfully found the cause of this issue… :love_you_gesture:t2:

Thank you very much @yaustar for your time and effort… :star::star::star::star::star:

Hope it fix soon… :slightly_smiling_face: