-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] app crashes sometimes when another app also uses the same ipc-pipe #127
Comments
It happened again while closing mpv.
|
Hmm the missing |
This is how it behaves on my pc. With the latest (1.6.8) release of syncplay. (video has audio) 2021-06-27.17-59-36.mp4Also, what I didn't show, with any setting other the one I normally use, trakt-scrobbler doesn't recognize mpv running. |
What version of mpv are you using? How was it downloaded/installed (from the official site Windows builds page)? |
installed with chocolatey (kinda like apt for windows) They list chocolatey on their installation page. So it is supported I assume. |
Huh, I've also installed the same mpv version via chocolatey, and as far as I recall, it was using the pipe path as mentioned in the official docs. I'll do some testing the next time I boot Windows. Till then, if you are fine with running some untested code (it should be ok), I've implemented your suggested solution of catching and ignoring the error. Reinstall the |
Even on the debug branch I got this error:
The scrobble went through but I had to restart trakts for it to continue working. |
Could you open up File "c:\users\alima.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 298, and check whether it is surrounded with a |
Also, I guess you're closing the player at the end of the file. Have you set the |
it wasn't there. I had to uninstall and then reinstall. Now it's there. Just install --force wasn't enough...
And no, I hadn't set that. I did now. What does it do exactly? |
That's interesting. I should probably stop recommending this method in that case.
Basically, we have a loop trying to monitor the player, which (in dormant state, when player isn't running) checks if player is alive, and if so, do the active monitoring. After the player exits, the monitor again goes into dormant state, and checks if player is alive. But if this happens too quickly, it might happen that it finds the player is alive while it is exiting, and the monitor incorrectly goes into active state, which is where we hit the error (I think). So the |
I see. Thanks for the explanation. |
So, I just opened up Windows, and checked my mpv install. Same version as yours, also installed from chocalatey. My
And the pipe is present at the correct location. Try removing the setting from the syncplay GUI (keep it blank), since this will make MPV fall back to reading the config file. And see if that is working. |
You're right, this is exactly the case. I went through the source code, and it mentions
and later does ipc_socket = "\\\\.\\pipe\\" + ipc_socket So, when you do Instead, you should give syncplay |
Ah that explains it. Weird though. Why would they do that instead of just passing it through? |
Cool, btw did the original issue get cleared up after using |
Describe the bug
Sometimes when I start mpv through syncplay, trakt-scrobbler crashes, since the pipe is blocked for a moment. After restarting trakt-scrobbler everything behaves fine.
Desktop (please complete the following information):
To Reproduce
Log file
Click to see log contents
I think it should be sufficient to catch this exception and just recheck after a bit, since it works after restarting the
programtrakt-scrobbler (edit).Even with this testing the issue from #124 didn't reappear so far.
The text was updated successfully, but these errors were encountered: