Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.3.2
-
None
Description
<p>There are occassional errors in logs (e.g. <a href="https://forum.team-mediaportal.com/threads/crash-when-closing-down-from-top-left-icon.140388/post-1283062">here</a>) of a failure to build a plugin item. The trigger is when multiple threads try and request the same plugin item at similar times, notably multiple MediaItemLists request MediaItemFilters at a similar time. The underlying cause is that the PluginRuntime caches an ObjectReference <a href="https://github.com/MediaPortal/MediaPortal-2/blob/292cffa3ecea25d6725cc719c1cd20d219f1d887/MediaPortal/Source/Core/MediaPortal.Common/PluginManager/PluginRuntime.cs#L233">here</a>, before it's object has been assigned <a href="https://github.com/MediaPortal/MediaPortal-2/blob/292cffa3ecea25d6725cc719c1cd20d219f1d887/MediaPortal/Source/Core/MediaPortal.Common/PluginManager/PluginRuntime.cs#L241">here</a>, then a subsequent thread returns the cached ObjectReference without an object.</p>