Crash on Append #51211

Closed
opened 2017-04-14 16:29:40 +02:00 by Konstantins Visnevskis · 16 comments

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.
    import-ob-e2.blend
**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. [import-ob-e2.blend](https://archive.blender.org/developer/F545406/import-ob-e2.blend)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @KonstantinsVisnevskis

Added subscriber: @KonstantinsVisnevskis
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

I cannot confirm the issue, some things to try:

I cannot confirm the issue, some things to try: - Start blender with factory settings - Try a daily build from https://builder.blender.org/download/

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.

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.
Bastien Montagne was assigned by Aaron Carlisle 2017-04-14 21:50:33 +02:00

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.

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.

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).

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.

  2. 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.

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. 2. 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.

Added subscriber: @ideasman42

Added subscriber: @ideasman42

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 or @ideasman42 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.

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 or @ideasman42 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.

Added subscriber: @Sergey

Added subscriber: @Sergey

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.

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.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
  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?

  2. 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.

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? 2. 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

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
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
4 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#51211
No description provided.