# Exception when querying data from a disposed PhysicsBody

**URL:** <https://forum.babylonjs.com/t/exception-when-querying-data-from-a-disposed-physicsbody/63553>\
**Category:** Bugs\
**Tags:** havok\
**Created:** [May 29, 2026, 11:00am UTC](https://forum.babylonjs.com/t/exception-when-querying-data-from-a-disposed-physicsbody/63553 "2026-05-29T11:00:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_Kerr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/joe_kerr/32/39017_2.png) [@Joe\_Kerr](https://forum.babylonjs.com/u/Joe_Kerr)\
**Post date:** [May 29, 2026, 11:00am UTC](https://forum.babylonjs.com/t/exception-when-querying-data-from-a-disposed-physicsbody/63553/1 "2026-05-29T11:00:48Z")

</div>

Hi everyone,

Please see here: [https://playground.babylonjs.com/#Z8HTUN#1337](https://playground.babylonjs.com/#Z8HTUN#1337)

I am still chasing why this is possible\*\* in my local project (obviously there should not be a call to anything after the body has been disposed). But I do not think Babylon should crash like that. Particularly, if the the calling code runs in a render loop observable, the entire app crashes ☹

User hotfix would be try/catch and/or if( PhysicsBody.isDisposed )

Best wishes  
Joe

* * *

\*\*Babylon does auto-dispose a physics body that is attached to the disposed mesh. The disposal happens indirectly in `PhysicsEngineComponent.ts` via a `Object.defineProperty(TransformNode.prototype, "physicsBody",..)` and there via an onDispose observable. Thumbs up to Codex.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [May 29, 2026, 3:03pm UTC](https://forum.babylonjs.com/t/exception-when-querying-data-from-a-disposed-physicsbody/63553/2 "2026-05-29T15:03:12Z")

</div>

cc @Cedric

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [May 29, 2026, 3:10pm UTC](https://forum.babylonjs.com/t/exception-when-querying-data-from-a-disposed-physicsbody/63553/3 "2026-05-29T15:10:21Z")

</div>

Adding such checks, in all physics methods will make the package grow (a lot) and performance will degrade. So, we let the check responsability to the user. You get a crash that you have to fix. silently failing will be more difficult to track and debug issues. Or user, as you say, can use a try/catch block.
