Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hang with chain of Parent nodes #4978

Closed
murraystevenson opened this issue Nov 23, 2022 · 0 comments
Closed

Hang with chain of Parent nodes #4978

murraystevenson opened this issue Nov 23, 2022 · 0 comments

Comments

@murraystevenson
Copy link
Contributor

Description

A chain of three Parent nodes can lead to a hang when the first and last nodes in the chain share the same hash. This can occur when the first and last Parent nodes aren't filtered to valid scene locations and so are not outputting new branches.

Steps to reproduce

  1. Open the script below in a Gaffer with an overly small compute cache limit (such as 128kb). This example requires the ALab 2.0 data set.
  2. View the output of Box, waiting for the computation to finish.
  3. Select /root in the Hierarchy View and expand & collapse the location a few times in quick succession.
  4. If the bug is triggered, Gaffer's UI will hang. A stacktrace from one of these hangs is attached.

Debug log

Click to Expand

import Gaffer
import GafferScene
import IECore
import imath

Gaffer.Metadata.registerValue( parent, "serialiser:milestoneVersion", 1, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:majorVersion", 1, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:minorVersion", 4, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:patchVersion", 0, persistent=False )

__children = {}

__children["SceneReader"] = GafferScene.SceneReader( "SceneReader" )
parent.addChild( __children["SceneReader"] )
__children["SceneReader"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"] = Gaffer.Box( "Box" )
parent.addChild( __children["Box"] )
__children["Box"].addChild( GafferScene.Parent( "Parent" ) )
__children["Box"]["Parent"]["children"].addChild( GafferScene.ScenePlug( "child1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"]["Parent"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"].addChild( GafferScene.ScenePlug( "in", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"].addChild( GafferScene.Parent( "Parent1" ) )
__children["Box"]["Parent1"]["children"].addChild( GafferScene.ScenePlug( "child1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"]["Parent1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"].addChild( GafferScene.Parent( "Parent2" ) )
__children["Box"]["Parent2"]["children"].addChild( GafferScene.ScenePlug( "child1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"]["Parent2"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"].addChild( GafferScene.ScenePlug( "out", direction = Gaffer.Plug.Direction.Out, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"].addChild( Gaffer.BoxIn( "BoxIn" ) )
__children["Box"]["BoxIn"].setup( GafferScene.ScenePlug( "out", ) )
__children["Box"]["BoxIn"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"].addChild( Gaffer.BoxOut( "BoxOut" ) )
__children["Box"]["BoxOut"].setup( GafferScene.ScenePlug( "in", ) )
__children["Box"]["BoxOut"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"].addChild( GafferScene.Cube( "Cube" ) )
__children["Box"]["Cube"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"].addChild( GafferScene.Cube( "Cube1" ) )
__children["Box"]["Cube1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"].addChild( GafferScene.Cube( "Cube2" ) )
__children["Box"]["Cube2"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"].addChild( GafferScene.PathFilter( "PathFilter" ) )
__children["Box"]["PathFilter"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"].addChild( GafferScene.PathFilter( "PathFilter1" ) )
__children["Box"]["PathFilter1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Box"].addChild( GafferScene.PathFilter( "PathFilter2" ) )
__children["Box"]["PathFilter2"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["DeleteAttributes"] = GafferScene.DeleteAttributes( "DeleteAttributes" )
parent.addChild( __children["DeleteAttributes"] )
__children["DeleteAttributes"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["PathFilter"] = GafferScene.PathFilter( "PathFilter" )
parent.addChild( __children["PathFilter"] )
__children["PathFilter"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["MergeScenes"] = GafferScene.MergeScenes( "MergeScenes" )
parent.addChild( __children["MergeScenes"] )
__children["MergeScenes"]["in"].addChild( GafferScene.ScenePlug( "in2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["MergeScenes"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SceneReader"]["fileName"].setValue( '/home/murray/projects/extern/alab/alab-v2.0.1/ALab/entry.usda' )
__children["SceneReader"]["__uiPosition"].setValue( imath.V2f( -9.54833317, 14.7414846 ) )
Gaffer.Metadata.registerValue( __children["Box"], 'noduleLayout:customGadget:addButtonTop:visible', False )
Gaffer.Metadata.registerValue( __children["Box"], 'noduleLayout:customGadget:addButtonBottom:visible', False )
Gaffer.Metadata.registerValue( __children["Box"], 'noduleLayout:customGadget:addButtonLeft:visible', False )
Gaffer.Metadata.registerValue( __children["Box"], 'noduleLayout:customGadget:addButtonRight:visible', False )
__children["Box"]["Parent"]["in"].setInput( __children["Box"]["BoxIn"]["out"] )
__children["Box"]["Parent"]["filter"].setInput( __children["Box"]["PathFilter"]["out"] )
__children["Box"]["Parent"]["parent"].setValue( '/' )
__children["Box"]["Parent"]["children"][0].setInput( __children["Box"]["Cube"]["out"] )
__children["Box"]["Parent"]["__uiPosition"].setValue( imath.V2f( -11.4991846, 9.55000019 ) )
__children["Box"]["in"].setInput( __children["MergeScenes"]["out"] )
Gaffer.Metadata.registerValue( __children["Box"]["in"], 'nodule:color', imath.Color3f( 0.240099996, 0.339399993, 0.485000014 ) )
Gaffer.Metadata.registerValue( __children["Box"]["in"], 'nodule:type', 'GafferUI::StandardNodule' )
Gaffer.Metadata.registerValue( __children["Box"]["in"], 'description', 'The input scene' )
Gaffer.Metadata.registerValue( __children["Box"]["in"], 'plugValueWidget:type', '' )
Gaffer.Metadata.registerValue( __children["Box"]["in"], 'noduleLayout:spacing', 2.0 )
__children["Box"]["Parent1"]["in"].setInput( __children["Box"]["Parent"]["out"] )
__children["Box"]["Parent1"]["filter"].setInput( __children["Box"]["PathFilter2"]["out"] )
__children["Box"]["Parent1"]["parent"].setValue( '/' )
__children["Box"]["Parent1"]["children"][0].setInput( __children["Box"]["Cube1"]["out"] )
__children["Box"]["Parent1"]["__uiPosition"].setValue( imath.V2f( -9.24918461, -7.51406288 ) )
__children["Box"]["Parent2"]["in"].setInput( __children["Box"]["Parent1"]["out"] )
__children["Box"]["Parent2"]["filter"].setInput( __children["Box"]["PathFilter1"]["out"] )
__children["Box"]["Parent2"]["parent"].setValue( '/' )
__children["Box"]["Parent2"]["children"][0].setInput( __children["Box"]["Cube2"]["out"] )
__children["Box"]["Parent2"]["__uiPosition"].setValue( imath.V2f( -6.99918509, -24.2781925 ) )
__children["Box"]["out"].setInput( __children["Box"]["BoxOut"]["__out"] )
Gaffer.Metadata.registerValue( __children["Box"]["out"], 'nodule:color', imath.Color3f( 0.240099996, 0.339399993, 0.485000014 ) )
Gaffer.Metadata.registerValue( __children["Box"]["out"], 'description', 'The processed output scene.' )
Gaffer.Metadata.registerValue( __children["Box"]["out"], 'nodule:type', 'GafferUI::StandardNodule' )
__children["Box"]["BoxIn"]["__in"].setInput( __children["Box"]["in"] )
Gaffer.Metadata.registerValue( __children["Box"]["BoxIn"]["__in"], 'nodule:color', imath.Color3f( 0.240099996, 0.339399993, 0.485000014 ) )
Gaffer.Metadata.registerValue( __children["Box"]["BoxIn"]["__in"], 'layout:section', 'Settings' )
Gaffer.Metadata.registerValue( __children["Box"]["BoxIn"]["__in"], 'deletable', True )
Gaffer.Metadata.registerValue( __children["Box"]["BoxIn"]["__in"], 'renameable', True )
Gaffer.Metadata.registerValue( __children["Box"]["BoxIn"]["__in"], 'nodule:type', 'GafferUI::StandardNodule' )
Gaffer.Metadata.registerValue( __children["Box"]["BoxIn"]["__in"], 'description', 'The input scene' )
Gaffer.Metadata.registerValue( __children["Box"]["BoxIn"]["__in"], 'plugValueWidget:type', '' )
Gaffer.Metadata.registerValue( __children["Box"]["BoxIn"]["__in"], 'noduleLayout:spacing', 2.0 )
__children["Box"]["BoxIn"]["__uiPosition"].setValue( imath.V2f( -13.7491846, 17.8820324 ) )
__children["Box"]["BoxOut"]["in"].setInput( __children["Box"]["Parent2"]["out"] )
Gaffer.Metadata.registerValue( __children["Box"]["BoxOut"]["__out"], 'nodule:color', imath.Color3f( 0.240099996, 0.339399993, 0.485000014 ) )
Gaffer.Metadata.registerValue( __children["Box"]["BoxOut"]["__out"], 'layout:section', 'Settings' )
Gaffer.Metadata.registerValue( __children["Box"]["BoxOut"]["__out"], 'deletable', True )
Gaffer.Metadata.registerValue( __children["Box"]["BoxOut"]["__out"], 'renameable', True )
Gaffer.Metadata.registerValue( __children["Box"]["BoxOut"]["__out"], 'description', 'The processed output scene.' )
Gaffer.Metadata.registerValue( __children["Box"]["BoxOut"]["__out"], 'nodule:type', 'GafferUI::StandardNodule' )
__children["Box"]["BoxOut"]["__uiPosition"].setValue( imath.V2f( -5.49918509, -32.6102142 ) )
__children["Box"]["__uiPosition"].setValue( imath.V2f( -9.54833317, -9.91866684 ) )
__children["Box"]["Cube"]["__uiPosition"].setValue( imath.V2f( -2.96379256, 17.7140636 ) )
__children["Box"]["Cube1"]["__uiPosition"].setValue( imath.V2f( -1.52499986, 0.649999619 ) )
__children["Box"]["Cube2"]["__uiPosition"].setValue( imath.V2f( -0.225001097, -16.11413 ) )
__children["Box"]["PathFilter"]["paths"].setValue( IECore.StringVectorData( [ '/nothing' ] ) )
__children["Box"]["PathFilter"]["__uiPosition"].setValue( imath.V2f( 5.07500458, 12.9359074 ) )
__children["Box"]["PathFilter1"]["paths"].setValue( IECore.StringVectorData( [ '/nothing' ] ) )
__children["Box"]["PathFilter1"]["__uiPosition"].setValue( imath.V2f( 6.97499943, -21.3640938 ) )
__children["Box"]["PathFilter2"]["paths"].setValue( IECore.StringVectorData( [ '/root/alab_set01/lab_garage01_0001/decor_sheets_car01_0001' ] ) )
__children["Box"]["PathFilter2"]["__uiPosition"].setValue( imath.V2f( 6.6750021, -4.33113384 ) )
__children["DeleteAttributes"]["in"].setInput( __children["SceneReader"]["out"] )
__children["DeleteAttributes"]["filter"].setInput( __children["PathFilter"]["out"] )
__children["DeleteAttributes"]["names"].setValue( '*' )
__children["DeleteAttributes"]["__uiPosition"].setValue( imath.V2f( 0.42153728, 6.57742119 ) )
__children["PathFilter"]["paths"].setValue( IECore.StringVectorData( [ '/...' ] ) )
__children["PathFilter"]["__uiPosition"].setValue( imath.V2f( 14.2885447, 12.5402861 ) )
__children["MergeScenes"]["in"][0].setInput( __children["DeleteAttributes"]["out"] )
__children["MergeScenes"]["in"][1].setInput( __children["SceneReader"]["out"] )
__children["MergeScenes"]["transformMode"].setValue( 1 )
__children["MergeScenes"]["attributesMode"].setValue( 2 )
__children["MergeScenes"]["objectMode"].setValue( 1 )
__children["MergeScenes"]["globalsMode"].setValue( 2 )
__children["MergeScenes"]["__uiPosition"].setValue( imath.V2f( -9.54833317, -1.58664131 ) )


del __children

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant