jellyfin / jellyfin-media-player

Jellyfin Desktop Client
GNU General Public License v2.0
3.18k stars 316 forks source link

[bug] Segmentation fault if something is played after the PC is restored from sleep #487

Open simone-viozzi opened 1 year ago

simone-viozzi commented 1 year ago

Describe the bug If the computer is restored from sleep, jellyfinmediaplayer will segfault every time something is played.

I have been having this issue for a long time but never took the time to report it, i always just rebooted the computer.

To Reproduce Steps to reproduce the behavior:

  1. Suspend the computer
  2. restore it
  3. try to play something on jellyfinmediaplayer
  4. a few seconds after you press play, the player crashes with this output:
$ jellyfinmediaplayer
libpng warning: iCCP: known incorrect sRGB profile
Listening to socket: "/tmp/jmp_pmpUniqueApplication_simone.sock"
Signal handlers installed successfully.
Logging to  /home/simone/.local/share/jellyfinmediaplayer/logs/jellyfinmediaplayer.log
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe
[2]    189993 segmentation fault (core dumped)  jellyfinmediaplayer

Expected behavior the player start playing the video

Desktop (please complete the following information):

Additional context

gdb stack trace:

```gdb Thread 22 "mpv/mpv core" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffb1ffb6c0 (LWP 181483)] XDisplayString (dpy=0x0) at /usr/src/debug/libx11/libX11-1.8.6/src/Macros.c:119 119 char *XDisplayString(Display *dpy) { return (DisplayString(dpy)); } (gdb) bt #0 XDisplayString (dpy=0x0) at /usr/src/debug/libx11/libX11-1.8.6/src/Macros.c:119 #1 0x00007fffba762a1d in __vaDriverInit_1_13 () at /usr/lib/dri/nvidia_drv_video.so #2 0x00007ffff30b89f9 in () at /usr/lib/libva.so.2 #3 0x00007ffff30bbc20 in vaInitialize () at /usr/lib/libva.so.2 #4 0x00007ffff7d67993 in va_initialize (display=0x7fffac0fd730, plog=plog@entry=0x7fffac1101f0, probing=true) at ../mpv/video/vaapi.c:116 #5 0x00007ffff7d67b16 in va_create_standalone (global=, log=0x7fffac1101f0, params=0x7fffb1ffa0b0) at ../mpv/video/vaapi.c:265 #6 0x00007ffff7cefe7c in hwdec_create_dev (autoprobe=, hwdec=0x7fffac09a080, vd=) at ../mpv/video/decode/vd_lavc.c:441 #7 select_and_set_hwdec (vd=vd@entry=0x7fff34226e50) at ../mpv/video/decode/vd_lavc.c:545 #8 0x00007ffff7cf060f in reinit (vd=0x7fff34226e50) at ../mpv/video/decode/vd_lavc.c:658 #9 0x00007ffff7cf0884 in create (parent=, codec=0x7ffefc053120, decoder=0x7fffac077940 "hevc") at ../mpv/video/decode/vd_lavc.c:1426 #10 0x00007ffff7d7ffe0 in reinit_decoder (p=) at ../mpv/filters/f_decoder_wrapper.c:450 #11 mp_decoder_wrapper_reinit.isra.0 (d=) at ../mpv/filters/f_decoder_wrapper.c:478 #12 0x00007ffff7cd9d9f in init_video_decoder (mpctx=mpctx@entry=0x5555559743f0, track=track@entry=0x7fffac1050c0) at ../mpv/player/video.c:188 #13 0x00007ffff7cda1f8 in reinit_video_chain_src (mpctx=0x5555559743f0, track=0x7fffac1050c0) at ../mpv/player/video.c:257 #14 0x00007ffff7cd4cbf in reinit_video_chain (mpctx=0x5555559743f0) at ../mpv/player/video.c:208 #15 play_current_file (mpctx=0x5555559743f0) at ../mpv/player/loadfile.c:1736 #16 0x00007ffff7caedb4 in mp_play_files (mpctx=0x5555559743f0) at ../mpv/player/loadfile.c:1998 #17 core_thread (p=0x5555559743f0) at ../mpv/player/client.c:611 #18 0x00007ffff4e8c9eb in start_thread (arg=) at pthread_create.c:444 #19 0x00007ffff4f10dfc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78 ```

jellyfinmediaplayer.log

simone-viozzi commented 1 year ago

If I take the stream URL from the logs:

cplayer: Opening done: https://jellyfin.xxxxxxxx.xx/Videos/xxxx433fe9633c742f3faf6c4f58xxxx/stream.mkv?Static=true&mediaSourceId=xxx433fe9633c74xxxxaf6cxxxxa7xx&deviceId=xxxxbHlmaW5NZWRpYVxxxxllciAxLjguMSAobxxxxXgteDg2XzY0IHxxxx5vd24pfDE2NzcyNDgxOTExxxxx&api_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&Tag=xxxx8bd1bf0c80cfxxxx8e1d57d5xxxx

Replacing the x'ed API key with a valid one, and dropping the URL into mpv, it plays fine.

funkadhafi commented 11 months ago

Hi, I have the exact same problem on Manjaro. But jellyfin behave normally on Firefox...