Engine.dispose() strange side effect

This is a really strange bug and cannot be reproduced in the Playground.

I have

  • two completely separate views with separate canvas/engine/scene, displayed in DIVs next to each other
  • each view has a separate BABYLON.UtilityLayerRenderer
  • each view has a separate BABYLON.PlaneDragGizmo
  • both views work correctly

After disposing both engines and recreating from scratch, the BABYLON.PlaneDragGizmo IN ONE OF THEM stops working, it displays correctly but does handle mouse movement.

Any ideas? Any global variables I need to know about?


As you can guess, without a repro it will be hard to help.

Have you tried with the latest alpha version? We had some problems lately with input management, maybe it was a transient bug. Also, did you try with an older version like 4.2?

I’ll try the alpha and the 4.2, thanks!

BTW, I thoughr I could quickly understand how to load the other versions but failed.
I load BJS with require(). The path I use is https://cdn.babylonjs.com, what are the addresses for the alpha and the 4.2? Sorry to bother.

The path is https://preview.babylonjs.com

Thank you. Preview has same issue. I have tried for a few hours to create a tiny html page reproducing the error but can’t so I now suspect the issue must be a side effect from somewhere in our codebase,

Just a follow-up, just noticed that (in our code) BABYLON.Tools.CreateScreenshot works in the PREVIEW but not in release. When is the next release?

It’s not before a number of months (we don’t have the final release date yet).

Try to put your CreateScreenshot call in engine.onEndFrameObservable and see if that helps.