Circular <requires> dependency in addons.xml causes Kodi 18 to loop infinitely
#1
Hello Team

I just noticed an interesting bug. If a repo has an addon which requires an addon that reuqired itself, kodi gets in infinite loop.

Here is how to reproduce:
Code:
addons.xml
<addons>
    <addon id="plugin.video.addon1">
        <requires>
            <import addon="plugin.video.addon2" version="2.1.0"/>
       </requires>
    </addon>

    <addon id="plugin.video.addon2">
        <requires>
            <import addon="plugin.video.addon1" version="2.1.0"/>
       </requires>
    </addon>

</addons>

have a repo in kodi with above-like circular dependency, open kodi and open information dialog of any addon, kodi will loop infinitely until it consumes %100 of 1 cpu core and become stuck afterwards.

noticed in https://github.com/xbmc/xbmc/releases/tag/18.4-Leia tag.
Reply
#2
It's because the logic of your dependencies are in error. The term dependency means one relies on the other.

I suggest you reevaluate your coding... Sounds like you created an unorthodox dependency.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#3
(2019-10-06, 23:56)Lunatixz Wrote: It's because the logic of your dependencies are in error. The term dependency means one relies on the other.

I suggest you reevaluate your coding... Sounds like you created an unorthodox dependency.

yep it is definetely a stupidity in addons.xml but the consequence of it can be abused to kill the application. Kodi does not recover from this..
Reply
#4
(2019-10-06, 23:57)boogiepop Wrote:
(2019-10-06, 23:56)Lunatixz Wrote: It's because the logic of your dependencies are in error. The term dependency means one relies on the other.

I suggest you reevaluate your coding... Sounds like you created an unorthodox dependency.

yep it is definetely a stupidity in addons.xml but the consequence of it can be abused to kill the application. Kodi does not recover from this.. 

This is why we review repo submissions to detect coding errors Smile As for third-party repositories there is no way to protect users from poor programming; hence the warning users are prompted with prior to allowing "unknown" sources. 

Thanks for the info; not sure it's worth resolving.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply

Logout Mark Read Team Forum Stats Members Help
Circular <requires> dependency in addons.xml causes Kodi 18 to loop infinitely0