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
Add-on is keeping skin files open which prevent skin updates #41
Comments
Just ran into this while upgrading Kodi. It's quite a nasty bug. |
Also, I forgot to mention, that from My experience, it's not happening when the skin is hosted by the official repository, only from private repo's. |
@scakemyer , sorry for bumping it... many thanks for your hard work. |
I haven't forgotten about this, I just currently don't have any clue what is causing this. Could you provide a more detailed debug log? (please no pastebin or forum link, really tired of having to solve CloudFlare captchas) |
Actually, my skin is already in the official repository, which for some weired reason is not affected with this problem. I had this issue every few days when I pushed new updates to my repo, I also searched for some more details in the log - but none. even in debug mode. If you have some clue about it, and you need some testing, I have friends with private skins which can help us. |
sorry for bumping this, but i have the same problem with Xonfluence skin.. |
Fixes problem updating skin addons (scakemyer#41). Currently Android only.
Fixes problem updating skin addons (scakemyer#41). Updates both Unix and Windows.
This bug is definitely nasty, and aggravated me to point I just had to kill it. The core issue is that the quasar binary inherits all of Kodi's open files, including things like skin fonts and graphics, which means they can't be deleted and replaced as part of an update. An even bigger PITA is that no one solution will work on both Android (my platform) and Windows (not my platform), but I think I have an approach for each. Before I PR this, I'd appreciate if some other You can confirm the issue with inheritied files yourself using 'lsof' on Unix (Linux/Android/etc) or 'handle.exe' on Windows (Handle v4.0). Try doing this with your old quasar installation and then my updated one to see the difference. |
Can you explain how you're solving this and pushing your code to your branch even if not doing a PR yet? |
Could you explain this part of your question? It's not clear what you're asking. Do you prefer I just PR the changes and move discussion there?
Sure. First some background information: All changes are localzed to the Next, let me expand on how the quasar binary is inheriting open files, with a few key points:
The other important thing to note is from the Python docs on
And here is where the solution gets more complicated. On Unix (Linux/Android/etc) I just add the parameter Now, I've reproduced the problem/solution in Python on an old Windows box, but I don't run Kodi there, which is why I asked someone to help test it on Windows. Anyone? |
your fix isn't working on windows. |
anyone test the fix ? |
1 comment above you, not working on windows. |
@guidosarducci It won't work on windows because file handles are not the same as posix fds. The handle for textures.xbt can be above 1000. See:
I would suggest setting close_fds=True on all platforms (confirmed working). This will require removing stdout and stderr redirects on windows so IMHO the best way to handle it is to replace the logging code to use the quasar RPC mechanism instead (preferably using batch logging to avoid overhead). Edit: the code already supports RPC for logging. We don't really need to redirect stdout/stderr. The fix should be fairly easy. Nice catch @guidosarducci |
Sorry for being away, thank you all, great work. @scakemyer ... thoughts? |
Fixes problem updating skin addons (scakemyer#41). Updates both Unix and Windows.
Fixes problem updating skin addons (scakemyer#41). Updates both Unix and Windows.
Was away for a little bit so catching up... @metate Thanks for trying my suggestion of using @scakemyer The root problem is a messy one, and a Kodi bug AFAIC. Kodi leaks some files to child processes, and prevents others from being inherited. Worse, the files that are leaked depend on the platform and runtime used. This stuff should properly be fixed in Kodi itself. That said, I've updated my Windows workaround to use the pure MS CRT, and confirmed it works on Kodi Windows. I'll do a PR shortly, and folks can try it from there. |
Fixes problem updating skin addons (scakemyer#41). Updates both Unix and Windows.
confirmed working on windows, thnx @guidosarducci . |
Awesome work here @guidosarducci, sorry I was also away the past few weeks. |
Should be fixed by #469 thanks to @guidosarducci |
Fixes problem updating skin addons (#41). Updates both Unix and Windows.
as I explained in the forum thread:
http://forum.kodi.tv/showthread.php?tid=257967&pid=2231316#pid2231316
The process of pulsar.exe is using Textures.xbt file, which causing kodi to crash when I push skin updates to my users.
The text was updated successfully, but these errors were encountered: