croneter / PlexKodiConnect

Plex integration in Kodi done right
GNU General Public License v2.0
1.14k stars 77 forks source link

Nvidia Shield Android 11 Experience 9: PKC causes Kodi To Crash at startup #1796

Open Thlerry opened 2 years ago

Thlerry commented 2 years ago

Since the last update to 3.6.7 PKC causes Kodi crashes at startup when trying to sync with server. Can this be looked at urgently? How can I disable PKC add-on and revert to the previous version ? (Editing the config files ?) I don't have time to go to the add-on settings and disable it before it crashes.

Thlerry commented 2 years ago

Just some additional comments I have the following config: NVidia Shield Pro 2019 Latest version of Android (NVidia Shield Experience 9 + Hotfix 3) PKC was working fine prior to 3.6.7

Thlerry commented 2 years ago

One more update, I managed to downgrade to 3.6.6 by disabling ethernet so that the plugin cannot start the sync. I confirm that 3.6.6 doesn't crash and I can use PKC again. So the crash is caused by the last changes in PKC 3.6.7

croneter commented 2 years ago

Kodi is just a pain, this really should not be happening šŸ˜ž

Please grab a DEBUG log from Kodi with this happening, see https://github.com/croneter/PlexKodiConnect/wiki/How-to-Report-A-Bug

I can't do a thing otherwise without a log file. I know what changed from 3.6.6 to 3.6.7, but this is ALREADY a hack/workaround for Kodi not working like it should.

Anyone else having this problem? Please quickly drop a post

croneter commented 2 years ago

https://kodibeginner.com/disable-automatic-updates-add-ons-kodi/

Thlerry commented 2 years ago

Thanks for the quick reply. I'll try to grab some logs with 3.6.7 tomorrow, and provide an update.

Thlerry commented 2 years ago

kodi.log

See attached kodi logs of the startup followed by crash. I hope this helps.

croneter commented 2 years ago

Nothing in the log at all šŸ˜ž. Could you please try again, try to grab all the logs? (there might be additional *crash* logs) Thx!

PadelzZ commented 2 years ago

I'm having the same issue but at version 3.6.6 Nvidia Shield 2015 Latest version of Android (NVidia Shield Experience 9 + Hotfix 3) installed. Haven't do a clean install of Kodi after updating.

I included 2 logs, but i'm not sure if you will see anything in it.

kodi.log kodi.old.log

Thlerry commented 2 years ago

I had a look again, but there is no other crash logs. Now something a bit funny, I downgraded again to 3.6.6 like I did before after the test with 3.6.7 and Kodi was crashing as well with 3.6.6. I tried to restart the shield but 3.6.6 was still causing Kodi to crash. So I left it like this and went to bed. This morning when I woke up, I looked at it again and 3.6.6 is working now, no more crash.

craZy-C commented 2 years ago

I reported this back about 16 days ago, log was attached to the post in the PLEX forum. I am not 100% convinced this is an issue with PKC allthough cannot rule out it being a permission issue when writing some extra artwork. My crashing started after Hotfix 2. If you check out the KODI Android forums there are several posts related to the crashing issue. Worst part about is that everyone is different. I updated PKC the other day (luckily it stayed up long enough to update) and though it was all working fine, 10 minutes later crashed again. I am waiting for hotfix 4...Edited to 16 days...ooops

croneter commented 2 years ago

If you check out the KODI Android forums there are several posts related to the crashing issue.

This strongly implies that PKC is not causing this issue. Thanks @craZy-C

craZy-C commented 2 years ago

@croneter , there are several variations I have come across, A few seem to relate to library scraping, some SMB/NFS issues...it is a real clusterF@#k. I do not believe PKC is the cause, ANDROID 11 and Shield Experience 9 is. I haven't tested without PKC running due to other users having the same problem.

PadelzZ commented 2 years ago

Wanted to add this, when i disable PKC. I'm not having start up crashes in Kodi anymore. Not blaming the crashes on PKC but just wanted to let you know

craZy-C commented 2 years ago

Hmm interesting. Hard to judge from other posts that I have read. what other add ons people have I am still leaning towards read write permissions with android 11 and Experience 9. I am wondering if the artwork or metadata in the background is having an issue

croneter commented 2 years ago

The really sad thing is that the changes I made should never ever lead to Kodi crashing šŸ˜ž

Thlerry commented 2 years ago

Well, at least in my case it's pointing to PKC 3.6.7.

Apart from the weird crash when I downgraded from PKC 3.6.7 to 3.6.6 the second time (it might have been an issue on plex server due to the previous crashes).

Now I have 3.6.6 working perfectly fine, and AS SOON AS I update the plugin to PKC 3.6.7 it triggers the crash of Kodi at startup. There is for sure something in PKC 3.6.7 which is causing an issue, or at least triggering it. Whether it's the fault of Experience 9 I don't know, but at least PKC 3.6.7 is the trigger in my case.

Also as mentioned by @PadelzZ above with PKC 3.6.7 installed, after disabling the plugin Kodi doesn't crash anymore. Also turning off ethernet connection stops the crash as well.

craZy-C commented 2 years ago

@croneter , In my case my crashing began on version 3.6.5 after Hotfix 2. And as mentioned other Android users on the Kodi forum have had similar and only 1 or 2 mentions of PKC that I saw.. Also Thiery's comment of turning off ethernet makes me look again at library actions and permissions

croneter commented 2 years ago

@craZy-C What exactly do you mean by "Hotfix 2"?

Does PKC beta version 3.6.4 crash for you as well? There is NO code difference between 3.6.5 and 3.6.4

Thlerry commented 2 years ago

Hotfix 2, is the second attempt from NVidia to fix some issue with Experience 9. We are at Hotfix 3 now.

Thlerry commented 2 years ago

@croneter do you have a way to build a release with additional logs to try to narrow down the crash ? We could see as well if our PKC crashes at a different location ? In my case it seems to crash when PKC connects to the server to synchronize. (the fact that disabling ethernet stops the issue, it probably doesn't reach the point which is causing the crash). Not to familiar with the dumps on android, is there a specific location I can look at (apart from the folder containing Kodi logs) in order to get the equivalent of a core dump ?

croneter commented 2 years ago

Please try BETA version 3.6.8. This is hit and miss, really šŸ˜ž

Thlerry commented 2 years ago

Give me a few minutes, I will give it a go and report here.

Thlerry commented 2 years ago

Hum, I went to update the PKC plugin and don't see 3.6.8 ? So I installed 3.6.7 again, and no more crash... I tried to restart Kodi 3 times and played a few different movies... looks ok now :/ This is getting weird....

croneter commented 2 years ago

This is getting weird....

I'm not surprised šŸ˜†

Try going to My Add-ons --> Check for updates

Thlerry commented 2 years ago

OK I found 3.6.8. I had to add the beta repository. Hum it's 1:38am here, I need a bit of sleep I think :) I still can't reproduce the crash at the moment with 3.6.7. I will keep monitoring, if the crash happens again I'll try to update to 3.6.8 to see if it fixes it.

rapteev commented 2 years ago

Hi Having this problem also since upgrading to experience 9 on my shield 2015. The crash happens using Plex kodi connect or emby for kodi and connecting to a remote server. If I use kodi a local database using MySQL it works just fine

rapteev commented 2 years ago

Addingā€¦ something related with web sockets or something like that?

croneter commented 2 years ago

The crash happens using Plex kodi connect or emby for kodi and connecting to a remote server.

This needs to be fixed on the shield side urgently!

croneter commented 2 years ago

Maybe this helps: https://github.com/xbmc/xbmc/issues/20631

Try deactivating HTTP2 in Kodis Advancedsettings.xml

croneter commented 2 years ago

Probably related: https://github.com/xbmc/xbmc/issues/20939

craZy-C commented 2 years ago

Just today they have added the https issue to the growing list. I have copied below...Delete it if you do not wish it here.. Personally I am just using plex at the moment as i am sick of trying fixes. Hoping a Hotfix 4 will drop soon. These are the known and reported issues in SE9.0. This is not the exhaustive list but rather the more common issues list. One off bugs, single user issues are not listed in here

Known Issues: (Join the HotFix for quicker resolution of these issues: https://www.nvidia.com/en-us/geforce/forums/shield-tv/9/481434/shield-experience-upgrade-90-hotfix-image/) Resovled in Hotfix:

Connecting to SHIELD over local network does not show content in adopted storage [2019 SHIELD all models] When toggling ā€œDolby audio processingā€ audio may be lost until SHIELD is rebooted [2019 SHIELD all models] Dolby Processing Memory leak can cause app crashes due to out of memory on base model SHIELD SHIELD TV mobile app and some 3rd party controllers do not work properly on Kodi [SHIELD 2019 base model] SD card occasionally does not get detected after reboot Corruption briefly observed when watching YouTube TV CEC volume control sometimes increments and decrements by 2 Issues with interlaced content playback IR volume control is disabled when USB DACs are in use Default Android Phone type folders (Ringtones, Downlods, Photos, Movies, etc) added to USB portable storage Resolves Wifi disconnects on a subset mesh/band steering network setups Plex file access issues which requires users to set up Plex server again after OTA upgrade While using Bluetooth headphones, audio is routed to HDMI instead of headphones only when audio formats is set to Manual When switching the input away from SHIELD via CEC, SHIELD does not sleep While copying files over SMB to SHIELD while an app is running on SHIELD can lock the SMB transfers out Long press menu button and menu button push to Kodi not working SHIELD screen gets rotated 90 degrees Mouse click not working SMB server cannot navigate Kodi media files Apps require updates to resolve these due to changes in Android 11:

File browsing apps may require permissions be manually set to modify/delete files or directories. Set permission under "Settings -> apps -> [file browser app name] -> Permissions -> Files and media" and set to "Allow while using this app" After performing the first step on file permissions, some apps will show folders but there are no files listed. To Fix this for now, you will need to uninstall and reinstall affected apps. Long press select in Kodi doesn't trigger voice search as it should Still open and to be fixed on a future SHIELD release:

AI upscaling does not work when streaming GeForce NOW 1080p HDR content

Resolution is capped at 1080p when using ADB for screen capture

Unable to log into Google or Netflix accounts when using restricted profile

Audio stutter issues with aptX-HD compatible headsets

VUDU does not cast in UHD

XBOX controllers may not automatically reconnect after disconnecting on SHIELD sleep

Chrome cast audio latency issues

When Kodi is running in the background, refresh rate changes on apps in the foreground somtimes

Button mapper remap on Netflix button triggers Netflix button and the new button mapped

Popping audio when playing back over BT headphones while Dolby Processing is enabled. For now, disable Dolby Processing while playing back on headphone

Free space reports incorrect using SMB server feature in SHIELD

Adopted storage starts migrating but doesn't always complete

Twitch scaling/zooming/cropping behavior doesn't look correct

Wifi disconnects on a subset mesh/band steering network setups

While using external hard drives with NTFS format which do continuous reading/writing (DVR type applications), the drive stops working and SHIELD hangs and needs to be rebooted. This may also apply to exfat as both file systems are served by Paraon but likely does not apply to fat32 which has built in kernel support.

Streaming Emby with https video stalls unless http2 is disabled

Reported Issues:

Change in mapping (Sterteched vs black bars) of 16:9 content to 16:10 display behavior from 8.2.3

When refresh rate switcher is enabled with the network debugging feature popups asking for device authorization to the network debugger appear randomly

rapteev commented 2 years ago

Maybe this helps: xbmc/xbmc#20631

Try deactivating HTTP2 in Kodis Advancedsettings.xml

Hi Deactivating http2 is the only way for videos to play since experience 9 , at least on my tests. Emby for kodi , now, even as an option to enable or disable http2.ā€¦. anyway the problem in my tests is that kodi randomly crash when using PKC or Embyforkodi . As I said earlier using a local database with MySQL it works just fine, so I think that this behavior as something to do with the connection to remote servers (on the connection itself or when try to update the libraries or ā€¦ anything else) but definitely only happening with these addons.

Thlerry commented 2 years ago

Just an update on my side I am still not able to reproduce the crash anymore, which makes me think the issue could be neither PKC not Experience 9 itself.

Nothing has changed on my system apart from my library (I have a new movie in it), so I am starting to wonder if the crash is not a result of a corrupted library or cache after the upgrade to experience 9 ?

If someone still experiences the crash at startup, could they try to clear the kodi cache (system), and maybe clear the libray and start from scratch to see if this fixes the crash issue ? Just a thought...

craZy-C commented 2 years ago

My crashing is random, between 1 or 2 minutes up to my record of just under 10 minutes. Can be while sitting idle or going through menus. I have cleared cache, cleared data and reinstalled and applied backups but still no change. @Thlerry consider yourself one of the lucky ones if it stays stable for you.

Thlerry commented 2 years ago

@craZy-C Which version of Kodi are you running ? I am running the following: kodi-20220110-e8cdc30b-Matrix-arm64-v8a.apk

For me it was crashing just when the popup of PKC was popping up (just after) and systematically within 5-10s of startup even when I was not doing anything when it was happening.

croneter commented 2 years ago

Maybe completely remove Kodi, then reinstall?

IMNew214 commented 2 years ago

I had the crashing problem, even with the new beta of PKC. I deleted the kodi cache and data and started fresh and installed beta of PKC again. I am (so far) not experiencing any more crashing. My 2017 shield is on latest version (no hotfixes) and using kodi 19.3. Hope this helps someone else that may have trouble

rapteev commented 2 years ago

I had the crashing problem, even with the new beta of PKC. I deleted the kodi cache and data and started fresh and installed beta of PKC again. I am (so far) not experiencing any more crashing. My 2017 shield is on latest version (no hotfixes) and using kodi 19.3. Hope this helps someone else that may have trouble

Hi Are you using default skin or another one? I notice that with default skin crashes are less frequent. Also I have a very large library and usually it crash more when browsing the library.

Thank you

IMNew214 commented 2 years ago

I had the crashing problem, even with the new beta of PKC. I deleted the kodi cache and data and started fresh and installed beta of PKC again. I am (so far) not experiencing any more crashing. My 2017 shield is on latest version (no hotfixes) and using kodi 19.3. Hope this helps someone else that may have trouble

Hi Are you using default skin or another one? I notice that with default skin crashes are less frequent. Also I have a very large library and usually it crash more when browsing the library.

Thank you

I am using arctic zephyr reloaded. I did install and setup all my addons (including PKC), using default skin though. Hope that helps.

Just to add to it, I have a library of about 3,500 movies and 250 tv shows, as well as a lot of sporting events. Kodi has not crashed once since I started from scratch.

A random thought came to mind. Do you have all of your libraries artwork cached to your shield? Are you for some reason running out of ram?

When I used my old raspberry pie for kodi, I would crash if the device ran out of ram. This would happen when trying to browse my library right after PKC would finish syncing all my content, but hadnā€™t cached all images yet. It would also happen if the skin was too ā€œheavyā€ for the device.

rapteev commented 2 years ago

I had the crashing problem, even with the new beta of PKC. I deleted the kodi cache and data and started fresh and installed beta of PKC again. I am (so far) not experiencing any more crashing. My 2017 shield is on latest version (no hotfixes) and using kodi 19.3. Hope this helps someone else that may have trouble

Hi Are you using default skin or another one? I notice that with default skin crashes are less frequent. Also I have a very large library and usually it crash more when browsing the library. Thank you

I am using arctic zephyr reloaded. I did install and setup all my addons (including PKC), using default skin though. Hope that helps.

Just to add to it, I have a library of about 3,500 movies and 250 tv shows, as well as a lot of sporting events. Kodi has not crashed once since I started from scratch.

A random thought came to mind. Do you have all of your libraries artwork cached to your shield? Are you for some reason running out of ram?

When I used my old raspberry pie for kodi, I would crash if the device ran out of ram. This would happen when trying to browse my library right after PKC would finish syncing all my content, but hadnā€™t cached all images yet. It would also happen if the skin was too ā€œheavyā€ for the device.

Hi Yes I understand that , but I never had this problem before the upgrade to experience 9 and my library is the same ( well more 5 or 10 movies than before and some tv shows) . I tried with artic zephyr reload and embuary and even with default skin after a fresh start and after some time the problem comes again. It also happens with emby for kodi , but never happens if I use a local library With MySQL. I am going to test and test until I find a reason for this. Thanks PS: I checked the memory on kodi and I have between 500 to 600 MB left so I donā€™t think that is a memory problem. Iā€™m inclined to think that is a problem with connection because the servers that I use for PKC and emby for kodi are remote servers.

craZy-C commented 2 years ago

@Thlerry Sorry went to bed so did not answer. My set up is as follows 2017 Shield Attached 500gb SSD set as attached storage Plex server resides on QNAP NAS Latest Nvidia Shield Build with Hotfix 3 Latest Kodi from the play store PKC 3.7.6 AEON Nox Silvo skin - No other plugins

My issue began with Experience 9 where my skin could not detect backgrounds due to attached storage issues, Kodi and Plex Web app worked fine at that point. Hotfix 1 appeared and backgrounds came back but Kodi started randomly crashing as did Plex App. Hotfix 2 arrived no change to KODI but Plex web app was back to normal. Did all the clean data, clean cache reinstall KODI etc but same issue. Hotfix 3 arrived no further change. Of note is each time a hotfix came out or I cleaned cache or updated PKC my uptime improved, meaning i stayed crash free but only for a few extra minutes each time. During all of this PLEX web app on the shield works flawlessly, I do not want to do a complete restore of the shield or rebuild Kodi due to my large library and the possibility of it breaking again with Hotfix 4-5-6 or what ever. So I am using just the Plex App. Hopefully they release a fix as I believe, from reports, they will sort out https and more samba and sql calls. itr may also require Kodi updating their ANDROID security level as it is 11 or 15 when Android 11 wants 30..Who knows, good luck to anyone that can get things working in the meantime

Thlerry commented 2 years ago

@craZy-C maybe give a go the the build in this thread. That's the one I am using and it seems stable and has quite a few fixes on top of the official release. You can install it on top of the Play Store version, so no need to reinstall anything.

https://forum.kodi.tv/showthread.php?tid=365127

craZy-C commented 2 years ago

Thanks @Thlerry will give it a try

IMNew214 commented 2 years ago

Just a update. I havenā€™t had a single crash since starting fresh on kodi.

My setup is as follows.

2017 shield 16gb version with 500gb ssd attached, and connected to network using 2.4ghz Wi-Fi. Latest system update (no hotfix) and kodi 19.3 from play store. Latest beta of PKC, with fan art turned off.

In kodi I am using PKC, next up, and play random. PKC is using direct paths, and my Plex server is on the same network. Libraries I use have about 3500 movies, 250 tv shows, and about 500 sporting events.

all addons were downloaded, install, and setup using default kodi skin, then I changed to arctic zephyr reloaded.

I have had no issues at all since starting kodi from scratch. Hopefully this helps narrow down issues others are having.

Thlerry commented 2 years ago

Update on my side, tonight I added a movie in my library and following this I couldn't play anything.

See issue tracked here: https://github.com/croneter/PlexKodiConnect/issues/1800

I then did a full reset in the advanced setting of PKC add-on (PKC + Kodi Library). Following this I am back to normal and I can play everything again.

No crash anymore for me either and still using PKC 3.6.7. So I really think that the crash is more related to a corruption somewhere, and it could also cause movies to not play..

Aside from a few stuttering issue with TrueHD movies (which is a separate Kodi issue), I played movies for 5H today and no issue / crash to report after the full reset of the PKC add-on.

rapteev commented 2 years ago

@croneter and all of you Hi Well in my case it seems (fingers crossed) that turning off: ā€œdownload additional art from fanarttvā€ and ā€œ enable notifications for image cachingā€ and ā€œEnable image caching during kodi playbackā€ , Solves the problems. No more crashes. So most sure one of these or two or even all the 3 are the cause of my randomly crashes. Iā€™m going to let it work for some hours and report back.

frakki1986 commented 2 years ago

Same Problem here. Nothing seems to fix the issue.

Tested the Stable and Beta branch of PKC. Tried to disable:

ā€œdownload additional art from fanarttvā€ and ā€œ enable notifications for image cachingā€ and ā€œEnable image caching during kodi playbackā€ ,

Reinstalled Kodi and set up things from scratch.

Does anyone has some advice?

Best regards

rapteev commented 2 years ago

Well,

I also spoke to soon, after some time kodi returned to crash. i donā€™t know what to do more. The most strange thing is that using MySQL and a local database I donā€™t have these crashes

croneter commented 2 years ago

Just to be clear here: Nvidia fucked up its update to Experience 9. Seems to be related to the Python module sqlite3 which is absolutely necessary for PKC to access the different databases.

I'm sorry, but Nvidia needs to fix it - nothing I can do on the PKC-side of things šŸ˜¢

rapteev commented 2 years ago

Hi @croneter Thank you. Let see if they fix it on a future hotfix. Anyway thank you very much for all your help and hard work maintaining this great kodi addon