Closed ben-xo closed 6 years ago
iTunes Plugin successfully connected to iTunes COM library. iTunes Plugin checking media state... iTunes Plugin checking media state complete. Windows Media Player Plugin checking media state... Windows Media Plugin checking media state complete. iTunes Plugin successfully connected to iTunes COM library. iTunes Plugin checking media state... Exception thrown: 'System.Runtime.InteropServices.COMException' in DesktopScrobbler.exe Windows Media Player Plugin checking media state... Windows Media Plugin checking media state complete. Exception thrown: 'System.Runtime.InteropServices.COMException' in DesktopScrobbler.exe Exception thrown: 'System.Runtime.InteropServices.COMException' in mscorlib.dll An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))
'DesktopScrobbler.exe' (CLR v4.0.30319: DesktopScrobbler.exe): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\PrivateAssemblies\Runtime\Microsoft.VisualStudio.Debugger.Runtime.dll'. The thread 0x2188 has exited with code 0 (0x0). The thread 0xf60 has exited with code 0 (0x0).
The thread 0x2544 has exited with code 0 (0x0).
The thread 0x22c4 has exited with code 0 (0x0).
Unhandled Exception: Windows Media Player Plugin checking media state...
System.Runtime.InteropServices.COMException: The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))
at iTunesLib.IiTunes.get_PlayerState()
at ITunesScrobblePlugin.iTunesScrobblePlugin.<
Can't repro that 'starts again' issue. I can still replicate the 'scripting interface' thing, although it seems a bit better than before. BUT, I can't track what state the player is in, without connecting to the COM library. The exception shown relates to WMP, and trying to site it inside a Windows Form. (I've not dug into it any more than that, because it's working and the exception seems to affect nothing)
It still does this. Every time I shut down iTunes, i (first) get the scripting interface notification, and then after quitting, it immediately reopens. It's as if just asking iTunes for track information is enough to reopen it.
Seems to happen if you play a song and then quit, but not if you don't play a song.
cc @lauranolte
Latest commit (with the GC) seems to have helped, but it's not the whole story. (Now I can sometimes close iTunes on the first go, sometimes it takes 2 or 3 goes… but it does stay closed eventually.)
Perhaps, if paused, we need to reduce the poll rate (7 seconds?)
I'm still seeing this pretty much every time, also when I haven't played anything.
I've updated the poll rate and reduced it to 5 seconds. It's still entirely possible to repeat the same behaviour if the poll timer is about to fire and you close the window. And on my slow laptop, this happens more often now! Hopefully faster machines won't suffer from the problem as much.
Expected:
I noticed in the Visual Studio debugger that it has thrown an exception: System.Runtime.InteropServices.COMException "the message filter indicated that the application is busy". Perhaps this is the exception to watch for to stop listening to iTunes…