v14 Kodi 14.2 hangs with black screen after KEY_PVR
#1
Over here a freshly booted Kodi 14.2-BETA2 Git:085163e (OpenELEC 5.0.5) often hangs unresponsively with a black screen after pressing the PVR key. This does not always happen but it hangs pretty frequently. Skins tested include Aeon Nox 5 and Confluence. Hangs occur with both. Kodi then does not react on IR key presses but the system is still accessible via ssh. Hardware used: Raspberry Pi 2.

A comparison of the log files posted below shows that whenever Kodi hangs, its last activity is Window Deinit (Home.xml). It seems this should be followed by Window Init (MyPVRRecordings.xml) but for whatever reason this does not happen.

Excerpt from log file when Kodi hangs (passwords shown are fake):
Code:
17:38:48 T:1970036736   DEBUG: LIRC: Update - NEW at 15396:16e 0 KEY_PVR devinput (KEY_PVR)
17:38:48 T:1970036736   DEBUG: OnKey: enter (0x65) pressed, action is ActivateWindow(TVRecordings)
17:38:48 T:1970036736   DEBUG: Activating window ID: 10616
17:38:48 T:1970036736   DEBUG: ------ Window Deinit (Home.xml) ------
17:38:50 T:1841783872   DEBUG: script.grab.fanart: found 0 music files
17:39:16 T:1741681728   DEBUG: Thread JobWorker 1741681728 terminating (autodelete)
17:39:16 T:1766847552   DEBUG: Thread JobWorker 1766847552 terminating (autodelete)
17:39:16 T:1825006656   DEBUG: Thread JobWorker 1825006656 terminating (autodelete)

Excerpt from log file when Kodi is OK (passwords shown are fake):
Code:
17:38:17 T:1841296448   DEBUG: script.grab.fanart: found 0 music files
17:38:19 T:1969537024   DEBUG: LIRC: Update - NEW at 17301:16e 0 KEY_PVR devinput (KEY_PVR)
17:38:19 T:1969537024   DEBUG: OnKey: enter (0x65) pressed, action is ActivateWindow(TVRecordings)
17:38:19 T:1969537024   DEBUG: Activating window ID: 10616
17:38:19 T:1969537024   DEBUG: ------ Window Deinit (Home.xml) ------
17:38:19 T:1969537024   DEBUG: ------ Window Init (MyPVRRecordings.xml) ------
17:38:19 T:1969537024    INFO: Loading skin file: MyPVRRecordings.xml, load type: KEEP_IN_MEMORY

Comments, ideas?
Reply
#2
This is just a guess, but it might be related to using MySQL for the PVR-related databases. I've been told that using MySQL for the PVR db's doesn't always work very well and there's a few known bugs about it. I know Kodi will appear to hang/freeze when it can't access MySQL video DBs, so maybe that's true of the PVR-DBs.
Reply
#3
Might be. Just before the hang, this line appears in the log:

Code:
17:38:46 T:1806693440   DEBUG: Mysql Start transaction

The line is missing in the log when Kodi decides not to hang.

What I'm missing in this scenario in Kodi is:
  • A debug log entry if there was a (temporary) problem (e.g. accessing MySQL or whatever).
  • A fall-back mechanism keeping Kodi usable (e.g. by re-starting) when there is no active window remaining (Window Deinit not followed by a subsequent Window Init).
A situation like this where Kodi silently turns unusable is certainly not desirable.
Reply
#4
Here is a solution along with some further investigation results:

Solution: Do not use <advancedsettings> to share <epgdatabase> and <tvdatabase> via MySQL.

Why did I want to share PVR databases in the first place? The intention was to share resume points for partially watched TV recordings among several clients. It was a misunderstanding that this would require sharing PVR databases. Actually, TV recordings and resume points are maintained (and shared) by the PVR backend.

Further observations on freezes when PVR databases are shared via MySQL:
  • Freezes occur very frequently on a WLAN-connected Pi 2.
  • The freezes also (though rarely) occur on a LAN-connected Pi 2.
  • The TV Recordings window can always be opened once by quickly pressing KEY_PVR when Kodi starts and there is at least one progress indicator window open (CEC initializing, EPG loading, etc.)
  • If the TV Recordings could be opened successfully and a recording playback is started, Kodi often hangs with a "Loading" indicator.

I could imagine that the timing of MySQL accesses is actually a just trigger for a problem somewhere else (a race condition between Kodi threads).
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi 14.2 hangs with black screen after KEY_PVR0