After upgrade to 7.39.1: Cannot add an uniform after UBO has been created

Hi everyone,

I am getting a repeated console.error from the render loop:

I have just upgraded from 7.13 to 7.39.1. This error does not occur in 7.13.

Before I go into debugging, can I just ask, did anything change recently that newly added logging for this error? Or asked slightly differently: Can I assume that an error in my code was present in 7.13 already but it was just not logged?


The console spam comes in batches and without any interaction with the scene.

When I turn off “Render targets” in the Inspector, the console spam stops. However, the error is still logged whenever I move the camera. The error also logs when doing random stuff in the scene. Cannot spot a pattern yet.

If I dispose all materials, the error seems to be gone.

Best wishes
Joe

The log of this error is not new, but it’s strange that you’re only getting it now if you haven’t modified your code… If you can provide a reproduction, we’ll be able to find the first revision where this error starts to appear and understand what generates it.

1 Like

Alright, found it. Something wrong with GreasedLine.

Not sure what the deal is with "RenderTargets " in my local project. Does GreasedLine use RenderTargets somehow? (*Reminder: in local project, the console error is spammed from within the render loop until I turn off render targets in the inspector.)

But anyway: Babylon.js Playground (move camera)

I can confirm it wasn’t here in 7.28 and you can reproduce without moving the camera by using the first example in the docs about GreasedLine

https://playground.babylonjs.com/#H1LRZ3#98

So it’s from 7.37.2.
In 7.37.0 the error does not occur…

Maybe : Grl webgpu simplematerial by RolandCsibrei · Pull Request #15946 · BabylonJS/Babylon.js · GitHub

@roland The problem is with this line:

You should not do it in WebGL, as it’s already done by the framework.

1 Like

Is the if in line 292 the reason the tests didn’t catch it?

This is not an issue on MacOS so I didn’t catch it. :see_no_evil:

PR will be ready in a matter of minutes.

2 Likes

In fact it does not make the test fail, it’s only a warning in the browser console.

1 Like

@Joe_Kerr @sharp
Could you guys give it a try with the snapshot build below? Thanks!

1 Like

Thanks a lot!

1 Like

Yep @roland it’s fixed with this snapshot, well done :clap:!

1 Like