Calling createNode() randomly stall Houdini's main thread

   787   0   1
User Avatar
Member
4 posts
Joined: Dec. 2022
Offline
Hi, we've been running on that bug for a while and it's now a production blocker.
Calling createNode() from a worker thread, while cooking, will randomly stall Houdini's main thread.

The setup:
- some HDA will request a cook on a node.
- out cook_manager will accomodate, from it's own thread with :
        #set all display-flag except target node's
CleanDisplayFlagExcept(node)

#get display interface
node.displayNode().cook(force=True)

#make a end-of-cook callback
cook_done = asyncio.Event()
def cook_done_lambda(): cook_done.set()

#trigger cook
hou.ui.addTriggerUpdateCallback(cook_done_lambda)
hou.ui.triggerUpdate()

#wait on for cook to end
await cook_done.wait()

#create a bunch of nodes for some reason
for i in range(0, 1024):
result = await self._asyncio_loop.run_in_executor(None, CreateNode, ("xyz", str(i)))
- But, randomly, the cook_done.wait() will fail.
Meaning I can see the cook is still running but the TriggerUpdateCallback was called ?!
It is always at that moment that I see Houdini's mainthread and my worker thread stall, on a call to node.createNode()

Any hint or advise will be greatly appreciated. This is a blocker

See call stack in attachment.

Thank you

Francois
Edited by fveilleux - March 1, 2023 10:30:38

Attachments:
Houdini-stall-on-createnode.jpg (322.0 KB)

  • Quick Links