LumaPictures / pymel

Python in Maya Done Right
Other
479 stars 130 forks source link

mayapy crashes when a plug-in initializes PyMEL #404

Closed david-lassonde-adsk closed 6 years ago

david-lassonde-adsk commented 6 years ago

This adds defensive code in the PyMEL core's pluginLoaded logic. Some customers use mayapy and defer the PyMEL initialization to when a plug-in requires it. We hit a scenario where pluginLoaded was invoked twice for the same plug-in, and mayapy crashed.

This change fixes our crash.

Note: this is tracked internally with this ticket: MAYA-88879 mayapy crashes when a plug-in initializes PyMEL

Note2: please squash and merge as there are irrelevant commits in this pull request (the ones used to bring my fork up to date with the latest PyMEL repo)

pmolodo commented 6 years ago

Thanks for finding / fixing this! Merged the relevant commit. In future, though, would help a lot if you could make clean pull requests... that way I can merge straight from github. In this case, it would have only required making a branch at https://github.com/LumaPictures/pymel/pull/404/commits/e5f6bfe6a775e02ec989670f3c50d47a888a957e, and then making the PR for that branch.

Regardless, thank you!

david-lassonde-adsk commented 6 years ago

Right, that would have worked. I am still ramping up on git, your tip is very much appreciated!

Thanks for merging it Paul, and have a great day!

pmolodo commented 6 years ago

Github just automatically adds any new commits on the branch you've targeted for your pull request to that pull request... Can be handy if you know about it / want to do that, but the upshot is that you basically always want to make a branch for any pull requests, and never do a PR that targets "master". Just a GitHub quirk... On Thu, Nov 30, 2017 at 6:47 AM david-lassonde-adsk < notifications@github.com> wrote:

Right, that would have worked. I am still ramping up on git, your tip is very much appreciated!

Thanks for merging it Paul, and have a great day!

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/LumaPictures/pymel/pull/404#issuecomment-348209202, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEYeKsAmU_Wb4SVOGIwePZmOT__3gf1ks5s7sAHgaJpZM4QtXEp .