-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix crash in Attribute Editor when renaming a prim with pulled descendants #3979
Fix crash in Attribute Editor when renaming a prim with pulled descendants #3979
Conversation
…e paths as argument.
… global selection.
This crash occurs when the Attribute Editor is visible and displaying a USD prim that is being renamed, while we are updating proxyAccessor connections for its descendant pulled objects.
@jufrantz Would it be possible to create a unit test out of the script you posted above? I guess it will have to an interactive test (run within Maya) in order to have the AE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just waiting for the answers before approval.
@seando-adsk, Alright, I can add a unit test that opens the AE and renames the selected prim to verify that the crash issue is resolved. I'll add this as soon as possible. |
@seando-adsk I attempted to add a test. I made a simple script that crashes when run manually in a maya session, but only if I wait between showing the AE and renaming the prim. When executed in one go, it doesn’t crash. I attempted to add it as an interactive unit-test, using It seems tricky to reproduce the crash in this context. Would it be acceptable if we skip adding this test? |
@jufrantz I've asked our QA team to create an automation test for this, so yes you can skip adding the test. I'll start the preflight. |
@jufrantz Unfortunately there were test failures on Maya 2022, python 2 builds:
I think its because the keyword-only args are not allowed after the capture of positional args. This is a python3 feature. Sean |
@seando-adsk, |
@jufrantz As you can see I merged this PR. Thanks for submitting the crash fix and working thru all the test failures. Sean |
Thank you very much @seando-adsk. I am glad that we can contribute to the project and happy to be involved. |
This PR addresses a crash that occurs when renaming a USD prim with descendant prims edited as Maya, while the Attribute Editor is visible and displaying the prim being renamed. I observed the issue on Maya 2023 and 2025 on Linux. It occurs since PR #3861.
The crash can be reproduced using this maya scene. To trigger the issue, open the AE, select and rename a prim such as
/Root1
. This should result in a hard crash withinTPSdatabase::doRebuild
, typically producing the following stack trace:While investigating the cause of the crash, I simplified the context and was able to reproduce it using the following script. It triggers the crash by disconnecting a
proxyAccessor
output duringUfe::ObjectRename
, which is a subset of the operations performed by OrphanedNodesManager on rename since PR #3861.I could not find the root cause of this crash within the maya-usd codebase. The issue may lie on the Maya or UFE side, related to the timing of AE updates and Ufe::ObjectRename events. The workaround proposed in this PR defers the proxyAccessor connection updates, having them occur at a more appropriate time for the AE, preventing the crash.
Included Changes:
mayaUsd.lib.proxyAccessor
parent
andunparent
functions to accept an optional list of UFE children and parent paths: jufrantz/maya-usd@7bf2b98.OrphanedNodesManager
does not alter Maya's selection when updatingproxyAccessor
connections: jufrantz/maya-usd@008b0da.OrphanedNodesManager
to executeProxyAccessorUndoItem::parentPulledObject
on idle to avoid the crash. This change is enclosed within a#ifdef
scope, making it easier to remove if a better fix becomes available: jufrantz/maya-usd@776e65d