Skip to content

WeakMap error on updateTexture #31747

@Makio64

Description

@Makio64

Description

I got on a production using a lot of Textures with load / unload a bug with material.map, sadly i didnt understand exactly the exact part of the bug so i cant put reproduction step and the error in console dont allow me to trace it to the source. ( see below screenshot )

Image

The bug disapear when i replaced material.map = txt by material.colorNode = texture( txt ).rgb & same with opacityNode.

regardless, i was wondering if I should do a PR changing :

if ( binding.isSampledTexture ) {

				this.textures.updateTexture( binding.texture );

} 

To

if ( binding.isSampledTexture && binding.texture ) {

				this.textures.updateTexture( binding.texture );

} 

In case the binding.texture was delete in between, i guess this condition race is happening in my scenario ?

Reproduction steps

  1. Coudnt find out whats exactly happening to create what i suspect is a race condition on the gpu.

Version

r179.1

Device

No response

Browser

No response

OS

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions