NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 9 10 11 12 13 … 93 Next »
Plugin problems with started from the command line

 
  • 0 Vote(s) - 0 Average
Plugin problems with started from the command line
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,778
Threads: 954
Joined: May 2006
#1
2012-08-11, 06:39 PM
Several plugins seem to have trouble when called from command line, I assume because their CTOR call's use functions that aren't supposed to be in the constructor.

I see this everyday in my log for

NextPVR.exe -updateepgonly

Here are the results for SSPlus, YouTube, and Plex

Code:
2012-08-11 14:15:20.604    [INFO][1]    SSPlus Ctor: Version 1.2.0.0
2012-08-11 14:15:20.605    [ERROR][1]    Error loading screen plugin: C:\Users\Public\NPVR\Plugins\SSPlus\SSPlus.dll
2012-08-11 14:15:20.607    [ERROR][1]    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at SSPlus.SSPlus..ctor() in C:\Documents and Settings\Alex\My Documents\Visual Studio 2008\Projects\SSPlus dev\SSPlus.cs:line 116
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at NUtility.PluginRegistry.LoadPluginsFromRoot(String pluginDirectoryBase)
2012-08-11 14:15:20.607    [INFO][1]    SSPlus Ctor: Version 1.2.0.0
2012-08-11 14:15:20.607    [ERROR][1]    Error loading screen plugin: C:\Users\Public\NPVR\Plugins\SSPlus\SSPlus.dll
2012-08-11 14:15:20.608    [ERROR][1]    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at SSPlus.SSPlus..ctor() in C:\Documents and Settings\Alex\My Documents\Visual Studio 2008\Projects\SSPlus dev\SSPlus.cs:line 116
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at NUtility.PluginRegistry.LoadPluginsFromRoot(String pluginDirectoryBase)

YouTube

Code:
2012-08-11 14:15:20.632    [ERROR][1]    Error loading screen plugin: C:\Program Files\NPVR\Plugins\YouTube\YouTube.dll
2012-08-11 14:15:20.634    [ERROR][1]    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at NextPVR.YouTube.YouTubePlugin..ctor() in F:\Projects\NextPVR\YouTube\YouTube\Plugin.cs:line 19
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at NUtility.PluginRegistry.LoadPluginsFromRoot(String pluginDirectoryBase)
2012-08-11 14:15:20.634    [ERROR][1]    Error loading screen plugin: C:\Program Files\NPVR\Plugins\YouTube\YouTube.dll
2012-08-11 14:15:20.635    [ERROR][1]    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at NextPVR.YouTube.YouTubePlugin..ctor() in F:\Projects\NextPVR\YouTube\YouTube\Plugin.cs:line 19
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at NUtility.PluginRegistry.LoadPluginsFromRoot(String pluginDirectoryBase)

Plex seems to cause this one

Code:
2012-08-11 14:21:29.238    [ERROR][1]    Unexpected error: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark)
   at System.Reflection.Assembly.GetTypes()
   at NUtility.PluginRegistry.LoadPluginsFromRoot(String pluginDirectoryBase)

SSPlus has this one on EPG_UPDATE too

Code:
2012-08-11 14:11:35.057    [DEBUG][1]    EPG_UPDATED
2012-08-11 14:11:35.068    [ERROR][1]    Object reference not set to an instance of an object.
2012-08-11 14:11:35.070    [ERROR][1]    System.NullReferenceException: Object reference not set to an instance of an object.
   at SSPlus.SSPlus.NUtility.IEventNotification.Notify(String eventName, Object eventArg) in C:\Documents and Settings\Alex\My Documents\Visual Studio 2008\Projects\SSPlus dev\SSPlus.cs:line 1319
2012-08-11 14:11:35.070    [DEBUG][1]    SSPlus Notify: finished...
2012-08-11 14:11:35.070    [ERROR][1]    Object reference not set to an instance of an object.
2012-08-11 14:11:35.070    [ERROR][1]    System.NullReferenceException: Object reference not set to an instance of an object.
   at SSPlus.SSPlus.NUtility.IEventNotification.Notify(String eventName, Object eventArg) in C:\Documents and Settings\Alex\My Documents\Visual Studio 2008\Projects\SSPlus dev\SSPlus.cs:line 1319
2012-08-11 14:11:35.070    [DEBUG][1]    SSPlus Notify: finished...

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2012-08-11, 06:47 PM
It's because these plugins were never designed to run outside of the full UI environment of NextPVR.

This "-updateepgonly" never used to load any plugins so never used to have any problem, but needed to change when the recorder plugins first appeared.

There is no easy fix.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,778
Threads: 954
Joined: May 2006
#3
2012-08-11, 06:56 PM
I think it might be able be fixed by a developer though, since whatever I "don't" do in my four plugins (and it wasn't intentional) works fine.

Martin
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#4
2012-08-11, 06:58 PM
Try one of mine and see what happens. I can send over all the source code if they do it too, and then you can work out what's different.

Iain
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#5
2012-08-11, 07:04 PM (This post was last modified: 2012-08-11, 07:09 PM by whurlston.)
Both were cause by calling "PluginHelperFactory.GetPluginHelper().GetClientIdentifier()" but "PluginHelperFactory.GetPluginHelper()" was null.

@Iain: Weather -> Main.cs -> Line 135 (Replace whole function):
Code:
internal static bool IsRunningOnMVPNMT()
        {
            if (PluginHelperFactory.GetPluginHelper() != null)
            {
                if (PluginHelperFactory.GetPluginHelper().GetClientIdentifier().StartsWith("PCH") ||
                    PluginHelperFactory.GetPluginHelper().GetClientIdentifier().StartsWith("MVP"))
                    return true;
            }
            return false;
        }

@sub: I don't think anything needs to be done on your end. We as plugin developers should be checking for null but your API is so good that we just got lazy.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,778
Threads: 954
Joined: May 2006
#6
2012-08-11, 07:14 PM
Well it certainly won't know the client type until it is activated, but the Helper function returning null is probably the key problem.

Martin
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,778
Threads: 954
Joined: May 2006
#7
2012-08-11, 07:15 PM
imilne Wrote:Try one of mine and see what happens. I can send over all the source code if they do it too, and then you can work out what's different.

Iain

I can if you'd like, if I can sneak in a feature request I'd like to see wifi strength on the System plugin http://www.snippetdirectory.com/csharp/g...-strength/ It looks pretty straight forward.


Martin
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#8
2012-08-11, 07:36 PM
mvallevand Wrote:It looks pretty straight forward.
It does, but unfortunately that code isn't working for me. The ManagementObjectCollection object - which I assume is meant to return a list of all wifi adapters - is empty. That's on a laptop with an Intel 5300 card.

I'll keep trying/tweaking though...

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#9
2012-08-11, 07:50 PM
See if this helps. It adds a dummy plugin helper, which should stop the plugins crashing.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,778
Threads: 954
Joined: May 2006
#10
2012-08-11, 08:08 PM
Yes thanks, that gets rid of all those errors, except the Plex one, which I suspect is there even in the UI.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 2 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 2,735 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,296 2020-11-14, 08:01 PM
Last Post: sub
  Web command to create recurring any channel mvallevand 2 2,547 2019-02-04, 03:09 PM
Last Post: mvallevand
  Command Line Arguments for Executable gdogg371 29 13,143 2018-08-09, 01:35 PM
Last Post: jcole998
  Problems with Windows UWP App spitefulgod 4 3,766 2016-12-15, 08:35 PM
Last Post: spitefulgod
  VIdeo playback from plugin mvallevand 5 3,421 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,861 2014-11-14, 02:05 AM
Last Post: Benoire
  API docs to help with plugin development? McBainUK 3 2,737 2013-06-08, 06:14 PM
Last Post: sub
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,028 2013-03-24, 08:03 PM
Last Post: imilne
  sabnzbd plugin to show processed files Wakalaka 1 1,932 2013-03-12, 06:48 AM
Last Post: psycik

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode