Segmentation fault after pasting a closed group of nodes into an open group #33628

Closed
opened 2012-12-20 13:26:57 +01:00 by Olivier Vandecasteele · 9 comments

%%%Easy to reproduce:

  • open blender

  • set the rendering engine to Cycles Render

  • select an object (eg. the default cube)

  • clic on Material icon in Properties

  • clic Use Nodes

  • go to Node Editor (change the current view or add a new one... whatever)

  • create a node (eg. Noise Texture : Add > Texture > Noise Texture)

  • (you can add some other nodes but it has no influence)

  • select it (or them)

  • create a new group : CTRL+G

  • close the group : TAB

  • copy the group : CTRL+C

  • open the group : TAB

  • past the copied group : CTRL+V

Blender crash : Segmentation fault (core dumped)

  CPU: Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz x 4
  RAM: 4096MB
  GFX: nVidia GeForce 9600 GT (G94, rev a1)
  OS: Ubuntu 12.04 (precise) 64-bit, Kernel Linux 3.2.0-35-generic
  Drivers: NVIDIA accelerated graphics drivers
  Blender: 2.65.0 r52859

%%%

%%%Easy to reproduce: - open blender - set the rendering engine to Cycles Render - select an object (eg. the default cube) - clic on Material icon in Properties - clic Use Nodes - go to Node Editor (change the current view or add a new one... whatever) - create a node (eg. Noise Texture : Add > Texture > Noise Texture) - (you can add some other nodes but it has no influence) - select it (or them) - create a new group : CTRL+G - close the group : TAB - copy the group : CTRL+C - open the group : TAB - past the copied group : CTRL+V Blender crash : Segmentation fault (core dumped) ``` CPU: Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz x 4 RAM: 4096MB GFX: nVidia GeForce 9600 GT (G94, rev a1) OS: Ubuntu 12.04 (precise) 64-bit, Kernel Linux 3.2.0-35-generic Drivers: NVIDIA accelerated graphics drivers Blender: 2.65.0 r52859 ``` %%%

Changed status to: 'Open'

Changed status to: 'Open'

%%%This operation should not be allowed, pasting a group into itself will give an infinite loop. Lukas, do we have a check for this?%%%

%%%This operation should not be allowed, pasting a group into itself will give an infinite loop. Lukas, do we have a check for this?%%%
Member

%%%Yeah, i was afraid somebody would try stuff like this sooner or later :S

Problem with preventing this case ("reentrant" node group, infinite recursion) is that we don't really have any kind of general system to check the validity of nodes in a specific context. All the checks that are done (e.g. group inside group, render layer only in base trees) are hacks on the operator level.

In the customnodes branch (aka "pynodes") i implemented a two-stage polling system for this purpose:

  1. "poll" classmethod: checks if a node instance of type X can be created in a given tree. Is a class method to allow checking before actually creating a node instance, e.g. in the nodetree.nodes.new API function.
  2. "poll_instance": checks if a specific node instance can be inserted into a given tree. This may depend on the node's settings, in case of node groups this would check if the linked group tree is a parent of the tree it's inserted into (or the tree itself), to prevent recursion.

The system is not quite perfect, since an operator may want to create a node and then change settings, only to find out these settings are invalid (point in case: desired node group tree can not be used). But a generic poll system of some kind would be the way to go.

For now i can try to add a quick hack to the clipboard paste operator to prevent this case.%%%

%%%Yeah, i was afraid somebody would try stuff like this sooner or later :S Problem with preventing this case ("reentrant" node group, infinite recursion) is that we don't really have any kind of general system to check the validity of nodes in a specific context. All the checks that are done (e.g. group inside group, render layer only in base trees) are hacks on the operator level. In the customnodes branch (aka "pynodes") i implemented a two-stage polling system for this purpose: 1) "poll" classmethod: checks if a node instance of type X can be created in a given tree. Is a class method to allow checking before actually creating a node instance, e.g. in the nodetree.nodes.new API function. 2) "poll_instance": checks if a specific node instance can be *inserted* into a given tree. This may depend on the node's settings, in case of node groups this would check if the linked group tree is a parent of the tree it's inserted into (or the tree itself), to prevent recursion. The system is not quite perfect, since an operator may want to create a node and then change settings, only to find out these settings are invalid (point in case: desired node group tree can not be used). But a generic poll system of some kind would be the way to go. For now i can try to add a quick hack to the clipboard paste operator to prevent this case.%%%

%%%Just a try to avoïd the recursion: why not create a copy of the node instead of pasting the original one ?%%%

%%%Just a try to avoïd the recursion: why not create a *copy* of the node instead of pasting the original one ?%%%

%%%It is making a copy of the node, but that node is still using the same node group, which is what it should be doing. Groups are nodes are meant to share their contents unless the group is explicitly duplicated by the user.

Lukas, I suggest just adding a quick check for this in the tool, or leave it as todo as part of pynodes merge.%%%

%%%It is making a copy of the node, but that node is still using the same node group, which is what it should be doing. Groups are nodes are meant to share their contents unless the group is explicitly duplicated by the user. Lukas, I suggest just adding a quick check for this in the tool, or leave it as todo as part of pynodes merge.%%%

%%%Lukas:
If this will be fixed with the pyNodes merge, I guess we can close this here now and mark as todo for the remaining days? ;)%%%

%%%Lukas: If this will be fixed with the pyNodes merge, I guess we can close this here now and mark as todo for the remaining days? ;)%%%

%%%Still crashes with latest SVN, Lukas can you please check? %%%

%%%Still crashes with latest SVN, Lukas can you please check? %%%
Member

%%%Your reported issue has been fixed in SVN. Thanks for taking the
time to report!.%%%

%%%Your reported issue has been fixed in SVN. Thanks for taking the time to report!.%%%
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#33628
No description provided.