Moving Pictures config & MP crashing (1 Viewer)

Dark Eyes

Portal Pro
February 27, 2011
55
4
Hello folks,

I have been trying to tidy up my movies & Moving Pictures, so i have been going through getting rid of double entries and removing old movie files. Unfortunately, Moving Pictures config is now crashing soon after it runs - usually when it is retrieving possible matches. I can see a few errors in the MPC log that seem to indicate the connection to various webservices and apis are failing, but I don't know what could be causing this as my connection to the internet has remained the same all day.
Unfortunately it is now causing MediaPortal to crash soon after it launches, which is worrying.

If somebody has a moment to have a look in the logs, and see if they can see an obvious cause for the crashing, I would be very grateful.
 

Edalex

Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,955
    1,264
    Saratov
    Home Country
    Russian Federation Russian Federation
    Hello, I can see a crash during PathScanner run. So something wrong with your files or paths you've set in MovPics.Probably access problem. ALso you have corrupted Logomanager.config file but it's another story so please post it to Logomanager thread.
    P.s. Fun thing that fisrt similar thread at the bottom of the page is yours too :p
    [2017-11-18 14:17:29,154] [Error ] [PathScanner] [ERROR] - MediaPortal: Unhandled exception occured
    [2017-11-18 14:17:29,154] [Log ] [PathScanner] [ERROR] - Exception: System.NullReferenceException: Object reference not set to an instance of an object.
    at MediaPortal.Plugins.MovingPictures.LocalMediaManagement.MovieImporter.ScanFiles(List`1 importFileList, Boolean highPriority)
    at MediaPortal.Plugins.MovingPictures.LocalMediaManagement.MovieImporter.ScanAndMonitorPaths()
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart() Message: Object reference not set to an instance of an object. Site : Void ScanFiles(System.Collections.Generic.List`1[MediaPortal.Plugins.MovingPictures.Database.DBLocalMedia], Boolean) Source : MovingPictures Stack Trace: at MediaPortal.Plugins.MovingPictures.LocalMediaManagement.MovieImporter.ScanFiles(List`1 importFileList, Boolean highPriority)
    at MediaPortal.Plugins.MovingPictures.LocalMediaManagement.MovieImporter.ScanAndMonitorPaths()
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
     

    Dark Eyes

    Portal Pro
    February 27, 2011
    55
    4
    Hello Edalex - thank for your response. Unfortunately, I'm still struggling to work out how to solve this problem. I had, earlier today, deleted a couple of locations from Media Sources, but they hadn't existed for over a year. When it is scanning local media sources, it seems to be scanning 5 locations, but there are only 4 now in my source list - could this be the problem?
    Looking in the Windows crash xml, I can see;
    <ProblemSignatures>
    <EventType>CLR20r3</EventType>
    <Parameter0>Moving Pictures Config.exe</Parameter0>
    <Parameter1>1.0.0.1</Parameter1>
    <Parameter2>52d3c777</Parameter2>
    <Parameter3>MovingPictures</Parameter3>
    <Parameter4>1.8.1.0</Parameter4>
    <Parameter5>55d83406</Parameter5>
    <Parameter6>40d</Parameter6>
    <Parameter7>200</Parameter7>
    <Parameter8>System.NullReferenceException</Parameter8>
    which I presume indicates the point at which it crashes, but I don't think it is of much help - not to me anyway.

    Any more suggestions, gratefully received.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Looks like a few try/catch error handling entries are missing, but you can always look at the Moving-Pictures database in an SQL program and verify that all the import locations exist, or run an SQL query to cleanup the ones you want to properly remove.

    If you do not have SQL knowledge, then either share your database with somebody that does, or delete it and do a fresh import.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    SQL sounds scary, but browsing the data manually is pretty simple.

    Download SQLite Expert Personal 5.x from: SQLite administration | SQLite Expert

    Then open up movingpictures.db3 from the database folder, and browse through the different tables. I'd be able to tell you exactly which ones if my HTPC power supply didn't decide to die when the fuse popped a few days ago (waiting for a BlackFriday or CyberMonday deal to buy a new one), but the naming is pretty obvious.

    Now don't just go around and delete things you think look bad, because there is more than likely SQL table references going on with the ID of one cell being referenced elsewhere.

    What you can however do is examine the paths/drives for import locations, and verify those are active and that MovPic has read/write access to those. If you notice a mistake, say you removed a physical drive, but paths are still referencing to it, then you could otherwise `edit` it to a temporary path you can create.

    And if you reply on here in detail the mistake you manually found, then somebody can reply with an SQL query update to fix it.

    For example to mass update values, you do: UPDATE `table_name` SET column_name = REPLACE(column_name, 'string_old', 'string_new');

    This can be used to update any media locations from "E:\" to "D:\" or whatever you find is wrong.

    NOTE: Be sure to first run an SQL integrity scan though, as the database might have simply become corrupted (you might be lucky in having an auto-backup available in the database subfolder that gets created each time you `update` MovPic plugin). SQLite Expert has pragma integrity and vacuum commands in the menu options.
     

    Dark Eyes

    Portal Pro
    February 27, 2011
    55
    4
    Hello RoChess

    I'm still struggling to resolve this issue. Looking in the database, the import paths are correct, and it passes the Check and Vacuum tests. It crashes when about 30 files into the 'retrieving possible matches' operation, but not always on the same file. I have tried a backup database from earlier in the year, but that crashes in the same way.

    Any suggestions you have for what to check next, would be most welcome.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    @Dark Eyes, possible matches would indicate it found 'new' movies not yet in your database, and it crashes trying to process them for import.

    You can compare the database content with the movies on your folders, and locate the `new` ones, and put them in a separate folder for now. See if MovPic then works as it should, and then move one movie back at a time, until you've found the one causing a conflict.

    Tends to be like a corrupted header causing unexpected crashes.

    An update to MediaInfo.DLL can also help as it is used during import to get details on media file, and can lead to unexpected crashes easy.
     

    Dark Eyes

    Portal Pro
    February 27, 2011
    55
    4
    Hello RoChess

    I have tried updating MediaInfo.DLL, to a slightly newer version from the MediaPortal TV Server folder; I tried the newest one from the MediaInfro program files folder, but that caused MPConfig to crash almost immediately.
    Looking in the database, in the movie_info section, the movie with the highest rowid, which i presume is the last one added to the database, is not the last one added to the folders, there are others with lower rowids that were added more recently.
    Unfortunately, there are about 3500 entries, so I'm not sure this is going to be that easy to solve, by removing files from the folders.
    I have also noticed that every time I run it, the logs show a different file, as the last successfully processed - which would suggest that it isn't always crashing on the same file.
    I presume that if I uninstall MovPic and do a clean install, i will hit the same problem eventually.

    If you have any other suggestions, as to what I can try, I would love to hear them.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    @Dark Eyes, unfortunately you might be forced to debug it with the n^2-1 method, and take your 3500 entries, and import just half of them on a fresh new install. If those work, the issue is in the other 1750 files, then you split those in half and start over. Eventually you find the bad file.

    Another option is to run a script that will verify each file individually and verify that it is a valid media file. I wrote such a script for myself after I had to recover from outdated disParity recovery information and media files were corrupt at binary level (so mine would mostly import fine, but playback would fail on some). It took like 12 days (not a typo) to run the script though, because it would parse each mediafile by decoding it as fast as it could, but was on a slow CPU (each movie took like 10 minutes to verify).

    I planned to clean the script up after making it more generic for others to use and publish it on the MePo forum, but I can give you an early beta version of sorts if you want.
     

    Users who are viewing this thread

    Top Bottom