-
Notifications
You must be signed in to change notification settings - Fork 126
Description
Description
Right-clicking on body/spine controls in the viewport hard-crashes Maya 2025 with a segfault. No Python traceback, no error message. Maya closes to desktop immediately.
Root Cause
get_all_tag_children() in pickWalk.py calls cmds.controller(tags, query=True, children=True) to traverse the controller tag hierarchy. This command has a C++ bug in Maya 2025 that causes a segfault on certain controller tag nodes. Since this is a C++ crash, try/except cannot catch it.
The crash happens during mgear_dagmenu_fill when building the right-click menu for controls that have controller tag children (e.g. body or spine controls that parent arm/hand/finger hierarchies).
Why It Affects Some Controls and Not Others
The crash is triggered by specific controller tag nodes that cmds.controller cannot handle. Controls higher in the hierarchy (body, spine) are more likely to crash because get_all_tag_children traverses all descendants. A spine control walks through neck, shoulders, arms, hands, fingers, and any additional child controls, making it more likely to encounter a problematic tag node. Controls lower in the hierarchy (arms, fingers) may work fine because their traversal covers a smaller subset that never reaches those tags.
In our case, the traversal from a spine control expanded across 6 iterations (5, 5, 15, 54, 61, 71 tags) before hitting the crash. Even splitting the batch call into individual per-tag queries still crashed, confirming the issue is with cmds.controller itself on specific tag nodes, not with the number of tags passed.
Steps to Reproduce
- Open a rig with controller tags (mGear-built rig with body/spine/arm hierarchy)
- Select a body or spine control
- Right-click in viewport
- Maya crashes (segfault, no error message)
Proposed Fix
Replace cmds.controller with direct cmds.listConnections traversal of the controller tag .children and .controllerObject attributes. This achieves the same result without using the buggy cmds.controller command. Also adds cycle protection via a seen_tags set.
Environment
- Maya 2025 (build 202409190603)
- mGear 5.2.1
- Windows 11
Metadata
Metadata
Assignees
Labels
Type
Projects
Status