RenderTargetTexture: Maximum call stack size exceeded during render list changing

Hello everyone,

I hope you are doing well.

Since version 5.23.0: Release 5.23.0 · BabylonJS/Babylon.js · GitHub, I got a call stack size exceeded when I changed the render list of a render target:

VM3339:3 RangeError: Maximum call stack size exceeded
    at Proxy.hasOwnProperty (<anonymous>)
    at ArrayTools.MakeObservableArray (arrayTools.ts:86:62)
    at set renderList [as renderList] (renderTargetTexture.ts:81:28)

This render list is changed several times in render loop, so the bug appears after about 30 seconds of using.
I guess that it’s related to this commit: Fix scene not clearing in some Default Rendering Pipeline with multic… · BabylonJS/Babylon.js@5322d44 · GitHub

I hope that those information will help you.

Have a nice day !

@carolhmj - this seems to be related to the array-changed proxy. Want to check that?

@zephyrol would you have a Playground repro of this? :slight_smile:

We have a PR up now to improve the render target listening functions, this should avoid this problem :slight_smile: Fix Array Observers by sebavan · Pull Request #12982 · BabylonJS/Babylon.js (
Thank you very much to @sebavan 's programming wisdom :slight_smile:

1 Like

Hello !

I tried the new version 5.24.0 and I confirm the bug is fixed thank you very much !

Have a nice day.