Oh wow okay, thanks a lot! I’ll fix that ASAP!
Guess sometimes its the simple things
Thanks for your help, I guess I’ll change the title to solved then!
I’ve got this issue into the smallest possible scene I can manage here https://playcanvas.com/project/1025265
Click on the button is all that is needed to trigger the issue. I’ve got no clue on what’s happening here
Findings:
Removing the batch group on ‘Box001-test’ stops the error from triggering
Changing all the Omni Lights under ‘Delete any of the lights and the bug stops happening’ to Shadow update mode ‘always’ stops the error
Deleting any of the Omni Lights stops the issue from happening
Deleting ‘Delete this and all hell breaks lose’ causes the the render to get stuck in an error loop
1 Like
Hm, just took a look at it. Fortunately I have an accepteable solution at hand but it’s still unfortunate for performance reasons that I’m unable to disable some of those more costly assets.
BTW loving this one haha
Disabling / Removing the batch groups may be the easiest solution here tbh with the least cost
1 Like
Alright, will try that! Thanks a lot for your time and help!
Created two tickets on this:
opened 04:54PM - 05 Jan 23 UTC
bug
area: graphics
Related thread: https://forum.playcanvas.com/t/solved-cannot-read-properties-of-… null-reading-device/29128/
Project: https://playcanvas.com/project/1025290/overview/clustered-lighting-disable-bug
Launch project
Press 1 to disable the cube
Errors appear:
```
Uncaught TypeError: Cannot read properties of null (reading 'width')
at LightsBuffer.addLightData (lights-buffer.js:400:61)
at WorldClusters.updateClusters (world-clusters.js:389:31)
at WorldClusters.update (world-clusters.js:440:14)
at ForwardRenderer.updateClusters (forward-renderer.js:1913:29)
at RenderPass.execute (forward-renderer.js:1969:22)
at RenderPass.render (render-pass.js:215:14)
at FrameGraph.render (frame-graph.js:127:29)
at Application.renderComposition (app-base.js:1240:25)
at Application.render (app-base.js:1228:14)
at app-base.js:2201:29
```
opened 04:58PM - 05 Jan 23 UTC
bug
area: graphics
Thread: https://forum.playcanvas.com/t/solved-cannot-read-properties-of-null-rea… ding-device/29128
Honestly not sure how to title this one
Project: https://playcanvas.com/project/1025265
Click on the button 'Click here'. This disables the Box and moves the camera. Erro:
```
mesh-instance.js:753 Uncaught TypeError: Cannot read properties of null (reading 'device')
at MeshInstance.updatePassShader (mesh-instance.js:753:71)
at ShadowRenderer.submitCasters (shadow-renderer.js:519:30)
at ShadowRenderer.render (shadow-renderer.js:582:22)
at ForwardRenderer.renderShadows (forward-renderer.js:1122:34)
at RenderPass.execute (forward-renderer.js:1964:22)
at RenderPass.render (render-pass.js:215:14)
at FrameGraph.render (frame-graph.js:127:29)
at Application.renderComposition (app-base.js:1240:25)
at Application.render (app-base.js:1228:14)
at app-base.js:2201:29
```
Findings
- Removing the batch group on ‘Box001-test’ stops the error from triggering
- Changing all the Omni Lights under ‘Delete any of the lights and the bug stops happening’ to Shadow update mode ‘always’ stops the error
- Deleting any of the Omni Lights stops the issue from happening
- Deleting ‘Delete this and all hell breaks lose’ causes the the render to get stuck in an error loop (see #[4950](https://github.com/playcanvas/engine/issues/4950))
Disabling clustered lighting also avoids the issue.
2 Likes
@Vahrenhol3D
Thanks for sharing the issues with us, we’ve got fixes in place for this so in the next engine release (1.59.1), your original setup should be fine
1 Like