Kodi Community Forum

Full Version: Debug Kodi in VS2022 halts when installing addons
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Running Kodi in VS2022 debugger built from kodi.sln generated by VS2022 Win x64 Cmake.  When I attempt to install addon from my 3rd party repo, debugger halts due to assertion fail (I think it is a default assertion in VS debugger).

The debugger breakpoint is in VS2022 xutility
c++:
_STL_VERIFY(!_Pred(_Right, _Left), "invalid comparator");

The comparison variables from VS debug are
 
Code:
+        _Left    {m_depInfo={id="script.module.youtube.dl" versionMin={mEpoch=0 mUpstream="21.303.0+matrix.1" mRevision=...} ...} ...}    CInstalledWithAvailable &
+        _Right    {m_depInfo={id="resource.images.studios.white" versionMin={mEpoch=0 mUpstream="0.0.25" mRevision="" } ...} ...}    CInstalledWithAvailable &

From the call stack, it is generated from GUIDialogAddonInfo.cpp
c++:
void CGUIDialogAddonInfo::BuildDependencyList()
In this case, resource.images.studio.white is a dependency of the addon being installed, and script.module.youtube.ld is a dependency of a dependency script.module.kutils of the addon being installed.

I have seen this same assertion fail in VS 2017 debugger before, not sure the exact addon dependencies involved.  The work around is to first install the dependencies from zip.

There isn't any problem installing the addon from 3rd party repo outside the debugger, so I'm not sure what this is telling me?  If it is really a potential problem or not?

scott s.
.
Fixed by https://github.com/xbmc/xbmc/pull/23469, the sort order was not deterministic.
For a given _Left and _Right you could have _Left < _Right and _Right < _Left at the same time, which triggered an assert.
Much appreciated.

scott s.
.