SG-17742 Attempt to fix the crash issue with Houdini#149
Closed
carlos-villavicencio-adsk wants to merge 1 commit into
Closed
SG-17742 Attempt to fix the crash issue with Houdini#149carlos-villavicencio-adsk wants to merge 1 commit into
carlos-villavicencio-adsk wants to merge 1 commit into
Conversation
Contributor
|
@carlos-villavicencio-adsk do we know why this only happens on Houdini? |
Contributor
Author
|
@staceyoue not really, unfortunately. And this doesn't fix 100% of the cases. But most of them in my tests. |
There was a problem hiding this comment.
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": |
There was a problem hiding this comment.
[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.
| node.takeRow(index - 1) | ||
| if sgtk.platform.current_engine().instance_name == "tk-houdini": | ||
| node.removeRow(index - 1) | ||
| else: |
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
removeRowinstead oftakeRowwhen clearing child nodes.This PR relates to shotgunsoftware/tk-multi-shotgunpanel#83