ID 499446 - Deleting isolated Paint nodes while viewing a Shader can cause glitches

Follow

Problem summary
Deleting isolated Paint nodes while viewing a Shader can cause glitches

These glitches only appear in the viewport, the actual texture data is not affected.

Customer reported version
Mari 4.7v2

Customer reported platform
N/a

Steps to reproduce

1) Create 3+ Paint nodes and apply Paint to all of them

2) Merge all of these Paint nodes into one stream

3) Create a Principled BRDF Shader

4) Connect the merged Paint nodes to the Base Color input and view the Shader

5) Create a new Paint node (not connected to anything)

6) While viewing the Shader, delete the new Paint node

Expected behaviour
The Paint node should be deleted.

Actual behaviour
The Paint node is deleted, but the Viewport changes and looks as though the Paint data being viewed has been deleted:

Workaround
Reloading the project or switching the view to another node and then back can revert the glitches.

Reproduced by support
This bug has been reproduced in:
Mari 5.0v1 - Windows 10 - CentOS 7.9
Mari 4.8v1 - Windows 10
Mari 4.7v1 - Windows 10
Mari 4.6v4 - Windows 10
Mari 4.6v3 - Windows 10 - CentOS 7.9 - regression

Unable to reproduce bug in:
Mari 4.6v2 - Windows 10 - CentOS 7.9

Earliest version tested
Mari 4.6v2 - This issue doesn't appear in this version and has regressed

 

    We're sorry to hear that

    Please tell us why