Kodi 17 - Randomly freezing after "stop" button on remote is pressed during video play

  • Hello, for longer time, I am encountering strange freeze problems when using LibreELEC with Kodi 17.

    Hardware:

    Asrock AM1H-ITX motherboard AM1 socket

    Athon 5350 APU with Radeon R3 graphics

    2GB RAM DDR3

    Kingston UV400 128GB SSD for OS, 1TB WD Black SATA HDD for media, formatted to ext3

    Software:

    LibreELEC - I have tried three versions

    v7.95.2 (kernel Linux 4.9.3, KODI 17)

    v8.0.2 (kernel Linux 4.9.29, KODI 17.3)

    v8.2.0 (kernel Linux 4.11.8, KODI 17.5)

    Full Logs - KODI.log is 22MB after unpacking, because of logging some things during watching one hour video.

    There is about 150 000 repetitive lines of some video decoding...or whatever it is. It was logged as I watched 1-hour long video.

    Dropbox - log-2017-11-22-19.58.35.rar

    Stripped down version of KODI.log - I have stripped off those 150 000+ lines of the repetitive log info.

    It is commented in the file. Either in this stripped down version, it was too bug for pastebin, so I am uploading it to dropbox:

    Dropbox - 01_KODI stripped.log

    Problem:

    When I hit stop utton on remote to stop playing movie, KODI will freeze just in the moment when video stops playing and the picture is switching (fade-out and fade-in) back into KODI's GUI, where the list of videos (and other texts and GUI elements) is "rolling" from screen edges back to its places on screen. But this transition will not be done completely, I can see KODI's GUI, but that GUI is partielly still dimmed, because it will freeze in its "fade in" transition. GUI elements are almost at their places, as they "roll out" from the edges of the screen, until it freeze.

    Here is video, you can clearly see what it does:

    External Content youtu.be
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    You can see, when it freezes, the entire GUI stays a little dimmed...this is not its proper brightness - the transition from video back into KODI GUI was not completed. This happened exactly in the moment as I hit stop button on remote.

    So far I have also discovered, that if I turn on debug logging, when KODI displays that three lines with logging info on screen permanently (CPU, path to log files, memory), it will not freeze. I have tested it - without debug on, it may freeze even 3-4 times a day. With debug on and its info on screen, it not freeze during two weeks. And I have watched something every day suring those 2 weeks, so it have plenty of time to freeze.

    So I have turn on debug log in different way - through advancedsettings.xml. I have set debug to hide and loglevel to "1" - debug info is not visible on screen, but it doing its job in background. Provided debug logs was obtained with this setting.

    I have a theory: what if displaying that debug info is somehow preventing KODI from freeze? By keeping GUI refreshing in background under videoplayer screen or something like that?

    Few times, I have also encountered some picture artifacts like this. That blue area flickers as I move up or down in the movie list.

    But it dissapeared when I go back in the main menu and then return into back Videos. But this happens very, very rarely. For last year, I have seen it maybe three times.

    mr3d6kV.jpg

    What I discovered so far:

    It is regardless of containers, codecs or resolutions (360p - 1080p, codecs such as mpeg4, h264, h265, mkv, mp4, avi) of movies.

    When that freeze occurs, it freezes just KODI itself. I can still SSH into LibreELEC underlying Linux system and restart KODI by "systemctl restart kodi" command.

    I have noticed it for first time when I installed LibreELEC 8.0 and when using Bello 6 skin. I thought it would be a skin related problem. So I switch to Aeon Nox skin, where everything worked OK. But only for day or two. So I think it is not skin related.

    What I have tried so far:

    - clean install of LibreELEC v 7.95.2, where KODI 17 final was first implemented

    - clean install of LibreELEC v 8.0 and 8.0.2 including formatting system drive.

    - update from LibreELEC 8.0.2 to 8.2.0, then 8.2.1

    - disable Cool n Quiet and C6 mode in BIOS

    - set shared graphics memory from 512MB to 1024MB

    - completely disable VDPAU

    - use another skin, because I have thought before, that it is skin related. But it occurs also with Aeon Nox skin.

    ...but nothing helped, problem still persists.

    I have searched KODI forum, LibreELEC and OpenELEC forums, KODI Trac, even bugzilla.kernel.org and bugzilla.freedesktop.org (where Mesa and such things have its bugs reported), and I did not find anything what can help me.

    So, I really dont know, where can be the problem. It happens in multiple skins, so I think that the GPU drivers, kernel or something in LibreELEC's underlying system may be the culprit. Or even KODI itself.

    Sorry for my english, I am not native english speaker.

    Edited once, last by shiro (November 23, 2017 at 3:01 PM).

  • I am not alone :)

    UPDATE:

    I wanted to find out, if the problem is in underlying Linux OS, to I have tried OpenELEC 8.0.4 - maybe they have some things different from LibreELEC. It happens also on OpenELEC 8.0.4 wich runs KODI 17.

    Currently testing it with OpenELEC 7.0.1 (kernel 4.4), which runs KODI 16.1. Skin is Aeon Nox, on which I encountered the problem before. I am startying to believe that it can be KODI 17.x issue.