Fun with CreateEnvTextureAsync

I’m trying to resolve an issue raised, so I thought I would start with a PG. The PG itself seems to work once and then fail the second time:
create env texture | Babylon.js Playground (babylonjs.com)

Separately and I’ll need to figure this out on my own looks like - the codesandboxes crash as there is no camera defined - because that helper method is creating a “hostingScene” ( Babylon.js/environmentTextureTools.ts · BabylonJS/Babylon.js (github.com)) and I try to render it :smile: I wonder if the “hostingScene” could be patched so that it’s “render” method was a no-op. I’ll see about that one as it’s technically a bug in react-babylonjs and I could be adding guard clauses - but I was hoping to avoid that as part of the defautl runRenderLoop, but I’m not expecting Scenes to be added at runtime that cannot be rendered (I render all Scenes for multi-canvas stuff):
sandbox issue: strange-sun-e824l5 - CodeSandbox
my version more declarative: boring-fast-2nj6ls - CodeSandbox

Just wondering if anybody had a bright idea for that one.

I cannot get the PG to fail :frowning:

Edge
image
Firefox

I have a laptop RTX3060

woot! context lost is a massive issue (most often linked to memory overflow or bad driver issue)

cc @sebavan

1 Like

I don’t want to rule out a bad driver issue on my side - although I am not having other issues. If it’s working fine for others then certainly there is no need to investigate further! I thought maybe it was related to the host scene disposing (but that should not carry across PG replays), but have not investigated.

I can not repro either, but I d like to quickly rule out any leak possibilites :frowning: I have checked and successfully launched more than 10 times the pg. Can you share how exactly you are able to repro ?

I just click click the Run once or twice and it crashes.
context-lost

I’m going to mark as solved, since it looks like it’s just happening to me!