Segmentation Error once I try to get HDA definition

   860   3   0
User Avatar
Member
14 posts
Joined: 4月 2020
Offline
Hello everyone,

I have been working on a digital asset for several months now. However, since yesterday, whenever I try to load my asset, Houdini crashes with a "segmentation error". This is very strange because I didn't have any issues for several months of work and the error happened suddenly.

After some investigation, I found out that getting the HDA definition was causing the error. I'm facing an issue with the following piece of code:

definition = node.type().definition()
temp_grp = hou.HDADefinition.parmTemplateGroup(definition)

If anyone has any idea about what could be causing this issue and can help me in resolving it, it would be greatly appreciated! This project is very important to me, and being unable to continue working on it is very frustrating.
User Avatar
Member
218 posts
Joined: 5月 2017
Offline
Hey,
parmTemplateGroup [www.sidefx.com] is a method of class hou.HDADefinition and it takes no arguments and returns a parameter template group of a node type on success.

Try it like this:
>>> node = hou.node('/obj/geo1/gvx.test1')
>>> node_type = node.type()
>>> definition = node_type.definition()
>>> temp_grp = definition.parmTemplateGroup()
>>> temp_grp 
<hou.ParmTemplateGroup>

If you intend to create a new parameter template group, you can call the corresponding class [www.sidefx.com] and initialize an object with parameter templates or fill it afterwards:
>>> parm = hou.FloatParmTemplate("name", "Label", 1)
>>> new_ptg = hou.ParmTemplateGroup((parm, ))
# or 
>>> new_ptg = hou.ParmTemplateGroup()
>>> new_ptg.append(parm)
Edited by viklc - 2023年11月23日 10:08:47
User Avatar
Member
14 posts
Joined: 4月 2020
Offline
viklc
Hey,
parmTemplateGroup [www.sidefx.com] is a method of class hou.HDADefinition and it takes no arguments and returns a parameter template group of a node type on success.

Try it like this:
>>> node = hou.node('/obj/geo1/gvx.test1')
>>> node_type = node.type()
>>> definition = node_type.definition()
>>> temp_grp = definition.parmTemplateGroup()
>>> temp_grp 
<hou.ParmTemplateGroup>

If you intend to create a new parameter template group, you can call the corresponding class [www.sidefx.com] and initialize an object with parameter templates or fill it afterwards:
>>> parm = hou.FloatParmTemplate("name", "Label", 1)
>>> new_ptg = hou.ParmTemplateGroup((parm, ))
# or 
>>> new_ptg = hou.ParmTemplateGroup()
>>> new_ptg.append(parm)

Hey, Thanks for your reply! I tried your way as well but Houdini still crashes.
User Avatar
Member
301 posts
Joined: 1月 2013
Offline
It's actually hard to give a good and guaranteed answer here without knowing what's going on in your HDA. Will the segmentation error occur if you create an empty assembly from scratch and try to use this code?
  • Quick Links