NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 17 18 19 20 21 … 93 Next »
A foreign dll in the plugin folder breaks loading further plugins

 
  • 0 Vote(s) - 0 Average
A foreign dll in the plugin folder breaks loading further plugins
tmrt
Offline

Member

Posts: 188
Threads: 25
Joined: May 2007
#1
2010-09-25, 01:54 PM
I am writing a plugin that uses external mediainfo.dll. The presence of the dll in the plugin folder results in:
Code:
2010-09-25 15:09:10.097    [DEBUG][1]    About to check for plugin interfaces in: C:\Users\Public\NPVR\Plugins\Files\MediaInfo.dll
2010-09-25 15:09:10.113    [ERROR][1]    Unexpected error loading plugins: System.BadImageFormatException: Could not load file or assembly '2580480 bytes loaded from NUtility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: '2580480 bytes loaded from NUtility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.BadImageFormatException: Bad IL format.
   at System.Reflection.Assembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection)
   at System.AppDomain.Load(Byte[] rawAssembly)
   at NUtility.PluginRegistry.LoadPluginsFromRoot(String pluginDirectoryBase)


2010-09-25 15:09:10.113    [DEBUG][1]    About to look for plugin directories in: C:\Program Files (x86)\NPVR\Plugins\
No further plugins from the the data folder are loaded afterwards.
InVermont
Offline

Member

Posts: 157
Threads: 10
Joined: Mar 2007
#2
2010-09-25, 02:34 PM
While it looks like more is going on( I'm not sure about the bad IL format), when using 3rd party dll's like Google.GData.Client.dll, I have found it necessary to put them in the C:\Program Files (x86)\NPVR folder
Under GBPVR, there was a common folder under plugins. I haven't poked around enough to see if there is similar behavior in NPVR
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#3
2010-09-25, 04:46 PM
You should be able to put DLLs in either the same directory as the plugin, or in the plugins\common directory. Like InVermont mentioned above though, that 'Bad IL format' doesnt sound right.
InVermont
Offline

Member

Posts: 157
Threads: 10
Joined: Mar 2007
#4
2010-09-25, 05:40 PM
sub Wrote:You should be able to put DLLs in either the same directory as the plugin, or in the plugins\common directory.
I get an error if the DLL's are in the same directory as the plugin. along the lines of
Looking for assembly in (2) C:\Users\Public\NPVR\Plugins\common\Google.GData.Client.dll
Looking for assembly in (3) C:\Program Files (x86)\NPVR\Plugins\common\Google.GData.Client.dll
(this repeated a number of times. Then)
Unexpected error loading plugins: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types
but it works fine in the plugins\common directory.

Since it works in plugins\common, it isn't a problem (I just didn't like it in the NPVR program folder itself), but I can post more details and logs if you want.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#5
2010-09-25, 05:42 PM
Yeah, maybe I only added the plugins\common, not the plugin directory. I cant remember exactly. Go with plugins\common though.
tmrt
Offline

Member

Posts: 188
Threads: 25
Joined: May 2007
#6
2010-09-25, 09:28 PM
sub Wrote:You should be able to put DLLs in either the same directory as the plugin, or in the plugins\common directory. Like InVermont mentioned above though, that 'Bad IL format' doesnt sound right.

Maybe I was not clear enough. The plugin that uses that particular mediainfo.dll is able to load mediainfo.dll and works fine in the above case.

What I observe is that NPVR tries to load mediainfo.dll, which is unmanged library, to check for any plugin within it. Due to the exception however, it skips any further scanning for plugins in c:\Users\Public\NPVR\Plugins. As a result some other completely unrelated plugins in in c:\Users\Public\NPVR\Plugins are not loaded.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#7
2010-09-26, 01:35 AM
Ah, right - I see what you mean. I've fixed this for the next release.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,180
Threads: 958
Joined: May 2006
#8
2010-11-30, 03:36 AM
I guess the path isn't searched. What is the best way to use a UPNP.DLL from %WINDIR%\system32 ?

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#9
2010-11-30, 04:31 AM
I dont know off the top of my head, and probably depends how you're using the DLL. Probably start by googling 'pinvoke path'
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,180
Threads: 958
Joined: May 2006
#10
2010-11-30, 04:47 AM
Maybe there is no problem, I found a file called Interop.UPNPLib.dll I think I just need to distribute it. Sorry to bother you.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 3,089 2022-10-17, 12:44 AM
Last Post: sgilani
  Loading Local Video Files Syler 25 7,045 2021-03-07, 09:20 PM
Last Post: Syler
  Plugins and NPVR. Where do we start? sub 80 70,280 2020-11-26, 10:02 PM
Last Post: mandai
  New Systems Plugin kirschey 10 3,567 2020-11-14, 08:01 PM
Last Post: sub
  VIdeo playback from plugin mvallevand 5 3,649 2015-08-06, 10:43 PM
Last Post: sub
  I want to start developing plugins...but how? OrenShapir 6 4,188 2014-11-18, 10:38 PM
Last Post: mvallevand
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 3,013 2014-11-14, 02:05 AM
Last Post: Benoire
  Trouble loading .NET System assemblies bgowland 3 2,482 2013-10-31, 02:37 AM
Last Post: bgowland
  Tuner plugins and client id mvallevand 2 2,128 2013-07-03, 01:39 AM
Last Post: mvallevand
  API docs to help with plugin development? McBainUK 3 2,885 2013-06-08, 06:14 PM
Last Post: sub

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

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

Linear Mode
Threaded Mode