[6.0.3] Trakt for MediaPortal [2020-01-01] (1 Viewer)

Sebastiii

Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    Hey :)
    I've maybe another bug, i was trying to look at @ajs issue :

    Code:
    [2018-03-02 21:33:31,351] [Error  ] [CheckConnection] [ERROR] - MediaPortal: Unhandled exception occured
    [2018-03-02 21:33:31,371] [Log    ] [CheckConnection] [ERROR] - Exception: System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта.
       в System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
       в System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
       в TraktPlugin.GUI.GUIUtils.ShowNotifyDialog(String heading, String text, String image, String buttonText, Int32 timeout)
       в TraktPlugin.TraktPlugin.<>c.<GUIWindowManager_OnActivateWindow>b__34_0()
       в System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       в System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       в System.Threading.ThreadHelper.ThreadStart()  Message: Ссылка на объект не указывает на экземпляр объекта.  Site   : System.Object MarshaledInvoke(System.Windows.Forms.Control, System.Delegate, System.Object[], Boolean)  Source : System.Windows.Forms  Stack Trace:     в System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
       в System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
       в TraktPlugin.GUI.GUIUtils.ShowNotifyDialog(String heading, String text, String image, String buttonText, Int32 timeout)
       в TraktPlugin.TraktPlugin.<>c.<GUIWindowManager_OnActivateWindow>b__34_0()
       в System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       в System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       в System.Threading.ThreadHelper.ThreadStart()
    And i have run into MP crash :
    Code:
    Application: MediaPortal.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.IO.FileNotFoundException
    
    Server stack trace:
       at TraktAPI.Extensions.JSONExtensions.FromJSONDictionary[T](String json)
       at TraktAPI.Extensions.DateTimeExtensions.OlsenToWindowsTimezone(String olsenTimezone)
       at TraktPlugin.GUI.GUICommon.SetShowProperties(TraktShowSummary show)
       at TraktPlugin.TraktDashboard.OnTrendingShowSelected(GUIListItem item, GUIControl parent)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
       at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(System.Runtime.Remoting.Messaging.Message, Boolean)
       at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(System.Object, System.Runtime.Remoting.Proxies.MessageData ByRef)
       at MediaPortal.GUI.Library.GUIListItem+ItemSelectedHandler.EndInvoke(System.IAsyncResult)
       at MediaPortal.GUI.Library.GUIListItem.itemSelectedCallback(System.IAsyncResult)
       at System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessageSink)
       at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(System.Object)
       at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
    So looked the code and add a try catch here :

    C#:
    /// <summary>
            /// Returns the corresponding Olsen timezone e.g. 'Atlantic/Canary' into a Windows timezone e.g. 'GMT Standard Time'
            /// </summary>
            public static string OlsenToWindowsTimezone(this string olsenTimezone)
            {
                if (olsenTimezone == null)
                    return null;
    
                if (_timezoneMappings == null)
                {
                    try
                    {
                        _timezoneMappings = Resources.OlsenToWindows.FromJSONDictionary<Dictionary<string, string>>();
                    }
                    catch (Exception)
                    {
                        return null;
                    }
                }
    
                string windowsTimezone;
                _timezoneMappings.TryGetValue(olsenTimezone, out windowsTimezone);
    
                return windowsTimezone;
            }
    This try / catch seems to do the work :p
    I've reproduced it but starting MP with load last plugin (here Trakt) and start to navigate :p and boom :)

    upload_2018-3-3_16-44-3.png



    I have also noted a possible bull reference exception here "DateTimeFormatInfo.CurrentInfo' (just after above code) for :p

    C#:
    public static string ToLocalisedDayOfWeek(this DateTime date)
            {
                return DateTimeFormatInfo.CurrentInfo.GetDayName(date.DayOfWeek);
            }
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,697
    7,081
    Sydney
    Australia Australia
    Country flag
    I don't understand how you get that exception @Sebastiii , but I have added the exception handling. It's like it failed to load the resource I think but im unsure.

    Regarding the possible null reference exception in ToLocalisedDayOfWeek, I don't think it's possible for _DateTimeFormatInfo.CurrentInfo_ to be null? I can tighten it up anyway.

    I can't comment on ajs' crash, im not sure how that happen.
     
    Last edited:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    Thanks :)
    Yep not sure too but it was happening when he has no internet connection on his PC (provider issue) then MP start slowly and lead to the crash and not sure why exactly :(
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    11,859
    6,711
    Kyiv
    Ukraine Ukraine
    Country flag

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,697
    7,081
    Sydney
    Australia Australia
    Country flag
    I dont see any settings about UserRating ...but I'll look again ...

    --
    WBR, ajs :):whistle::coffee:
    You already have it enabled, I saw from one of your logs:
    2018-03-04 17:14:14.844 [INFO] [Sync][06]: My Videos Starting Library Sync
    2018-03-04 17:14:15.014 [INFO] [Sync][06]: There are 0 unwatched movies since the last sync with trakt.tv
    2018-03-04 17:14:15.016 [INFO] [Sync][06]: Getting current user watched movies from trakt
    2018-03-04 17:14:15.019 [INFO] [Sync][06]: There are 2532 watched movies in trakt.tv library
    2018-03-04 17:14:15.022 [INFO] [Sync][06]: Getting current user collected movies from trakt
    2018-03-04 17:14:15.025 [INFO] [Sync][06]: There are 992 collected movies in trakt.tv library
    2018-03-04 17:14:15.028 [INFO] [Sync][06]: Getting current user rated movies from trakt
    2018-03-04 17:14:15.031 [INFO] [Sync][06]: There are 2287 rated movies in trakt.tv library
    2018-03-04 17:14:15.051 [INFO] [Sync][06]: Found 17 movies available to sync in My Videos database
    2018-03-04 17:14:15.054 [INFO] [Sync][06]: Found 15 watched movies available to sync in My Videos database
    2018-03-04 17:14:15.057 [INFO] [Sync][06]: Found 15 rated movies available to sync in My Videos database
    2018-03-04 17:14:15.250 [INFO] [Sync][06]: Finding movies to add to trakt.tv watched history
    2018-03-04 17:14:15.264 [INFO] [Sync][06]: Adding 0 movies to trakt.tv watched history
    2018-03-04 17:14:15.268 [INFO] [Sync][06]: Finding movies to add to trakt.tv collection
    2018-03-04 17:14:15.277 [INFO] [Sync][06]: Adding 0 movies to trakt.tv collection
    2018-03-04 17:14:15.280 [INFO] [Sync][06]: Finding movies to add to trakt.tv ratings
    2018-03-04 17:14:15.286 [INFO] [Sync][06]: Adding 0 movies to trakt.tv ratings

    2018-03-04 17:14:15.291 [INFO] [Sync][06]: My Videos Library Sync Completed
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    ajs Trakt crashed Mediaportal if no Internet in home lan Trakt 2
    Lichloathe Trakt for MP2 question General 7
    ajs Trakt error when start with MP crash Trakt 1
    thepahakurki Trakt error: Invalid or missing file Trakt 8
    fischy667 wrong/no sync with trakt on some series Trakt 2
    A Mediaportal Allgemeines Support- und Diskussionsforum 0
    G Update von MediaPortal Installationsprobleme? 0
    ajs [News] MediaPortal 1 - 1.25 Released! News and Announcements 1
    horned_reaper Standby is prevented by MediaPortal client General Support 0
    U [solved] MediaPortal crashing on startup General Support 10
    g0rsq Info box randomly popping up when watching TV or other video MediaPortal 2 Newcomers Forum 1
    high [unanswered] Hallo möchte gerne Mediaportal. nutzen kann mich jemand anrufen? contactform feedback and requests 2
    ajs [News] MediaPortal 1.25 Pre-Release ready for testing! News and Announcements 0
    ajs [Rejected] Mediaportal Codename MediaPortal 1 41
    M 2nd (Touch-)Display Support on MediaPortal 2 such MPDisplay++? General 2
    N Steam release of MediaPortal MediaPortal 1 Talk 0
    torone Dritter versuch mit Mediaportal 2 Allgemeines Support- und Diskussionsforum 1
    M Fehlerhafter Link auf der aktuellen MediaPortal Seite Page- und Forumsfeedback 0
    H 1.24.0 MP 1.24 high CPU utilization when 'Keep MediaPortal always on top' option enabled Bugreports 4
    mickb [solved] Mediaportal Stops working General Support 5
    J [solved] Newbie to MediaPortal 2 - Cannot open/run TV programs Newcomers Forum 4
    atlantic How to use Spotify inside Mediaportal? Listen Music 18
    horned_reaper MediaPortal configuration error log message General Support 1
    Rob Hexenmeister Mediaportal Properties #plot etc... General Support 3
    ajs [News] MediaPortal 1 - 1.24 Released! News and Announcements 3
    Similar threads

























    Top Bottom