Comments (14)
@dlrudie Is there a way to force load the COM library on start of Snip? The only problem I could see with this is another application using the library while it gets reloaded.
from snip.
That's possible but as soon as you load the COM library it will automatically start iTunes. I'm not sure people would like that; I know I wouldn't.
from snip.
Could it force load it when they select iTunes in the list like it did before?
from snip.
I've only seen this issue once or twice in all of my tests and I've seen nothing specific that triggers it. Users have reported it occasionally too but it always seems random. I'm not quite sure how to track down the issue.
from snip.
I too have had this issue, but every single time that iTunes is open at all.
Have a look at: http://support.microsoft.com/kb/198996
In summary(ish), problems with systray message pump activity while COM operations occur. Have forked and will hopefully get time to write something to test that idea out.
EDIT: Further reading indicates this is for an old version of windows. Presents almost the same though, always crashes for me when selecting iTunes from the systray menu.
In the mean time, some exception handling would be lovely :)
from snip.
Similar thing reported other places: https://obsproject.com/forum/threads/now-playing-music-for-spotify-itunes-winamp-on-stream.925/page-8
I have had a quick go at looking into the threading issue. No matter which thread attempts to load the COM object, if iTunes is already running, the COM object will throw an error and not instantiate.
Looks like the iTunes SDK is just a steaming pile...
from snip.
Added a COMException catch in commit 9facf7d that will just spit the message out, hopefully providing a more detailed reason as to why it's failing.
from snip.
I can typically replicate this error if Snip loaded the COM library, I exit Snip, compile a new version, and then run the newly compiled version.
It seems like the only thing I can really do is pop up a message saying that the user will need to exit iTunes and let Snip launch it instead.
from snip.
Thats exactly what I was thinking. Could have a button that says "Click
here to close iTunes and relaunch with Snip support", send iTunes a close
to the win handle, wait for the process to disappear and then instantiate
the COM object. That's going to need a disclaimer!
I have had a look around for alternative methods of pulling information
from iTunes, to no avail. I did wonder if the iTunes remote protocol had
been reverse engineered, as that would give you all the access you needed,
over a socket.
from snip.
I don't really want Snip to have the ability to exit applications. I think a message will suffice. If iTunes is running and this message appears, you can just exit iTunes and reselect it from within Snip and it will start iTunes for you. I find that convenient enough.
from snip.
Changes made in ae68641. Unfortunately it takes 120 seconds for it to timeout and there is no way to adjust that timeout. So after 2 minutes of unresponsiveness the MessageBox will appear.
from snip.
Think I've found the true cause of this. I notice that Snip requires execution as an elevated process. If i have iTunes running as an elevated process also, I never have the COM problem if iTunes is already running when Snip starts.
I'm assuming it has to run as an elevated process to call the Unsafe methods used to get information from winamp/foobar/spotify?
If i modify the Snip manifest to not require elevated access, it works first time every time. I wonder if there is an elegant way around that.
I've just tried winamp with both processes running as normal non-elevated, and the unsafe methods used to retrieve the window text from winamp work fine. If the same is true of spotify and foobar, perhaps this could be a considered change?
from snip.
I believe I had it require elevated privileges before because I was actually hooking the Spotify process and reading its memory. Since I've went away from that I actually can probably drop it back down.
from snip.
I went ahead and made a commit 9002793 for this and I'll see how this release goes with everyone testing it later.
from snip.
Related Issues (20)
- Duplicates after resuming
- Add Sptify and iTunes logo HOT 1
- Snip not acting as usual
- Windows 11 (2) HOT 3
- 6944341 not resolving the problem of "No title playing" in Snip.txt
- Exposed Spotify client secret HOT 2
- Snip is updating files in middle of songs so if its in some source it makes them dissapear for few seconds HOT 17
- Album Cover and song title glitch HOT 1
- Snip doesn't retrieve album artwork from Apple Music HOT 1
- Snip v8 is very inconsistent when detecting song changes compared to v7 HOT 2
- Hotkeys not working. HOT 1
- Websocket connection
- macOS Version?
- Add Space HOT 1
- Album art wiping on no playing
- No info updates if only Album changes HOT 1
- Nothing Happens HOT 1
- How do I even delete the entire zip file after it's been unzipped on my Windows 10? HOT 1
- No Track Playing HOT 3
- Apple Music Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snip.