jellyfin / jellyfin-mpv-shim

MPV Cast Client for Jellyfin
Other
1.59k stars 93 forks source link

"ctrl + c" crashes the shim #286

Open Jerrk opened 2 years ago

Jerrk commented 2 years ago

Describe the bug I found by accident that if i hit "ctrl + c" with the player focused the player will crash and the shim will stop responding, and i am unable to relaunch it until i reboot the computer, i'm not quite sure where the issue is.

To Reproduce Steps to reproduce the behavior:

  1. play any file
  2. focus the player and hit "ctrl + c"
  3. client should crash
  4. jellyfin becomes unresponsive

2022-08-08 00:12:21,541 [ DEBUG] event_handler: Handled Event Playstate: {'Command': 'Stop', 'ControllingUserId': 'deb709e05c02447f990c0577dde3be4b', 'ServerId': '1d83ecdd0bcc43c0bbb6e5c61463fe25'} 2022-08-08 00:12:21,541 [ ERROR] websocket: error from callback <function WSClient.run.. at 0x0000028B3D5B2430>: handle is closed 2022-08-08 00:12:21,541 [ ERROR] JELLYFIN.jellyfin_apiclient_python.ws_client: handle is closed 2022-08-08 00:12:21,541 [ DEBUG] event_handler: Unhandled Event WebSocketError: handle is closed

  1. have to manually close the shim
  2. this error pops up 8. trying to start the shim again

2022-08-08 00:16:28,175 [ DEBUG] mpv-jsonipc: Staring MPV from C:\Program Files (x86)\SVP 4\mpv64\mpv.exe. 2022-08-08 00:16:28,175 [ DEBUG] mpv-jsonipc: Using IPC socket \.\pipe\mpvpipe for MPV. 2022-08-08 00:16:38,227 [ WARNING] mpv-jsonipc: MPV start failed. Traceback (most recent call last): File "python_mpv_jsonipc.py", line 418, in init File "python_mpv_jsonipc.py", line 238, in init python_mpv_jsonipc.MPVError: MPV start timed out.

and this message pops up https://i.imgur.com/QjQ0rFG.png

Expected behavior Accidentally hitting "ctrl + c" shouldn't have to make you reboot your computer crash the shim.

Desktop (please complete the following information):

Error Messages No error message is sent to the log when i hit "ctrl + c" the player just blips out of existence and the shim stops responding.

my conf.json in .txt form

Jerrk commented 1 year ago

seems to be related to https://github.com/iwalton3/plex-mpv-shim/issues/9 that was fixed in https://github.com/iwalton3/plex-mpv-shim/releases/tag/v1.7.13 Fix a bug where external MPV was not starting on Windows. where the shim crashes without closing the ipc server(?) correctly makes it impossible to start another instance without rebooting the computer.

the python_mpv_jsonipc.MPVError: MPV process retry limit reached error always appears after the shim crashes, which seems to happen more often nowadays...

it seems I have to turn off external mpv for now until this is fixed.

Jerrk commented 1 year ago

still an issue in 2.3.1.

only thing that changed that i can tell is that i can relaunch the shim without having to reboot my computer

i'm assuming it's this change Update python-mpv-jsonipc to v1.1.14 to handle socket close failure on Windows

Jerrk commented 1 year ago

Still an issue in 2.6.0

Pressing Ctrl + c crashes the mpv window, within jellyfin the progressbar will keep going as if the player is still running.

Trying to start another movie/episode shows no reaction of the shim.

i then right-click the icon in the notification area and hit quit.

this message appears

image

i can then start the shim again and keep playing with no issues.