Creating and deleting nodes inside an Obj SubNet node through HDK programmatically

   1881   2   0
User Avatar
Member
173 posts
Joined: 4月 2014
Offline
Hello,

I have an OBJ_SubNet derived node, which creates Obj nodes inside (using createNode) during cooking. Depending on a parameter change, it rebuilds the internal generated network. I do this by destroying the generated nodes inside (by getting all children of subnet and calling destroyNode for each). It seems to work, however, there are random crashes deep within Houdini (JEDI etc). It looks like a race with UI? How can I solve this?

Thanks.
User Avatar
Member
2581 posts
Joined: 6月 2008
Offline
When you create your new nodes make the new node names unique, compared to the previous set. I found, even with copy/pasting nodes of the same name on top of a deleted node with the same name Houdini can get lost. Base your new names on system time, a random character, or something simple like that.

My guess is that somewhere deep inside Houdini there is a line of code that is still fetching nodes by name. When you delete that named node and create a new one to take it's place, Houdini thinks the new new node is the old node and references the old node(stale data) and crashes.
Edited by Enivob - 2016年10月14日 09:37:11
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
173 posts
Joined: 4月 2014
Offline
Heya! Thanks! I tried that, but it still seems to happen, has to be something else. Also, only seems to happen with relatively large number of nodes (100+), if it's a couple of nodes, there's no issue.
Edited by ttvdsfx - 2016年10月14日 14:35:19
  • Quick Links