NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 35 36 37 38 39 … 93 Next »
Error initializing event plugin: Exception has been thrown by the target of an invoca

 
  • 0 Vote(s) - 0 Average
Error initializing event plugin: Exception has been thrown by the target of an invoca
ralphy
Offline

Senior Member

Posts: 255
Threads: 51
Joined: Nov 2006
#1
2008-01-17, 12:23 PM
Has anyone got some clues as to why this exception in my plugin is occurring for a user on one system running Vista and 1.1.5 but not under my XP with 1.1.5. Of course the OS might be irrelevant, but don't understand why the the error seems to occur somewhere just before the DoStart method, because the try{} catch{} in DoStart() doesn't seem to be catching any error.

After the error, the plugin's destructor appears to be called.

I am also naïvely assuming that the other seven downloads of the plugin at the time of writing this post are working successfully.

Any thoughts on what to try to resolve the problem??

Code:
2008-01-16 12:28:10.657    VERBOSE    [1]    getValue() loading new key/value into cache: /settings/PluginsEnabled
2008-01-16 12:28:10.657    VERBOSE    [1]    getValue: /settings/PluginsEnabled : true
2008-01-16 12:28:10.663    INFO    [1]    loadNewStylePlugins()...
2008-01-16 12:28:10.663    INFO    [1]    About to check 'C:\Program Files\devnz\gbpvr\plugins\ExternalDisplay' for plugins
2008-01-16 12:28:10.663    VERBOSE    [1]    About to check file: C:\Program Files\devnz\gbpvr\plugins\ExternalDisplay\ExternalDisplay.dll
2008-01-16 12:28:10.711    INFO    [1]    ExternalDisplay: .ctr called by plugin or config
2008-01-16 12:28:10.711    VERBOSE    [1]    ExternalDisplay: Calling DoStart()
2008-01-16 12:28:10.714    ERROR    [1]    Error initializing event plugin: C:\Program Files\devnz\gbpvr\plugins\ExternalDisplay\ExternalDisplay.dll
2008-01-16 12:28:10.714    ERROR    [1]    Exception has been thrown by the target of an invocation.
2008-01-16 12:28:10.717    ERROR    [1]       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 GBPVR.Backend.Common.xc4f12ec3a8a4c96b.xd1ccdef346e6a297(Boolean x8bae2a88590d8cc0)
2008-01-16 12:28:10.722    VERBOSE    [1]    creating DirectRecordingSource
2008-01-16 12:28:10.723    VERBOSE    [1]    Loading DirectRecordingSource Configuration : 1
2008-01-16 12:28:10.770    VERBOSE    [1]    creating DirectRecordingSource
2008-01-16 12:28:10.770    VERBOSE    [1]    Loading DirectRecordingSource Configuration : 2
2008-01-16 12:28:10.773    VERBOSE    [1]    creating DirectRecordingSource


Code:
public   GBPVRExternalDisplayTask()
    {
        Logger.Info("ExternalDisplay: .ctr called by plugin or config");
        if (PluginHelperFactory.getPluginHelper() == null) return;
          
        Logger.Verbose("ExternalDisplay: Calling DoStart()");

        DoStart();
    Logger.Verbose("ExternalDisplay: DoStart() Complete");

        Application.ApplicationExit += new EventHandler(this.OnExit);
        System.Timers.Timer NullTimer = new System.Timers.Timer(60000);
        NullTimer.Elapsed += new System.Timers.ElapsedEventHandler(DoNothing);
        NullTimer.Start();
        NullTimer.Enabled = true;
        Logger.Verbose("ExternalDisplay: .ctr() Complete");
        return;
    }

      public void DoStart()
      {
          try
          {
          if (t != null && t.IsAlive) //Already started?
          {
              Logger.Info("ExternalDisplay DoStart called twice - already started...");
              return;
          }  
            Logger.Info("ExternalDisplay plugin starting...");
   ......

      Logger.Verbose("ExternalDisplay: Start the main background thread");
          
              stopRequested = false;
              t = new Thread(new ThreadStart(Run));
              t.Priority = ThreadPriority.Lowest;
              t.IsBackground=true;
              t.Name = "ExternalDisplay";
              t.Start();
          }

          catch (Exception ex)
          {
              Logger.Info("ExternalDisplay.DoStart: Exception while starting plugin: " + ex.Message);
              if (t != null && t.IsAlive)
              {
                  t.Abort();
              }
              t = null;
          }
      }
[SIZE="1"]Silverstone GD01S-MXR (three dead rows of pixels in the LCD and defective remote control), Power: Zalman ZM460B-APS (blew up - can't remember what's there now); CPU: Pentium D 3.2 GHz with Asus V72 Cooler; MD: Asus P5LD2 Deluxe 2048MB,
WDC WD10EADS 1TB Data, 320GB System, Asus EN9400GT Silent 512MB, Hauppauge HVR 1300,
XP Home SP3, GB-PVR 2.0, ExternalDisplay v0.3[/SIZE]
ralphy
Offline

Senior Member

Posts: 255
Threads: 51
Joined: Nov 2006
#2
2008-01-21, 11:23 PM
It turns out that the problem was an older version of CommonGBPVRUtilities being installed, and the plugin calling a newer method.

The problem was also that the try/catch in DoWork() (where this CommonGBPVRUtilities method was being called) was not printing out the exception in the catch and the first logger.Info message was also not being printed making it difficult to identify where the problem was acutally occurring. I've noticed before that the Logger buffers occasionally do not flush and print if an exception occurs.


A try/catch in GBPVRExternalDisplayTask did allow the error message to be printed in the log files.
[SIZE="1"]Silverstone GD01S-MXR (three dead rows of pixels in the LCD and defective remote control), Power: Zalman ZM460B-APS (blew up - can't remember what's there now); CPU: Pentium D 3.2 GHz with Asus V72 Cooler; MD: Asus P5LD2 Deluxe 2048MB,
WDC WD10EADS 1TB Data, 320GB System, Asus EN9400GT Silent 512MB, Hauppauge HVR 1300,
XP Home SP3, GB-PVR 2.0, ExternalDisplay v0.3[/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 2,776 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,321 2020-11-14, 08:01 PM
Last Post: sub
  API request returns xml on error scJohn 4 1,869 2020-08-25, 05:41 PM
Last Post: sub
  custom creation of a recurring error p37307 2 2,221 2017-12-19, 03:45 AM
Last Post: mvallevand
  VIdeo playback from plugin mvallevand 5 3,432 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,873 2014-11-14, 02:05 AM
Last Post: Benoire
  Recording Event jrockow 10 4,665 2014-07-28, 02:51 PM
Last Post: jrockow
  API docs to help with plugin development? McBainUK 3 2,751 2013-06-08, 06:14 PM
Last Post: sub
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,051 2013-03-24, 08:03 PM
Last Post: imilne
  sabnzbd plugin to show processed files Wakalaka 1 1,940 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