I am using nodematerial to change the texture, some times i am getting this error

i am using nodematerial to change the texture, some times i am getting this error suddenly. i am not sure what is going , can you please help

Uncaught TypeError: Cannot read property ‘globalPosition’ of null
at Function.e.BindEyePosition (materialHelper.ts:41)
at t._transmit (inputBlock.ts:557)
at t.bindForSubMesh (nodeMaterial.ts:1190)
at t.render (mesh.ts:1878)
at e.render (subMesh.ts:344)
at e.renderUnsorted (renderingGroup.ts:246)
at e.render (renderingGroup.ts:125)
at e.render (renderingManager.ts:158)
at t._renderForCamera (scene.ts:3765)
at t._processSubCameras (scene.ts:3786)
at t.render (scene.ts:4062)
at index.js:206
at t._renderFrame (engine.ts:1184)
at t._renderLoop (engine.ts:1204)
environmentTextureTools.ts:399 Uncaught (in promise) TypeError: Cannot read property ‘postProcessManager’ of undefined
at environmentTextureTools.ts:399
at e.executeWhenCompiled (effect.ts:472)
at environmentTextureTools.ts:392
at new Promise ()
at Function.e._OnImageReadyAsync (environmentTextureTools.ts:384)
at Image.m.onload (environmentTextureTools.ts:559)

Well we will need a repro to help :wink:

sorry for posting with out the context, we built app which combined with react, i can’t reproduce this in playground. but here is my application which is built to change the textures of 3D rooms.

https://surfacevue.com/.

we are using node material to changes the textures. suddenly some times when we change the texture once a while we are seeing the above error.

@Deltakosh

this is happening once a while, we are using nodematerials for changing the texture, suddenly once a while i am getting this error

Cannot read property ‘globalPosition’ of null

the error is in the scene.activeCamera i

Hum, do you have any way to reproduce it?
One thing you can try is to set nodeMaterial.allowShaderHotSwapping = false

this worked, now i am not seeing this error
can you please tell me why this flag is for

This prevents using the previous version of a shader whilst we are building the new one, which might be needed if there inputs are not compatibles.