jellyfin / jellyfin-media-player

Jellyfin Desktop Client
GNU General Public License v2.0
3.29k stars 324 forks source link

Dead lock caused by InputCECWorker #519

Open jeroeness opened 1 year ago

jeroeness commented 1 year ago

Describe the bug My jellyfinmediaplayer binary built from source does not launch and insteads halts in a dead lock. It seems that the InputCECWorker causes a deadlock. When I build jellyfin without the -DHAVE_CEC in CMakeModules/InputConfiguration.cmake jellyfinmedia player succeeds to launch

To Reproduce I built from source on my Orange Pi 5 in Ubuntu and launch jellyfinmediaplayer, more details of my build steps are below:

I performed the build steps according to the readme of this repo, but tailored it somewhat for my setup. Not much is changed, other than some extra package installs and not linking the libmpv.so’s

building succeeds and yields a jellyfinmediaplayer binary

When I launch jellyfinmediaplayer --terminal it halts with no screen appearing, but a log line saying:

QMetaMethod::invoke: Dead lock detected in BlockingQueuedConnection: Receiver is InputCECWorker(0xaaab0efd7a40)

My hotfix for this is removing some lines relating to CEC in CMakeModules/InputConfiguration.cmake:

--- a/CMakeModules/InputConfiguration.cmake
+++ b/CMakeModules/InputConfiguration.cmake
@@ -40,17 +40,7 @@ if(ENABLE_SDL2)

 endif(ENABLE_SDL2)

-OPTION(ENABLE_CEC "Enable HDMI/CEC support with libCEC" ON)
-if(ENABLE_CEC)
-  find_package(CEC)
-  if(CEC_FOUND)
-    list(APPEND ENABLED_INPUTS CEC)
-    add_definitions(-DHAVE_CEC)
-    include_directories(${CEC_INCLUDE_DIR})
-    set(EXTRA_LIBS ${EXTRA_LIBS} ${CEC_LIBRARY})
-  endif(CEC_FOUND)

-endif(ENABLE_CEC)

Expected behavior I expect jellyfinmediaplayer to launch successfully with- or without CEC.

Desktop:

Logs Log attached below jellyfinmediaplayer.log

Additional details Not sure if relevant, my video driver is in the mali-g610-firmware package

jackduckworth commented 5 months ago

I've been struggling to build and run jellyfin-media-player on my orange pi 5.

I followed the build instructions blindly, including building libmpv.so, and, perhaps unsurprisingly, cant get it run.

@jeroeness : I know this was a while ago, but can you remember how you tailored the build setup:

Your setup is pretty similar to my setup, except that I am on Ubuntu 24.04. I have installed jellyfin server without issue, and turned on hardware acceleration.

I can use Kodi, but I'd be interested in getting jellyfin client to work, with or without CEC.

jackduckworth commented 5 months ago

Sorry, please ignore my comment above

I was having the exact same issue as you - now that I have turned off ENABLE_CEC the executable that I have built is running nicely.

You do, of course, need to build libmpv.so, These 2 lines in the official instructions are incorrect:

sudo ln -s /usr/local/lib/x86_64-linux-gnu/libmpv.so /usr/local/lib/x86_64-linux-gnu/libmpv.so.1
sudo ln -sf /usr/local/lib/x86_64-linux-gnu/libmpv.so /usr/local/lib/libmpv.so.2

They are also unnecessary as the sudo ./install command sets up the symbolic links correctly:

$ ls -l /usr/local/lib/aarch64-linux-gnu/
total 29488
lrwxrwxrwx 1 root root       11 Jun  5 17:15 libmpv.so -> libmpv.so.2
lrwxrwxrwx 1 root root       15 Jun  5 17:15 libmpv.so.2 -> libmpv.so.2.3.0
-rwxr-xr-x 1 root root 30187872 Jun  5 17:14 libmpv.so.2.3.0
drwxr-xr-x 2 root root     4096 Jun  5 17:15 pkgconfig