New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.7.3 crashes Kodi #520
Comments
There's something odd going on with our last few releases that I haven't been able to track down yet. Everything is working fine for me under the master profile. However, once I switch to a different profile, playback starts silently failing/crashing Kodi. And that happened on 0.7.2. Additionally, there's #510 which was 0.7.2 (and I can't replicate on the master profile), and the only changes to playback code there was your audio channel transcoding fix (which shouldn't be happening here) and adding the bitrate to the device profile (which shouldn't have broken anything). If there was anything in our code that was causing playback failure I would expect it to throw a traceback, but maybe there's something hidden or misformatted somewhere. |
I had deleted my ~/.kodi folder, so it should be like a fresh install with just a master profile. After enabling the jellyfin plugin connecting and syncing was fine. First attempt to playback and crash. Choosing version 0.7.2 in Kodi and playback works again. I don't know Python (and I kind of hate it), so I can't do more than basic logic stuff, but I will try my best to investigate this further. |
Just copying The websocket addon is there and seems to be getting "picked up". I have absolutely no clue why it crashes. I even tried older and newer releases of the websocket-client, but it made no difference. |
I have tested different machines. It is working fine in Windows. It is not working in Ubuntu, BUT it doesn't crash. (Yay!) but allow me to emphasize this part:
|
That issue specifically is because you have an out of date numpy on your OS. numpy/numpy#14384 An argument could be made that Kodi shouldn't be using your system files. A further argument could be made that there's no reason for the websockets library to need it. But here we are. The relevant code is here for the websockets library. https://github.com/pkscout/script.module.websocket/blob/57cf11a76946439920157b0cf8eb602889d6c8c0/lib/websocket/_abnf.py#L35-L49 I'll need to dig into this more later and see if I can reliably replicate it. |
I've narrowed it down to being an interaction between Kodi and numpy installed to the OS. Which also explains why it's not happening on a minimal amount of devices. On Windows, Kodi contains it's own embedded Python, so there's no environment bleed. I believe the same is true on Android based devices as well. On Linux, Kodi uses the system Python and can pick up system libraries. This means that even though numpy isn't installed in Kodi (and isn't packaged for Kodi in anyway), if it's installed on the OS then it's possible for Kodi to import it. If I have numpy installed, then Kodi will crash on playback. If I remove it, then everything works as expected. Since it boils down to numpy installed to the OS, this is also highly unlikely to impact systems like LibreElec or OSMC, and only hits people using Kodi on their workstations. So this is either a bug in the upstream library, or maybe our |
Can confirm this fixed it. Awesome! |
The new release crashes Kodi when trying to play back anything or accessing some settings. Syncing seems to work.
0.7.2 works
There isn't anything in the logs as far as I can tell, but here it is anyway:
kodi_crashlog-20210510_172111.log
I managed to do a git bisect, since I didn't know what else to do and this is the result:
The text was updated successfully, but these errors were encountered: