Crash installing Kodi Matrix addon
#1
Is there are new requirement for addon.xml for Matrix in the last few days?  The crash is before the file is unzipped.  After installing I can upgrade to the nightly and use the addon.

This is a non repo file installed from zip

Windows nightlies on the 20th and 21st crash, it works on the 18th
xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.kodi.knewc" name="NextPVR New Client" version="2.9.0~a1" provider-name="emveepee">
    <requires>
        <import addon="xbmc.python" version="3.0.0"/>
        <import addon="script.module.future" version="0.16.0.4"/>
        <import addon="script.module.dateutil" version="2.7.3"/>
        <import addon="script.module.kodi-six" />
    </requires>
    <extension point="xbmc.python.script" library="default.py">
    </extension>
    <!--extension point="xbmc.service" library="default.py"  start="startup"></extension-->
    <extension point="xbmc.addon.metadata">
        <platform>all</platform>
        <minversion>28764</minversion>
        <summary lang="en">Python script to access NextPVR v4 or v5 using NEWA or v5 API</summary>
        <description lang="en">Supplement NextPVR PVR Addon with additional functionality Compatible with python 2.7 or python 3</description>
        <assets>
            <icon>icon.png</icon>
            <fanart>fanart.jpg</fanart>
        </assets>
    </extension>
</addon>

Martin
Reply
#2
If the dependencies are installed there is no issue so I manually removed them and installed this in the debugger @howie-f the issue with crash is PR 18439  on line 823  This is coming from a zip do addon->Origin() is empty and the repo is nullptr so repo->ID() causes the crash. 

As a hack I used this and it installs and doesn't crash and installs.
 
Code:
const std::string& parentRepoId = m_addon->Origin().empty() && repo != nullptr? repo->ID() : m_addon->Origin()

Martin
Reply
#3
@emveepee 
thanks for the heads-up.
indeed the nullptr-check is missing here.
so i think what you provide is not a hack but the correct solution.
feel free to PR it or please let me know if i should do this myself.

if you like you can use
Code:
           const std::string& parentRepoId =
-              m_addon->Origin().empty() ? repo->ID() : m_addon->Origin();
+              m_addon->Origin().empty() && repo ? repo->ID() : m_addon->Origin();
Reply
#4
@howie-f I will create a PR no problem, I called it a hack because I a simply made the change to avoid the crash without an understanding of where repo came from.

If you have time it would be nice to have the GUI show dependencies when an add-on is installed from a zip file seems like that is more important then when it comes from a repo.

Martin
Reply
#5
if you install an addon via zip you can see found dependencies in the debug-log: skin.aeon.nox.silvo
Code:

2020-09-25 16:45:01.670 T:1806    DEBUG <general>: ADDONS: found dependency [script.skinshortcuts] for install/update from repo [repository.xbmc.org]                       
2020-09-25 16:45:02.930 T:1806    DEBUG <general>: ADDONS: found dependency [script.module.unidecode] for install/update from repo [repository.xbmc.org]                    
2020-09-25 16:45:04.899 T:1806    DEBUG <general>: ADDONS: found dependency [script.module.simpleeval] for install/update from repo [repository.xbmc.org]                   
2020-09-25 16:45:08.425 T:1806    DEBUG <general>: ADDONS: found dependency [service.library.data.provider] for install/update from repo [repository.xbmc.org]              
2020-09-25 16:45:08.925 T:1806    DEBUG <general>: ADDONS: found dependency [script.module.routing] for install/update from repo [repository.xbmc.org]                      
2020-09-25 16:45:09.765 T:1806    DEBUG <general>: ADDONS: found dependency [resource.images.studios.white] for install/update from repo [repository.xbmc.org]              
2020-09-25 16:45:13.410 T:1806    DEBUG <general>: ADDONS: found dependency [resource.images.recordlabels.white] for install/update from repo [repository.xbmc.org]

what you cannot see yet is the not found deps, but this could be added easily... just tell Wink

sure, it's not as comfortable as a dialog popping up prior to zip-install..
but i'd like to avoid an additional dialog if possible.
do you need this for debugging purposes?
Reply
#6
That is a post install which is not much help.  What I mean is showing the dialog that repo addons get prior to install showing the dependencies that will be installed. 

From a zip once you select the file,  everything is downloaded, unpacked, installed and enabled with no prompt.  Only after the install can you see the dependencies that were installed.   As these dependencies aren't removed and can't be removed from Kodi I like to know what is being installed beforehand.

Martin
Reply
#7
ok, will see what i can do..
Reply

Logout Mark Read Team Forum Stats Members Help
Crash installing Kodi Matrix addon0