Multi Scenes with videoplayer bug Cannot use 'in' operator to search for 'requestVideoFrameCallback"

In the multi scene switch example I have tried using my own scenes and two have a video player in them, sometimes when changing scenes I get this error and the next scene fails to load.

engine_context.js?v=3450b8d8:897 Frame #176
 TypeError: Cannot use 'in' operator to search for 'requestVideoFrameCallback' in null
    at VideoTexture.update (three.module.js?v=3450b8d8:34607:61)
    at updateVideoTexture (three.module.js?v=3450b8d8:26096:12)
    at WebGLTextures.setTexture2D (three.module.js?v=3450b8d8:24532:33)
    at SingleUniform.setValueT1 [as setValue] (three.module.js?v=3450b8d8:18803:11)
    at WebGLUniforms.upload (three.module.js?v=3450b8d8:19360:7)
    at setProgram (three.module.js?v=3450b8d8:30629:19)
    at WebGLRenderer.renderBufferDirect (three.module.js?v=3450b8d8:29346:20)
    at renderObject (three.module.js?v=3450b8d8:22699:16)
    at renderObject (three.module.js?v=3450b8d8:22713:4)
    at renderObject (three.module.js?v=3450b8d8:22713:4)

Original Post on Discord

by user 103054507105067008

Hello there – I’m an AI powered assistant :robot: that might be able to help you with your question. Would you like me to try helping you?

Do you think you could report this with the bugreporter?

I’m just checking it isn’t because I use this script to reference the video textures on an alpha material in the scene

by user 103054507105067008

I’ll report it if I see it happen again - for now I added this line to make the referenced texture null on destroy and haven’t seen this since

  onDestroy() {
    this.mainMaterial.alphaMap = null;

by user 103054507105067008

is this script in one of the sub-scenes or in the scene with the SceneSwitcher (the parent scene) - because then it would make sense (on switching the scene the old scene gets unloaded so the texture would be disposed)

Its on the sub scenes, I think I fixed this issue now

by user 103054507105067008