MyFilms and MP 1.2.x (1 Viewer)

CathodeRay

Portal Member
August 2, 2012
41
5
54
Home Country
United Kingdom United Kingdom
Hi

I have been trying to install My Films on MP 1.2.2.0 without success. I have tried both My Films v5 and 6, both of which are supposed to be compatible. I am running MCE 2005 SP3 and have all the .net versions installed up to v4 (full).

MPEI usually manages to get through its stuff and My Films Setup usually runs and I can save the configuration. It even gives a correct count for the number of entries in the AMC xml file I am using to test the setup.

Where MP/My Films fails is when I try to enable the plugin in MP Config Plugins. When I select the plugin tab I get the plugin broken or incompatible won't be loaded error on screen and the config log is as attached.

I cannot make any sense at all of what the log says! Any idea how I might go about fixing this problem?

Many thanks.
 

Guzzi

Retired Team Member
  • Premium Supporter
  • August 20, 2007
    2,161
    747
    Seems you have problems with permissions - try as admin with full rights to crosscheck, make sure the pathes you use have proper permissions.
    Also seems, you have DLLs loaded from network shares - you have to give rights to windows for that to work - use local path or adapt windows permissions accordingly (full admin rights might NOT be enough to solve the issue with network permissions - needs other adjustments).
    I'd recommend to load eecutables and dlls from a local path - less tricky...
     

    CathodeRay

    Portal Member
    August 2, 2012
    41
    5
    54
    Home Country
    United Kingdom United Kingdom
    Guzzi

    Thanks for your reply. The MP installation is set up as a single seat set up on one PC, usually running with no network connections, although from time to time it is networked usually to make it easier to shift files between it and another PC. The UNC like address \\Media-pc is in fact just the name for the PC, and if you check the paths in the log, they are all C:\ ie all the OS and program files are on one partition (media files are on another). I presumed the UNC style use was because even in a single seat set up MP is running as a server-client set up.

    So far as I can see, I log on with full admin rights/permissions. Until things start to go pear shaped (at around "2014-01-30 20:06:37.390625 [Warn.]" in the log file), most if not everything seems to load normally. Immediately before MyFilms.dll gets rejected as 'broken or incompatible', Dialogs.dll from the same folder (..\Plugins\windows) appears to load OK. Then we get "Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed." which although utterly cryptic does seem to suggest a permission request failed but what type "System.Web.AspNetHostingPermission" whatever that is! I have googled it to no avail...

    I don't really know much about dotnet but the frequent appearance of "mscorlib, Version=2.0.0.0" does make me wonder whether this is dotnet2, and the 'net'(work) is not in fact a network but is instead (dot)'net' if that makes sense ie this is a dotnet problem not a network problem? Dotnet not loading an assembly it needs or something like that?

    We then get a bit later on:

    The Zone of the assembly that failed was:
    Intranet
    The Url of the assembly that failed was:
    file://Media-pc/SYSTEM (C)/Program Files/Team MediaPortal/MediaPortal/plugins/windows/MyFilms.DLL

    which does look like a real UNC now (using forward rather than backslashes) but as noted above 'Program Files/Team MediaPortal/MediaPortal/plugins/windows/MyFilms.DLL' is on the local (same) PC ie there is no real network in operation at the time despite the mention of a 'Intranet' 'Zone'.

    TvPlugin.dll and WindowPlugins.dll (both are in the same folder) also fail but MP starts normally and so far as I can tell runs normally when I start it (the log is from MP config ie MP itself is not running at the same time as MP config).

    I do agree that most of the log errors suggest a permissions problem, but have no idea why these (config) permissions are failing yet MP itself seems to run normally.

    The only other thought I had was: is this happening because the version check is getting it wrong (I'm (still) running MP 1.2.2.0 (and want to keep it that way because I've modded it a bit, and it works!) and My Films is MP 1.2x compatible so it shouldn't fail)? As a result of a version check failing (though it shouldn't), everything downstream of that check goes pear-shaped?

    CathodeRay
     

    Guzzi

    Retired Team Member
  • Premium Supporter
  • August 20, 2007
    2,161
    747
    ... it may or may not be a problem of MyFilms.dll, but it definately seems, you have set your BaseDir to UNC path.
    Your log:
    Code:
    2014-01-30 20:06:23.328125 [Info.][Config Main(1)]: Base - \\Media-pc\SYSTEM (C)\Program Files\Team MediaPortal\MediaPortal
    2014-01-30 20:06:23.328125 [Info.][Config Main(1)]: Log - C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\Log
    2014-01-30 20:06:23.328125 [Info.][Config Main(1)]: Skin - C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\Skin
    2014-01-30 20:06:23.328125 [Info.][Config Main(1)]: Language - C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\Language
    2014-01-30 20:06:23.328125 [Info.][Config Main(1)]: Database - C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\Database
    2014-01-30 20:06:23.328125 [Info.][Config Main(1)]: Plugins - \\Media-pc\SYSTEM (C)\Program Files\Team MediaPortal\MediaPortal\Plugins
    2014-01-30 20:06:23.328125 [Info.][Config Main(1)]: Thumbs - C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\Thumbs
    So you definately have set BASE and PLUGINS folders to UNC pathes - this will cause Windows to use other policies.

    E.g. mine (and I am also using all DATA from UNC pathes - but not executables or dlls due to to related ... difficulties:
    Code:
    [2014-01-03 15:49:05,547] [Config ] [Config Main] [INFO ] - Base - C:\Program Files (x86)\Team MediaPortal\MediaPortal
    Note, there is no UNC path used.

    The Url of the assembly that failed was:
    file://Media-pc/SYSTEM (C)/Program Files/Team MediaPortal/MediaPortal/plugins/windows/MyFilms.DLL
    Again, you see, the file is loaded via the (see above) UNC path.

    I'd suggest to check your MediaPortalDirs.xml config file - rename/move them to use MP with local nin UNC pathes.
    Not sure, where the BASE path is set, maybe during install in Registry.

    Although it is in general possible, to also load assemplies from UNC pathes, I won't support that for MyFilms - MP also does not support it - so if you prefer doing so, you should read documentation about required changes to make it work.
    I had done such config long time ago myself - and it was a pita - so I reverted to standard install and just avoid such issues...
     

    CathodeRay

    Portal Member
    August 2, 2012
    41
    5
    54
    Home Country
    United Kingdom United Kingdom
    Guzzi

    I agree it appears MP (config) is using UNC paths for some but not all directories. This is not always the case: other config logs posted online show standard local paths ie c:\... etc. I have searched the registry, all MP config/xml/settings files and have not been able to find anything that appears to set the base and plugin directories to UNC paths. No available information via google either. I don't recall doing anything at intsallation time either that would have caused some directories to be set this way. The only thought I had was perhaps config sets these values at runtime ie they are not permanently set (via some form of settings file or registry entry) but are read (and logged) as config runs.

    I will post a new thread under Installation/Configuration support asking if anyone can tell us how these directories get set, and how to change them to local paths.

    CathodeRay
     

    Guzzi

    Retired Team Member
  • Premium Supporter
  • August 20, 2007
    2,161
    747
    Well, might be worth a test to create a MediaportalDirs.xml in config dir with local pathes, check if those are used and if that solves the problem of dll loading...
     

    CathodeRay

    Portal Member
    August 2, 2012
    41
    5
    54
    Home Country
    United Kingdom United Kingdom
    Guzzi

    Thanks for your reply. I've done some more research, and although I've found various things, none bring me any nearer a solution, though I'm hoping it may lead us towards one.

    From what I can see, in a normal installation, MediaportalDirs.xml doesn't do very much. It is just there as a default and a template if you want to customise directory locations. To achieve that, you need to edit it and copy it to My Documents\Team Mediaportal (not MP's settings folder). This hasn't been done (either by me or MP in the background) so I am using the default MediaportalDirs.xml in MP's program folder. Although there is an entry for the plugins directory, it says 'Don't modify', and there is no entry for the base directory, so I am not sure how I would set that using MediaportalDirs.xml. However, in a spirit of enquiry I added an absolute path for a 'base' directory and modded the plugins entry (and put the resulting MediaportalDirs.xml in My Documents\Team Mediaportal):

    <Dir id = "Base">
    <Path>C:\Program Files\Team Mediaportal\</Path>
    </Dir>

    <!-- The Path were all the Plugins are located. Don't modify -->
    <Dir id = "Plugins">
    <Path>C:\Program Files\Team Mediaportal\Plugins\</Path>
    </Dir>

    Result: MP config ran with no displayed errors but the plugins tab was blank (no plugins showing); MP started and showed start up splash screens and then bombed out. Relevant logs attached below. Config does use local paths, but as noted no plugins display, MP itself generates loads of errors. Curiously, towards the end of the config log UNC paths appear again (BASS plugins) and even more curiously are accepted. After removing the custom MediaportalDirs.xml MP was a bit wobbly and needed a couple of restarts to get it to start normally.

    I still have the Installation log from when I installed MP and curiously it shows local paths were used:

    [ INFO] Using default paths for MediaPortalDirectories now.
    [ INFO] Installer will use the following directories:
    [ INFO] Base: C:\Program Files\Team MediaPortal\MediaPortal
    [ INFO] Config: C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal
    [ INFO] Plugins: C:\Program Files\Team MediaPortal\MediaPortal\plugins
    [ INFO] Log: C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\log
    [ INFO] Skin: C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\skin
    [ INFO] Language: C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\language
    [ INFO] Database: C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\database
    [ INFO] Thumbs: C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\thumbs
    [ INFO] Cache: C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\cache

    So none the wiser there...

    Yet something somewhere is supplying the UNC paths. Indeed, it appears something changed after the original installation, which used local paths as shown above.

    I've dug around in the source code to see where MP config generates the 'Using Directories:' bit and it appears to be in Startup.cs:

    Log.Info("Using Directories:");
    foreach (string options in Enum.GetNames(typeof (Config.Dir)))
    {
    Log.Info("{0} - {1}", options, Config.GetFolder((Config.Dir)Enum.Parse(typeof (Config.Dir), options)));
    }

    So it appears to have something called Config.Dir but I cannot for the life of me find out where that is (my knowledge of C# is patchy to say the least but someone else maybe able to make sense of the above, although I sort of think the above foreach gets a list of names in a variable called options and then prints out the log lines which add a folder (path/directory) that we see in the log file - but what/where is config.dir???). Doing a 'find text in files' fails to find a relevant \\media-pc type entry, and a thorough search of the registry also failed to find anything relevant. Furthermore, these are in fact (I think) just log entries, ie they aren't setting anything, they are just logging what has already been set (in config.dir)...

    Any thoughts?

    CathodeRay
     

    Guzzi

    Retired Team Member
  • Premium Supporter
  • August 20, 2007
    2,161
    747
    Directories are set in Config.cs:
    static Config()
    {
    directories = new Dictionary<Dir, string>();
    LoadDirs(AppDomain.CurrentDomain.BaseDirectory);
    }
    AppDomain.CurrentDomain.BaseDirectory is set as Base Directory.
    You might check if the start of MP and/or config is using UNC pathes for either the executable or the working directory.
    Did you try to load MP without any plugins active to see, if that works fine?
    Otherwise I can't help - I'd do a proper clean installation to sort things - probably easiest and at the end fastest way to fix things.
     

    CathodeRay

    Portal Member
    August 2, 2012
    41
    5
    54
    Home Country
    United Kingdom United Kingdom
    Guzzi

    Bingo! You hit the nail on the head, which had quite passed me by - too obvious! The 'target' entry (but not the 'Start in' entry) in the shortcut to start configuration.exe was somehow set to the UNC type path that shows up in the log and so was also actually the path being used, hence the errors/error messages. I changed it to a local Windows path (C:\ etc) and My Films showed up in the plugins tab, enabled, and ran just fine when I started MP and went to 'Films'. All the other shortcut paths were local paths so I just left them as they were. I've no idea how config's target path got set as it did, but that was clearly the cause of the problem.

    Very very many thanks.

    CathodeRay
     

    Guzzi

    Retired Team Member
  • Premium Supporter
  • August 20, 2007
    2,161
    747
    Nice to hear that solved it - it was actually my last idea anyway ;-)
     

    Users who are viewing this thread

    Top Bottom