Page MenuHome

0- User node-group is left behind when parent group is discarded.
Closed, ArchivedPublic

Description

System Information
Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 419.35

Blender Version
Discovered with:
Broken: version: 2.80 (sub 66), branch: master, commit date: 2019-05-16 12:17, hash: rBe60890075b37
Worked: I don't think this has ever worked
It also happens in today's build:
Broken: version: 2.80 (sub 71), branch: master, commit date: 2019-05-20 16:16, hash: rB9efe117535c6
Worked: (optional)

Short description of error
I'm not sure this is a bug, but it's a confusing behavior. Deleting a node-group with another node-group nested inside and then saving/reloading will leave the nested datablock behind, with 0 users. Blender usually only keeps a datablock with users, even fake users are counted as users. But in this case, it keeps something that has 0 users (at least after garbage-collection is completed).
[Please fill out a short description of the error here]

Exact steps for others to reproduce the error
Make a scene that has a node group with another node-group nested inside - I'll call them Parent and Child. Do not create any additional instances of Child- it should only exist within Parent. Delete every instance of Parent in the blend file. Now, Parent has 0 users listed in the Data API Outliner. Child, however, is still being used by Parent (which has 0 users itself). Save and revert the file, and you'll find that Parent has been discarded, but Child has not. Child is now listed as having 0 users. You can get rid of child by saving again and reverting.

I don't think Blender should discard something that has 0 users and leave something else with 0 users. In very complex node-graphs, a user may have to save and reload several times to fully clear the data.This is tricky, though, since of course Child could be used by itself somewhere.
It seems to me that the parent group isn't using the

This is the first file, with Parent and Child.
This is the file with 0 users of Parent, and 1 user of Child (after deleting the node, but before saving/reloading)
This is the file with 0 users of Child.

I apologize if this isn't really a bug, but I think it's confusing enough, from a user's standpoint, that it should be brought to the dev's attention. I don't think the average Blender user is aware of the user/ID system and will simply think that Blender is doing a bad job collecting garbage.

Thanks.

Details

Type
Bug

Event Timeline

Brecht Van Lommel (brecht) closed this task as Archived.
Brecht Van Lommel (brecht) claimed this task.

This is a known issue of the user counting, it happens with many types of datablocks. After multiple save & reload all the datablocks will eventually go away.

This would be good to solve once, but is not something we handle in the bug tracker.