MediaPortal stopped due to an exception Type 'TraktPlugin.TraktAPI.DataStructures.TraktMovieSummary' (1 Viewer)

ltfearme

Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Maybe there is a race condition somewhere, perhaps try making a copy of _cachedAllocatorImages before iterating over it?
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Damien, another lead maybe for MP crash in Trakt : in \Trakt-for-Mediaportal\TraktPlugin\GUI\GUIExtensions.cs

    I can't see why :( or maybe like you said put a lock.

    C#:
    /// <summary>
            /// Acts the same as the CurrentLayout / View property.
            /// </summary>
            /// <remarks>this extension method was added to allow backwards compatibility with MediaPortal 1.1</remarks>
            /// <param name="self"></param>
            /// <returns>instance of GUIListControl or null</returns>
            public static void SetCurrentLayout(this GUIFacadeControl self, string layout)
            {
                PropertyInfo property = GetPropertyInfo<GUIFacadeControl>("CurrentLayout", "View");
                property.SetValue(self, Enum.Parse(property.PropertyType, layout), null);
            }

    Code:
    Application: MediaPortal.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.NullReferenceException
       at MediaPortal.GUI.Library.GUIImageAllocator.ClearCachedAllocatorImages()
       at MediaPortal.GUI.Library.GUIFilmstripControl.OnMessage(MediaPortal.GUI.Library.GUIMessage)
       at MediaPortal.GUI.Library.GUIFacadeControl.set_CurrentLayout(Layout)
    
    Exception Info: System.Reflection.TargetInvocationException
       at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
       at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
       at System.Reflection.RuntimePropertyInfo.SetValue(System.Object, System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
       at System.Reflection.RuntimePropertyInfo.SetValue(System.Object, System.Object, System.Object[])
       at TraktPlugin.GUI.GUIWindowExtensions.SetCurrentLayout(MediaPortal.GUI.Library.GUIFacadeControl, System.String)
       at TraktPlugin.TraktDashboard.LoadTrendingMoviesFacade(System.Collections.Generic.IEnumerable`1<TraktAPI.DataStructures.TraktMovieTrending>, MediaPortal.GUI.Library.GUIFacadeControl)
       at TraktPlugin.TraktDashboard.LoadTrendingMovies(Boolean)
       at TraktPlugin.TraktDashboard.LoadTrendingMovies()
       at TraktPlugin.TraktDashboard.<Init>b__76_2(System.Object)
       at System.Threading.TimerQueueTimer.CallCallbackInContext(System.Object)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.TimerQueueTimer.CallCallback()
       at System.Threading.TimerQueueTimer.Fire()
       at System.Threading.TimerQueue.FireQueuedTimerCompletion(System.Object)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    I can probably remove those extension methods now since the plugin doesn't officially support MP 1.1 anymore anyway.

    Maybe that will help, probably easy for you to compile your own trakt plugin to test, find all instances where it calls that extension method (or just in the dashboard class) and replace with the native call.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Replace:
    Code:
    facade.SetCurrentLayout(TraktSkinSettings.DashboardActivityFacadeType);
    with
    Code:
    facade.CurrentLayout = GUIFacadeControl.Layout.List;

    and
    Code:
    facade.SetCurrentLayout(trendingSettings.FacadeType);
    with
    Code:
    facade.CurrentLayout = GUIFacadeControl.Layout.Filmstrip;

    The layout types are loaded from skin settings, so its important to realise that this might not work for the skin you use. It needs a few tweaks.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    @Sebastii, I committed some changes to remove the old backwards compatibility code. It will be interesting to know whether you get the same crash still.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Will try it :) thanks, i didn't take the time to change on my side so big thanks :p
     

    Users who are viewing this thread

    Top Bottom