As promised, here are the scripts to reproduce the symptom.
In addition, there seems to be a repeatable (but not consistent)
crash associated with the COM object in 4.1.
Steps to reproduce:
0) On the test system, have an installed version of (32-bit) Python and the pywin32 extension that matches it. I'm using python 2.7.
1) Run DbgView
2) Run debug version of MM 4.x
3) In a command-line window, run ShutdownOnly.py
4) Observe DbgView window: line after line of "Failed calling of COM event: Member not found" entries appear
5) Shutdown MM, script will terminate automatically
If you run ShutdownAndIdle.py instead, the log lines do not appear.
In addition, with MM 4.1 builds (1624, and seen in earlier builds), it will often
crash on shutdown. I have a log file with the entries surrounding that crash, available on request.
ShutdownOnly.py:
Code: Select all
# monitor player events from MediaMonkey. print event flag and player state info for each
# note: once started, script does not exit until MM is shut down.
import win32com.client
import pythoncom
import time
quit = False
class MMEventHandlers():
def __init__(self):
pass
def OnShutdown(self):
global quit
print '>>> SHUTDOWN >>>'
quit = True
def monitor():
# running the script will start MM if it's not already running
SDB = win32com.client.DispatchWithEvents('SongsDB.SDBApplication', MMEventHandlers)
print "** monitor started"
while not quit:
pythoncom.PumpWaitingMessages()
time.sleep(0.2)
print "** monitor stopped"
if __name__ == '__main__':
monitor()
ShutdownAndIdle.py:
Code: Select all
# monitor player events from MediaMonkey. print event flag and player state info for each
# note: once started, script does not exit until MM is shut down.
import win32com.client
import pythoncom
import time
quit = False
class MMEventHandlers():
def __init__(self):
pass
def OnShutdown(self):
global quit
print '>>> SHUTDOWN >>>'
quit = True
def OnIdle(self):
pass
def monitor():
# running the script will start MM if it's not already running
SDB = win32com.client.DispatchWithEvents('SongsDB.SDBApplication', MMEventHandlers)
print "** monitor started"
while not quit:
pythoncom.PumpWaitingMessages()
time.sleep(0.2)
print "** monitor stopped"
if __name__ == '__main__':
monitor()
As promised, here are the scripts to reproduce the symptom.
In addition, there seems to be a repeatable (but not consistent) [b]crash[/b] associated with the COM object in 4.1.
Steps to reproduce:
0) On the test system, have an installed version of (32-bit) Python and the pywin32 extension that matches it. I'm using python 2.7.
1) Run DbgView
2) Run debug version of MM 4.x
3) In a command-line window, run ShutdownOnly.py
4) Observe DbgView window: line after line of "Failed calling of COM event: Member not found" entries appear
5) Shutdown MM, script will terminate automatically
If you run ShutdownAndIdle.py instead, the log lines do not appear.
In addition, with MM 4.1 builds (1624, and seen in earlier builds), it will often [b]crash[/b] on shutdown. I have a log file with the entries surrounding that crash, available on request.
ShutdownOnly.py:
[code]
# monitor player events from MediaMonkey. print event flag and player state info for each
# note: once started, script does not exit until MM is shut down.
import win32com.client
import pythoncom
import time
quit = False
class MMEventHandlers():
def __init__(self):
pass
def OnShutdown(self):
global quit
print '>>> SHUTDOWN >>>'
quit = True
def monitor():
# running the script will start MM if it's not already running
SDB = win32com.client.DispatchWithEvents('SongsDB.SDBApplication', MMEventHandlers)
print "** monitor started"
while not quit:
pythoncom.PumpWaitingMessages()
time.sleep(0.2)
print "** monitor stopped"
if __name__ == '__main__':
monitor()
[/code]
ShutdownAndIdle.py:
[code]
# monitor player events from MediaMonkey. print event flag and player state info for each
# note: once started, script does not exit until MM is shut down.
import win32com.client
import pythoncom
import time
quit = False
class MMEventHandlers():
def __init__(self):
pass
def OnShutdown(self):
global quit
print '>>> SHUTDOWN >>>'
quit = True
def OnIdle(self):
pass
def monitor():
# running the script will start MM if it's not already running
SDB = win32com.client.DispatchWithEvents('SongsDB.SDBApplication', MMEventHandlers)
print "** monitor started"
while not quit:
pythoncom.PumpWaitingMessages()
time.sleep(0.2)
print "** monitor stopped"
if __name__ == '__main__':
monitor()
[/code]