Ungrouping destroys NodeCustomGroups #74665

Closed
opened 2020-03-11 20:58:56 +01:00 by Maxim Vasiliev · 12 comments

System Information
Operating system: Linux-5.0.0-38-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GT 730/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 418.56

Blender Version
Broken: version: 2.83 (sub 6), branch: master, commit date: 2020-03-05 21:23, hash: eed1beff88
Worked: (optional)

Short description of error
When a group is ungrouped, user counters are not incremented for contained customgroups.
After deleting a copy of such nodes (eiter in outer tree or remaining in group) the other copy is left with 0-counted node tree and eventually get damaged

Exact steps for others to reproduce the error

  1. load attached file and allow executing embedded script -- the script will registed a CompositorNodeCustomGroup with dumb nodetree and sockets for more dramatic effect
  2. call operator 'add test node' and add the node to compositor
  3. group the node
  4. duplicate the group
  5. ungroup one of the groups
  6. check data view -- 'foo.tree' should have 2 users (the remaining group and compositor nodetree), but it has only 1

nodetest_ungrouping.blend

**System Information** Operating system: Linux-5.0.0-38-generic-x86_64-with-debian-buster-sid 64 Bits Graphics card: GeForce GT 730/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 418.56 **Blender Version** Broken: version: 2.83 (sub 6), branch: master, commit date: 2020-03-05 21:23, hash: `eed1beff88` Worked: (optional) **Short description of error** When a group is ungrouped, user counters are not incremented for contained customgroups. After deleting a copy of such nodes (eiter in outer tree or remaining in group) the other copy is left with 0-counted node tree and eventually get damaged **Exact steps for others to reproduce the error** 1. load attached file and allow executing embedded script -- the script will registed a CompositorNodeCustomGroup with dumb nodetree and sockets for more dramatic effect 2. call operator 'add test node' and add the node to compositor 3. group the node 4. duplicate the group 5. ungroup one of the groups 6. check data view -- 'foo.tree' should have 2 users (the remaining group and compositor nodetree), but it has only 1 [nodetest_ungrouping.blend](https://archive.blender.org/developer/F8401158/nodetest_ungrouping.blend)
Author

Added subscriber: @qwiglydee

Added subscriber: @qwiglydee

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

I didn't understand what you meant in the point 7. "open another group and delete node 'foo' there".
Is there really a need for custom nodes and script execution?
It is good to simplify a report to the minimum steps to save time either in the reproduction of the bug or in the investigation.

A guideline for making a good bug report can be found at https://wiki.blender.org/wiki/Process/Bug_Reports

I didn't understand what you meant in the point 7. `"open another group and delete node 'foo' there".` Is there really a need for custom nodes and script execution? It is good to simplify a report to the minimum steps to save time either in the reproduction of the bug or in the investigation. A guideline for making a good bug report can be found at https://wiki.blender.org/wiki/Process/Bug_Reports
Author

In #74665#889869, @mano-wii wrote:
I didn't understand what you meant in the point 7. "open another group and delete node 'foo' there".
Is there really a need for custom nodes and script execution?

NodeCustomGroup is needed because it contains reference to NodeTree which should be usercounted.

However, I've just tested, the similar happens with ImageTexture which also reference to an ID, but via property.

It is good to simplify a report to the minimum steps to save time either in the reproduction of the bug or in the investigation.

Minimal steps would be just 1-6 that result in improper user counter, but they do not result in any destructive effects.

> In #74665#889869, @mano-wii wrote: > I didn't understand what you meant in the point 7. `"open another group and delete node 'foo' there".` > Is there really a need for custom nodes and script execution? NodeCustomGroup is needed because it contains reference to NodeTree which should be usercounted. However, I've just tested, the similar happens with ImageTexture which also reference to an ID, but via property. > It is good to simplify a report to the minimum steps to save time either in the reproduction of the bug or in the investigation. Minimal steps would be just 1-6 that result in improper user counter, but they do not result in any destructive effects.

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Author

This case seems resolved in D6484

Snippet:
source/blender/editors/space_node/node_group.c:193-203

This case seems resolved in [D6484](https://archive.blender.org/developer/D6484) Snippet: source/blender/editors/space_node/node_group.c:193-203
Author

This also affects ordinary nested groups.

  1. greate a node
  2. group it and name the group 'inner'
  3. group the group again into 'outer' group
  4. duplicate outer group
  5. ungroup outer group
  6. inner group nodetree now has 1 users counter instead of 2
  7. (deleting either copy of inner group will leave remaining copy with 0 users)
  8. (reloading file or cleaning orphans will destroy content of the inner group)

Should the cases with image texture and nested group be reported as separate bugs?

This also affects ordinary nested groups. 1. greate a node 2. group it and name the group 'inner' 3. group the group again into 'outer' group 4. duplicate outer group 5. ungroup outer group 6. inner group nodetree now has 1 users counter instead of 2 7. (deleting either copy of inner group will leave remaining copy with 0 users) 8. (reloading file or cleaning orphans will destroy content of the inner group) Should the cases with image texture and nested group be reported as separate bugs?
Author

Apparently, this bug used to be compensated by another bug, adressed in e993667a46

Before that fix, ungrouping operation resulted in double-increased user counters.
In the reported scenarios, stuff from froup got 3 users instead of 2. This helped to avoid destructive effects.
(I checked it for customgroup, nested groups and image texture)

Apparently, this bug used to be compensated by another bug, adressed in e993667a46 Before that fix, ungrouping operation resulted in double-increased user counters. In the reported scenarios, stuff from froup got 3 users instead of 2. This helped to avoid destructive effects. (I checked it for customgroup, nested groups and image texture)

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Bastien Montagne self-assigned this 2020-04-06 16:31:50 +02:00

Should be solved by c544df997e.

Should be solved by c544df997e.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#74665
No description provided.