For some reason, GizmoManager doesn’t like to be created early on in the scene creation. E.g. when I create the scene variable, then a new gizmomanager, and only then create the first camera, a crash will happen (something with a vertexbuffer index not existing). Creating the gizmomanager after the loading screen and the run/renderloop seems to be working fine, though.
Two questions. First, what version of Babylon.js are you using and two, are you able to create a PG that can reproduce this? I tried to create a basic on but was unable to.
Was not able to repro either, a playground would be great
This topic can be deleted.
I’ve done various tests and the random error is coming from somewhere else (don’t know where exactly though), the error doesn’t depend on just the GizmoManager. Even without it the error occurs randomly:
effect.ts:426 Uncaught TypeError: Cannot read property ‘0’ of undefined
at Effect…/Materials/effect.ts.Effect.getAttributeLocation (effect.ts:426)
at Engine…/Engines/engine.ts.Engine._bindVertexBuffersAttributes (engine.ts:2755)
at Engine…/Engines/engine.ts.Engine.recordVertexArrayObject (engine.ts:2801)
at Geometry…/Meshes/geometry.ts.Geometry._bind (geometry.ts:376)
at Mesh…/Meshes/mesh.ts.Mesh._bind (mesh.ts:1298)
at Mesh…/Meshes/mesh.ts.Mesh._renderWithInstances (mesh.ts:1452)
at Mesh…/Meshes/mesh.ts.Mesh._processRendering (mesh.ts:1466)
at Mesh…/Meshes/mesh.ts.Mesh.render (mesh.ts:1644)
at SubMesh…/Meshes/subMesh.ts.SubMesh.render (subMesh.ts:307)
at RenderingGroup…/Rendering/renderingGroup.ts.RenderingGroup.renderUnsorted (renderingGroup.ts:244)