Random Kodi Crash

  • Hi,

    I am using raspberry PI 4 with USB SSD with full UASP support connected to usb3 port. I have usb switch connected to the RPI usb3 port which itself has 2 8BitDo Wireless USB Adapters connected. RPI has RF keyboard/mouse dongle also directly connected to it's usb2 ports. Using official RPI power also. Hdmi cables I have used before with LE 10 without any issues with very high bitrate uhd hdr truehd movies. Hdmi cables are no-name brand though and if LE 11 has increased bandwidth that could possibly affect the situation as well.

    I have not tested LE 10 version if problem persists but will test if needed.

    My files are located in Ubuntu 20.04 server and served via nfs. I assume I have correctly configured nfs to be version 4 but that might not be the case.

    I've reinstalled LibreELEC 11.0.6 recently and I have experiencing random kodi crashes. The whole system does not seem to crash as I can access the system via ssh and reboot from there. Logs don't show up much to my untrained eyes but I add a link to the log here.

    External Content pastebin.com
    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.

    Symptoms are like this:
    I can have random crash with any file regardless of what kind of resolution, bitrate, video codecs or audio codecs the file has. Sometimes one file works and next time I test the same file I get a crash.

    This started after I installed pre-release LE 12 version from garbears repository as I tried to get gaming started (I have moved away from gaming in Kodi recently though). I don't suspect this has any meaning to my crashes but wanted to add the starting point when this went haywire.

    I then installed LibreELEC 12 nightly but cannot remember which version exactly. The issue persisted and I though it might have been related to nightly version somehow but then it get crashing randomly with LE 11 also so I have no clue what is happening.

    I have not yet tested without this usb3 switch and will do some testing if it has any play in this.

    Anyways, thank you in advance if anyone can shed some light to this situation.

  • Try without Bluetooth devices.

    Code
    2024-03-13 17:56:36.751 T:1165    error <general>: open_restricted - failed to open /dev/input/event7 (No such file or directory)
    ...
    2024-03-13 18:02:34.412 T:1269    error <general>:   File "/usr/share/kodi/addons/service.libreelec.settings/resources/lib/dbus_bluez.py", line 70, in Release
    2024-03-13 18:02:34.413 T:1269    error <general>: NotImplementedError
  • Hi,

    Do you mean disabling RPI's internal Bluetooth or are you suggesting removing the usb3 switch that has 2 8BitDo Wireless USB Adapters attached which are BT devices.

    Those 8BitDo Wireless USB Adapters have worked before just fine attached directly to the RPi but this usb3 switch is somewhat new as it was leftover from another project.

    Gonna try both solutions and see if the problem goes away, tnx for the help! Appreciated!

  • Finally had few mins to test and results are the same.

    I detached usb3 switch and disabled internal bluetooth.

    Kodi still crashes often and I can cause the crash by starting what ever movie/tv show episode, then stop it and restart it. It seems that it does not really matter whether I start the same movie/episode or something else, the crash will happen and can be reproduced easily.

    Here's the new debug log created with disabled bluetooth and detached usb3 switch:

    External Content pastebin.com
    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.

    Next I'm gonna test if 10.x still works. That's the only thing that has changed with adjusting shares to nfs4.

  • Code
    2024-03-18 17:52:36.351 T:1284    error <general>: ffmpeg[0x4634568]: [hevc] frame_post_process: Decode fail
    2024-03-18 17:52:36.352 T:1284    debug <general>: CDVDVideoCodecDRMPRIME::Reset - flush buffers

    Try LE 12 Beta. If the issue persists, try without DRM Prime (gear icon menu at playback bar).

  • Just installed latest LE12 beta and crashes are gone. I tested by using the same methods that caused kodi to crash in previous version and everything works just fine now.

    I updated to LE12 via normally (using .update folder via ssh) and did not make a new clean install.

    Case closed. Thank you for the help, really appreciated!

  • Well damn, the crashes are back and I can reproduce them by starting some tv show episode, stopping it and restarting the same episode. Crashes can occur quite frequently without specifically trying to crash the system.

    Here is the link to my kodi debug logfile: https://pastebin.com/VWhuWKuA

    Maybe I should try the latest nightly. LE10 worked just fine and never crashed but LE11 and LE12 seems to be crashing still.

  • Just updated to latest beta of LE12 (11.95.2) and crashes happen exactly the same way.

    Logs should show I used the same episode for testing.

    New debug log: https://pastebin.com/YT2smPB8

    Any ideas what's causing this?

    There seems to be edid error and I have ran getedid create script after update so no idea would that be causing the crashes.

    After testing a bit more it seems that every FHD media seems to be crashing every time if I start playing the file, then stop it and restart. If I play UHD file I cannot cause the crash.

    Disabling the DRM Prime does fix the issue and there are no crashes with FHD files but UHD files are completely unplayable (slide show) so it's not really a solution.

  • I've been trying different settings with whitelists but nothing seem to be helping. 1080p content seem to cause guaranteed crash of Kodi every single time.

    Above debug logs show EDID error but I have no idea if that can be fixed if TV it self is causing it. I have Sony XH95 tv with android 10 update which of course might be causing this. Unfortunately I have no other tv that I could try.

    Also I don't really understand what this and following lines mean:
    info <general>: Found resolution 1920x1080 with 4096x2160 @ 24.000000 Hz

    There does not seem to be any UHD resolutions found if that's what this means.

    Anyways, I'm at my wits end here :/

  • Okies, I copied couple of 1080p files to external drive and tried to play them from there. Same thing happens, I can start playing the file and everything works just fine, then I stop the play and restart the same or different 1080p file and then we crash.

    Here's the debug log: https://paste.kodi.tv/adofojixuy.kodi

    I did not disabled the NFS shares nor removed the sources within Kodi but can do that too if one might think it affects things.

    It does not seem to matter where the files are located nor which file it is as long as the file is not UHD resolution file ie. 1080p file. I have no 720p files to test but every 1080p file will cause Kodi to crash.

    I'll do some tests with some SD cards if older LE10 would work.

  • Okay, tested older LE10.0.4 version and it works just fine.

    AVC and HEVC files both work and I cannot get Kodi to crash. Something is messing something with AVC files (which I have used only for 1080p content) in later versions as in LE11 and LE12 beta.

    I found few other threads here that have similar symptoms as I have occasionally like sometimes AVC coded files start to play, I can hear the sound but screen freezes in current library view. Only reboot via ssh or ripping power cable out helps to reboot.

    It seems not many has this kind of issue which is kinda bad situation as the problem might not be reproducible by others.

    For now I remain in LE10 and keep one spare SD or SSD free to check periodically how things progress in LE12.

    Thank you for the help already :)

    Edit:

    It seems that 1080p resolution is the triggering factor as I have 1080p 10bit hevc files and avc 1080p files that crashes Kodi. Every 2160p hevc files 8bit or 10bit works just fine.

  • God dammit :)

    Just when I created some trimmed version of one problematic file I went to change skin back to the original one so I could access the files and find that trimmed file. Everything played flawlessly when using default skin. I ran at least 20 different tests with different files and no problems what so ever.

    I then tested switching back to the Arctic Horizon 2 skin and managed to cause the "crash" immediately.

    I ran this test scenario twice just to be sure and original skin works just fine with every file that previously caused problems. I could swear I tested earlier with default skin also but apparently I did not.

    Anyways, thank you for the ongoing support and pointers.

    Maybe this time I can conclude this monolog once and for all and really call this case closed :) god I feel like a moron tbh...