Babylon: 6.7.0
Devices: Desktop
Browsers: Firefox 78,102,112,114, 115, 116 and others
I see the error in the particle system. I’m using GPUParticleSystem.
I have two kind of PS - code-based and from the snippet. But unfortunately, I can’t tell you which one with this issue(maybe both).
TypeError: this._attributes is undefined
at e.prototype.getAttributeLocation
at e.prototype._bindVertexBuffersAttributes
at e.prototype.recordVertexArrayObject
at e.prototype._createUpdateVAO
at e.prototype.createVertexBuffers
at t.prototype._createVertexBuffers
at t.prototype._initialize
at t.prototype.render
at e.prototype._renderParticles
at e.prototype.render
at e.prototype.render
at t.prototype._renderForCamera
at t.prototype._processSubCameras
at t.prototype.render
...
at t.prototype._renderFrame
at t.prototype._renderLoop
I have similar stack trace on others devices(Mobile Chrome 89.0.4389, Tablet Chrome 87.0.4280 …):
TypeError: Cannot read properties of undefined (reading ‘0’)
at e.getAttributeLocation [js/babylon-6_7_0.js:1:238409]
at e._bindVertexBuffersAttributes [js/babylon-6_7_0.js:1:315516]
at e.recordVertexArrayObject [js/babylon-6_7_0.js:1:316246]
at e._createUpdateVAO [js/babylon-6_7_0.js:1:3722062]
at e.createVertexBuffers [js/babylon-6_7_0.js:1:3718697]
at t._createVertexBuffers [js/babylon-6_7_0.js:1:3821078]
at t._initialize [js/babylon-6_7_0.js:1:3823676]
at t.render [js/babylon-6_7_0.js:1:3834246]
at e._renderParticles [js/babylon-6_7_0.js:1:448080]
at e.render [js/babylon-6_7_0.js:1:444174]
I found this line where _attributes has been assigned: https://github.com/BabylonJS/Babylon.js/blob/master/packages/dev/core/src/Materials/effect.ts#L784
Seems like I start PS before it’s ready…
I see this._initialize()
https://github.com/BabylonJS/Babylon.js/blob/8a42ad80d4419c668120f5eedac9be6a2b8f5a3a/packages/dev/core/src/Particles/gpuParticleSystem.ts#L1671 only on GPUParticleSystem.