I have a Thinkpad T520, and for the past couple months or so Spotify would crash after resuming my computer from sleep. The window would freeze, and I would close the application. spotify.exe would still be running under processes in Task Manager, and would not respond to end process. I would try to relaunch Spotify but get the notorious "Spotify is already running but not responding." error. The only solution was to reboot.
I have devised a “hack” that kills Spotify right before the computer goes to sleep, thus preventing it from crashing when I wake my computer up again.
First create a batch file that kills spotify. Open Notepad and enter the following:
taskkill /f /im "spotify.exe"
Save the file as killspotify.bat in a folder of your choosing.
Open Task Scheduler, located under Administrative tools in the Control panel, or search for in the Start Menu.
On the panel on the right select Create Task...
Under the General tab, give your task a name, something like Kill Spotify on Sleep should be okay. Then Select Run whether user is logged on or not
Under the Triggers tab, select Begin the task: On an event
Set the following:
Event ID: 42
Under the Actions tab, set the action to Start a program
Browse the the bat file you created earlier and press okay. Enter your password if prompted.
You should now see the task you just created in the Task Scheduler Library. Close out of everything and you're done! Spotify should now automatically close just before your computer goes to sleep and you don't have to worry about it crashing when you wake the computer back up again!