[SOLVED] Got error on disposing instance meshes


version: 4.0.3
was disposing instances and got error:

Uncaught TypeError: Cannot read property '_internalAbstractMeshDataInfo' of undefined
    at t._activate
    at t.render
    at t._renderForCamera
    at t._processSubCameras
    at t.render

checked code and looks like this._currentLOD is undefined at that time.
Will try to create playground version, but meanwhile wanted to clarify some stuff.

Is type for private _currentLOD: Mesh; inside InstancedMesh correct ?

As for me it should be private _currentLOD: Nullable<Mesh>;, as firstly its not initialised in constructor,
also all usages except _activate have check before usage anyway. :slight_smile:

Thank you

1 Like

Yep seems like a miss :slight_smile:
Please send a PR or a repro in the PG (I personally prefer the PR ;D )

Will fix it actually

Thanks for the heads up!

1 Like

@Deltakosh thank you, will there be release for 4.0 version with this ? :slight_smile:

Nope this will be in 4.1

But honestly we do not differentiate versions regarding quality.

@Deltakosh ok will update to alpha0 then