Python Dynamic popuMenu - menuItem crash

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  02 February 2013
Python Dynamic popuMenu - menuItem crash

Hi all,

Has anyone experience a crash coming from a dynaic popuMenu(menuItem) with Python inMaya?

I have a UI and dynamically populating the window based on my selection and on each button that created I also assign a popupMenu to access menuItems if you hit the right click mouse button.

The UI works great but when I click the menuItem Maya crash. and it happened kind of randomly. Sometimes I can clik once or twice but crash after sometimes it crash right away.

I apologixe I am not allowed to post the code here. Just wondering if anyone experienced it and is there any tricks around it. Thanks
__________________
Nothing last forever
 
  02 February 2013
well without code this is groping in the dark.

The most prevelant cause of UI-related crashes are probably due to a control attempting to delete itself (or a parent of itself):


# this button crashes maya
cmds.button('MyButton', label='Click & Crash', command='deleteUI MyButton')


# this doesn't
cmds.button('MyButton', label='Click Safe', command='cmds.evalDeferred("deleteUI MyButton")')
 
  02 February 2013
Hi Nyro,

I am sorry i am unable to post the code. But based on your suggestion I troubleshoot my script and get it to run properly, basically in the command I tried to run the same script to refresh my UI. Seems like the popupMenu got an infinite loop so I stop that and it worked.


Thanks a lot

F
__________________
Nothing last forever
 
  02 February 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 04:41 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.