-
Notifications
You must be signed in to change notification settings - Fork 214
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
Sending SIGINT to Syncplay connected to mpv rasies an exception #322
Comments
Also happens for me when mpv or syncplay itself are closed normally. |
Are you on current master branch? |
I was using 9484e10, let me quickly rebuild. |
Also reproducible on a1a5d7b (current master). |
Since on my system it occurs only with SIGINT (with older pyside2 5.13 or 5.14), what you are getting might be something different still. Sadly this means it will likely require some more digging into actual cause. |
Including full traceback from #321:
Arch Linux, qt 4.15.0, pyside built from git (44cb6278), syncplay from current master |
@iwalton3 Do you think the best way to resolve this would be to add an exception_callback or error_callback to python-mpv-jsonipc (similar to quit_callback) to allow those exceptions to be handled by Syncplay, or is there a better/simpler or alternative? |
Right now quit_callback is supposed to be called when mpv dies for any reason. The ConnectionResetError might be due to mpv terminating uncleanly. I could just catch all exceptions and call quit_callback. The BrokenPipeError is the current exception that I pass up for any MPV call where the connection stops existing. |
This change should cover the issue: iwalton3/python-mpv-jsonipc@40e3437 |
@Et0h Should we upgrade our vendor copy of |
I'm not sure at which point it has changed, but the problem doesn't occur anymore. |
I still experience the issue from OP with current master and Python 3.9. I don't seem to be able to reproduce the traceback I reported in this ticket earlier, however. The most annoying part is that syncplay doesn't actually terminate afterwards, which then blocks my terminal until I suspend and/or kill syncplay. |
False alarm, I just forgot how to reproduce it. I still get the same traceback when I close the player (mpv). |
@FichteFoll I'm not sure on what version you have tested, but using Python 3.9, mpv 0.32 and git HEAD of Syncplay on my own system I still cannot reproduce this issue. Neither by sending the signal to Syncplay nor to the connected player. |
(that's a build from 520569c) |
Update to version 1.1.13 to hopefully address #322 fully.
Update to version 1.1.13 to hopefully address #322 fully.
Update to version 1.1.13 to hopefully address #322 fully.
@FichteFoll could you try out whether PR #400 fixes the problem for you? I think that vendor change was what was supposed to fix the issue in first place. |
@FichteFoll PR #400 has been fixed and merged into main branch. Could you test it now? If it doesn't I'll might try to replicate the problem on Arch, but that would require me to set up a new VM so I'd prefer to avoid that :) |
#400 doesn't seem to affect this issue at all. Closing mpv from a key binding or with ctrl-c from the terminal still results in the exception traces above. |
@FichteFoll That seems really weird given that I don't see that issue with the same versions of Python/Syncplay. Could you specify what distro you are using? Are you using pyside2/twisted from distro packages or from pip and in what versions? |
I use everything from the Arch repos, build syncplay (release or master) with |
I just recorded a video to show what I'm doing exactly, although it's really just 2021-03-20_14-31-14.mp4
|
I've whipped up an Arch container and installed the package from AUR - the problem actually appeared just like for you. The thing is - it doesn't appear if I just run Syncplay directly from src folder of AUR repository or directly from our upstream repository. It also doesn't occur if I install Syncplay with This pretty conclusively narrows the problem down to the PKGBUILD and that puts it out of our hands since we aren't maintaining the AUR package. You can try asking the maintainer of that package to see what can be done to fix this. Or just use our AppImage/tarball. Because of all the above I feel like this issue can be closed on our side. If you or somebody else manages to narrow it down to something within Syncplay itself feel free to reopen the issue. |
I can reproduce both problems from a cloned git repo with |
Yes, I've tried it on completely fresh Arch installation. Only difference was that I ran I also ran it with default Syncplay configuration save for host, room and player path. |
I also tried removing my mpv config to no avail. Where does syncplay store its configuration? The folder in |
Standard config of syncplay is |
I found my configuration file at
The following config file should be able to reproduce the long traceback issue. I have never touched this file by hand before this (evident by me not knowing where it even was, heh) and only removed my media directories and trusted domains. Details
|
I did some more digging into this. After a fair bit of trying out various environments, settings and conditions I finally came to conclusion that this must be some sort of race condition. I haven't found any consistent way of triggering it, though it seems most common if I run Syncplay with no file specified and send SIGINT to it before loading any files. My personal PC I'm testing this on is definitely on faster side (NVMe drive and overclocked Ryzen 5 CPU). All in all though, while I'm reopening the issue I think it might be somewhat hard to actually trace the reason for why this problem is occurring. And personally I see it as minor annoyance given that typical usage doesn't really involve SIGINT in first place. If somebody wants to dig into this I can offer some time with testing out the changes. |
* Create pythonpackage.yml * Update pythonpackage.yml * Update pythonpackage.yml * Update pythonpackage.yml * Update pythonpackage.yml * Update pythonpackage.yml * Update pythonpackage.yml * Update pythonpackage.yml * Update pythonpackage.yml * Update pythonpackage.yml * Update pythonpackage.yml * Update pythonpackage.yml * Update pythonpackage.yml * Update pythonpackage.yml * Update pythonpackage.yml * Do not show playback speed change notifications in OSD * Upbuild and remove debug message * Strip quotation marks from per-player arguments (#226) * Delete unmaintained changelog. Removing old and unmaintained changelog file. * Add more MPC-HC paths (#398) * Migrate from AppVeyor to GitHub Actions (#399) * Disable AppVeyor * Actions: disable other jobs * Actions: implement windows job * Use requirements * Typo in version parser * Replace type nul for PowerShell * Change Python version to 3.7 * buildPy2exe: exclude tcl and tkinter * buildPy2exe: rename zip archive to include extension * Actions for Windows: build on Python 3.8 * Re-enable build flow for other platforms * Remove AppVeyor configuration file * Add manpages courtesy of Bruno Kleinert #387 * Install the manpages. * Separate debian package artifacts Make it so that server and full packages are separate artifacts in CI rather than single zip containing both. * Fix server deb deployment name in CI workflow * Fix package filename for debs * Update mpv json ipc vendor code Update to version 1.1.13 to hopefully address #322 fully. * Update setup.py for vendor code of mpv jsonipc * Build AppImage on Ubuntu 18.04 Temporary workaround for AppImage built on Ubuntu 20.04 crashing with segmentation fault. #401 * Update python_mpv_jsonipc to 1.1.13 keeping our changes * Remove the AppVeyor badge as we stopped using it. * Improve playlist advancement for VLC and mpv (#334) (#397) * Advance playlist on end of file in mpv and VLC * Update duration for streams to fix playlist advancement (#334) * Add notice for Python in third party collection file (#404) * Add notice for Python in third party collection file * Convert third party notices file to plain text * Adapt codebase to third party notices format change * Mark as beta 1 (release 97) * Mark as 1.6.8 final (build 98) * Update pt_BR translation, fix typo (#422) * Bundle libgthread-2.0.so.0 into AppImage * add libxcb manually * Add missing libxcb-util to build environment * Enable GitHub Actions on pull requests * Bundle libxcb1 into AppImage to fix #380 * Send 32-bit/64-bit context when updating * Upver to 1.6.9 release 99 * Remove references to IRC (#430) * Add reference to GitHub discussions * Update issue templates * Revert "Merge branch 'master' into master" This reverts commit 173007e, reversing changes made to 6105da8. Co-authored-by: Daniel Wróbel <[email protected]> Co-authored-by: Alberto Sottile <[email protected]> Co-authored-by: Daniel Wróbel <[email protected]> Co-authored-by: Atílio Antônio <[email protected]> Co-authored-by: Teoh Han Hui <[email protected]> Co-authored-by: Alberto Sottile <[email protected]> Co-authored-by: Assistant <[email protected]>
It's a low priority, but Syncplay should try to close itself cleanly upon receiving SIGINT. It's more likely to occur with
--no-gui
, but it's also possible to encounter it in GUI mode by for example using CTRL+C in the terminal it was ran from.In this situation Syncplay also stays running for about minute until some timeout occurs.
The text was updated successfully, but these errors were encountered: