Page MenuHome

Crash on Append
Closed, ArchivedPublic

Description

System Information
Win8.1x64, 3x gtx580

Blender Version
2.78c

Short description of error
Blender crashes when trying to append particular object.
Some objects deleted before saving are still saved and shown in the Append for no apparent reason.

Some of actions done before included:
making shaders referring to coordinates of other objects,
using modifiers referring to coordinates of other objects on those objects,
linking, deleting, making single user, separately referring and referral objects between the scenes, including aforementioned objects,
duplicating scenes.

Exact steps for others to reproduce the error

  • Open blender,
  • Try to append the scene or object "clouds.base.001" from attached file.

Details

Type
Bug

Event Timeline

Aaron Carlisle (Blendify) triaged this task as Needs Information from User priority.

I cannot confirm the issue, some things to try:

Indeed. On linux, the daily build works fine, the 2.78c crashes.
Still though - daily build keeps non-linked objects present in the file after saving.

Aaron Carlisle (Blendify) raised the priority of this task from Needs Information from User to Normal.
Bastien Montagne (mont29) lowered the priority of this task from Normal to Needs Information from User.May 23 2017, 2:20 PM

Don’t understand what is the issue here, when I append clouds.base.001 I get three other objects, because those are used by node material of appended one. Nothing fancy here.

Please be more specific about what happens for you, what result you would expect, etc.

Open the attached file and re-save it. The file has only one object present (as seen in the viewport and outliner), the rest were deleted. But a bunch of objects remain saved in the file as can be seen when trying to append or browsing data blocks.

All those objects are still in use, either by a group or a nodetree (type for k, v in D.user_map(D.objects).items(): print(k, v) in the python console to see all objetcs' users).

So all object being kept across save/Reload is totally normal. Not sure how you deleted your objects from scene, but issue is/was probably there, so that’s what we'd need to be able to reproduce (how you got to such a file with bunch of objects deleted from scenes but still used by other data-blocks).

Maybe got it -

  1. When a texture coordinate shader node refers to an object and the scene is made a full copy of, the material itself gets duplicated, but the nodes still refer to an object in a previous scene, not the duplicate.
  1. When the original scene gets deleted in such scenario (or sometimes, not yet sure what it correlates with, when the object is pointed from another scene directly) for some reason, the object a texture coordinate node was referring to remains. And it sometimes (again, not yet tested when) remains after multiple re-savings even if the scene is completely empty.

Well… there is no bug here really… Nodes are refcounting users of their ID, which means if a node uses and object, it increases its user count, which hence remains >= 1 even when object is fully deleted from scene. So obviously that object won't be discarded on save, no matter how many times you save it - not until all nodes using it get removed.

We could do same kind of hacks as with groups to ensure an object used in nodes cannot be deleted from all scenes - but am starting to be very annoyed by this Object ID exception, think real TODO here is to provide better ID management access for user, and to allow them to re-instantiate an object in a scene from scratch, and to allow them to properly delete them even when not instantiated in any scene (this should be doable in Outliner already), etc.

Unless @Sergey Sharybin (sergey) or @Campbell Barton (campbellbarton) have something to add here, will close this report, again this is expected behavior in current code, so that’s (known) design task, not a bug.

Think it is more important to prevent loosing your data here. Having some editor which visualized what IDs are used for would help here, but it's out of the scope of bug tracker. So it is indeed a TODO.

Bastien Montagne (mont29) closed this task as Archived.May 24 2017, 2:51 PM
  1. "When a texture coordinate shader node refers to an object and the scene is made a full copy of, the material itself gets duplicated, but the nodes still refer to an object in a previous scene, not the duplicate."

Isn't this a bug?

  1. Mentioned TODO ideas are good and I understand (albeit loosely) the mechanism behind the object remaining, but I didn't suggest that's necessarily the problem. What seems obvious from users perspective however is that when an object is deleted together with a whole scene, it should disappear from all the shader nodes, modifiers etc. referring to it, just like when it is deleted individually. Which, while not a global solution for all linking problems, like already existing orphaned objects, would stop producing them at least in this case.

Ok, sorry - this is a mess and rather unrelated to initial report. I'll try to make it to the point:
https://developer.blender.org/T51624
https://developer.blender.org/T51625