Probably a basic threading question -

I'm using the default pumpThread module in the following manner...
if sys.executable.endswith("maya.bin"):
    import pumpThread

class Browser(QMainWindow):
    def __init__(self):
        QMainWindow.__init__(self)
        .... omitted code .....


# Launch of PyQt widget inside Maya
pumpThread.initializePumpThread()
QtWin = Browser()
QtWin.show()


On the next import of pumpThread, I get the following -


# # Exception in thread Thread-1:
# Traceback (most recent call last):
#   File "/vol/apps/maya2008ext2p01_64/lib/python25.zip/threading.py", line
460, in __bootstrap
#     self.run()
#   File "/vol/apps/maya2008ext2p01_64/lib/python25.zip/threading.py", line
440, in run
#     self.__target(*self.__args, **self.__kwargs)
#   File "/prod/gen/python/maya/2008/pumpThread.py", line 24, in pumpQt
#     utils.executeDeferred( processor )
# AttributeError: 'NoneType' object has no attribute 'executeDeferred'

// Error: 'NoneType' object has no attribute 'processEvents'
# Traceback (most recent call last):
#   File "/prod/gen/python/maya/2008/pumpThread.py", line 19, in processor
#     app.processEvents()


Then finally - when I execute my class again in Maya, Maya crashes without a
visible error (it simply dissapears).
Has anyone seen this sort of behavior with threads in Maya before?

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to