100% CPU when launching MP with MovingPictures (1 Viewer)

DragonQ

Portal Pro
August 30, 2011
644
79
Home Country
United Kingdom United Kingdom
Ever since I got back from a trip MediaPortal uses 100% CPU whenever I start it, making it unusable. I vaguely remember updating whichever extensions needed updating in Extension Installer about a week ago and it's possible that MovingPictures was one of them. Starting MediaPortal in debug mode or disabling MovingPictures fixes the issue.

Logs are attached: I simply started MediaPortal then waited a bit before closing it. CPU usage was 100% the whole time and I have attached a screenshot showing some Cornerstone files being accessed a lot (no idea what they are). Hopefully this'll give a clue as to what the problem is.
 

Attachments

  • 100% CPU Usage - Disk Access.png
    100% CPU Usage - Disk Access.png
    722.3 KB
  • 100% CPU Usage.zip
    38.2 KB

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Do you have any anti-virus software installed perhaps?

    Microsoft Security Essentials goes crazy over MediaPortal, you have to exclude both the process and folder for it to finally settle down or you will get excessive CPU usage.

    Easy way to debug is to configure MediaPortal in windowed mode (you can switch via config or ALT+Enter) and then have Task Scheduler open at the same time sorted on CPU cycles.
     

    DragonQ

    Portal Pro
    August 30, 2011
    644
    79
    Home Country
    United Kingdom United Kingdom
    Nah I excluded the MediaPortal processes and folders in MSE ages ago for that very reason. I opened the MovingPictures configuration window and it showed that about half of my films needed to be added, even though they were all added before! I added them all (a lot of them required manual searches so it took a good 20 minutes) and now the problem seems to have disappeared.

    Why would half of my films disappear from the MovingPictures database after a plugin update??
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Database corruption can sneak in when you least expect it. Shutting down MediaPortal and then re-opening it, sometimes leads to the previous session not fully closed yet. This leads to simultainious access to the databases if plugins are still updating things on a background thread, which SQLite does not enjoy unless this is all coded in safely for concurrent access. Another reason can be an unexpected shutdown before the database was properly saved, or dozens of other reasons. It is actually amazing how rare corruption occurs. Moving-Pictures runs many self-repair routines when it initializes, which is more self-evident when you launch the configuration panel.

    Not saying that is what happened to you, but it would not be the first time. You would be wise to run a backup script, such as the one I use myself that I shared on the forum (simple batch script). It is an auto-backup/restore script that works by checking the integrity of the SQLite database. That way if a corruption is detected it immediatly restores the last known-good backup.

    As for all your manual approvals, you could have given IMDb+ a try as it has an improved auto-matching rate and offers additional benefits that you might enjoy. Another suggestion is to use a 3rd party tool such as MovPicNFO or the Moving-Pictures build in file-renamer, so that the IMDb tt-ID is secured in either NFO file or filename (MovPicNFO can also store other data inside the NFO as well as artwork for a full off-line re-import via XBMC scraper).
     

    DragonQ

    Portal Pro
    August 30, 2011
    644
    79
    Home Country
    United Kingdom United Kingdom
    I already use IMDb+, it just seems as if MovingPictures cannot handle file tags well. All of my files have tags in square brackets and when I look at the search string it's seemingly being really weird about what it includes and what it doesn't. I can't remember exactly but as a random example, "300 [1080p, 5.1].mkv" would become "300 5 1" or something and it'd have no idea what the film is. IMO it'd be better if everything in square brackets was ignored when generating a search string automatically but I can't see that as an option anywhere.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    What you are after is adjusting the "noise filter" in advanced settings. It is RegExp based, so adding:

    \s*\[[^]]+\]|

    in the front of the existing one would kill all the bracket stuff from a filename before MovPic tries to make sense of the title.
     

    Users who are viewing this thread

    Top Bottom