Skip to content

SG-17742 Attempt to fix the crash issue with Houdini#149

Closed
carlos-villavicencio-adsk wants to merge 1 commit into
masterfrom
ticket/SG-17742_houdini_crashes_on_close
Closed

SG-17742 Attempt to fix the crash issue with Houdini#149
carlos-villavicencio-adsk wants to merge 1 commit into
masterfrom
ticket/SG-17742_houdini_crashes_on_close

Conversation

@carlos-villavicencio-adsk

@carlos-villavicencio-adsk carlos-villavicencio-adsk commented Jan 24, 2024

Copy link
Copy Markdown
Contributor

When opening the tk-multi-shotgunpanel in Houdini, the Houdini app crashes on exit. This has been reported by the community.

This PR attempts to fix this by properly destroying Qt objects on close.

  • Check if the current engine is Houdini so it can invoke removeRow instead of takeRow when clearing child nodes.

This PR relates to shotgunsoftware/tk-multi-shotgunpanel#83

@staceyoue

Copy link
Copy Markdown
Contributor

@carlos-villavicencio-adsk do we know why this only happens on Houdini?

@carlos-villavicencio-adsk

Copy link
Copy Markdown
Contributor Author

@staceyoue not really, unfortunately.

And this doesn't fix 100% of the cases. But most of them in my tests.

@carlos-villavicencio-adsk carlos-villavicencio-adsk marked this pull request as draft February 8, 2024 15:17
@julien-lang julien-lang requested a review from Copilot May 15, 2025 23:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses a Houdini crash during shutdown by ensuring Qt objects are properly destroyed.

  • Introduces engine-specific logic in the deletion of child nodes: using removeRow for tk-houdini and (presumably) takeRow for all other engines.

# but we own the objects and do not keep a reference to it, so garbage
# collection will take care of freeing up the memory for us.
node.takeRow(index - 1)
if sgtk.platform.current_engine().instance_name == "tk-houdini":

Copilot AI May 15, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider caching the result of sgtk.platform.current_engine() before the loop if the engine is not expected to change, to avoid redundant calls on every iteration.

Copilot uses AI. Check for mistakes.
node.takeRow(index - 1)
if sgtk.platform.current_engine().instance_name == "tk-houdini":
node.removeRow(index - 1)
else:

Copilot AI May 15, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that for non-Houdini engines the intended node.takeRow(index - 1) call is executed as the diff only shows a comment in this branch.

Copilot uses AI. Check for mistakes.
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

Successfully merging this pull request may close these issues.

3 participants