Moving Pictures cause MP to crash (1 Viewer)

kiwijunglist

Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    i have no idea if this would work or not, but what if you mapped the samba share to a network hdd.
     

    majls_files

    Portal Member
    July 1, 2011
    15
    1
    I will try with only one file on samba just to determine if it is a file-name problem or it is samba movpic problem.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    I only use SMB Windows shares myself, but have setup systems using Linux samba shares, Apple shares, different type of NAS boxes with their own implementation, DAS cases and external drives. Aside from the bug that would cause some import paths to be 'visable' without actually running and causing MovPic to delete the database entries for that path (that has been fixed now though by @armandp), I've never had any problems except when the shares weren't configured properly.

    Hopefully your extra testing can reveal more details on the cause/source, so that better log messages can be given to assist in solving the problem.
     

    majls_files

    Portal Member
    July 1, 2011
    15
    1
    I think that i found what is causing MP to crash. On my SAMBA server I have a folder called recent_download where all my downloaded files go before they are moved to folders. This folder is also in movpic to watch for new videos. Because MP needs to have read/write permissions to folders I use cronjob (every 5 minutes) to do chmod 777 to all files/folders in recent_download folder.

    If chmod is executed at the same time while movpic is accessing files it will cause MP to crash.

    I tested this by going to MP and selecting MovingPictures, at the same time I was manually doing chmod to recent_download folder. MP crashed every time.

    Now I will set cronjob to execute every day at 3 am, when I am not using MP.
     
    Last edited:

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Never ever have MP/MovPic/etc point to a download or process folder, only final post-processing folders.

    Just create \recent_download and \movies and put all your movies inside that subfolder 'movies', make one for TV as well if you host them on the same storage. That way you point MovPic to \movies and it will never conflict with \recent_download.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Never ever have MP/MovPic/etc point to a download or process folder, only final post-processing folders.

    Just create \recent_download and \movies and put all your movies inside that subfolder 'movies', make one for TV as well if you host them on the same storage. That way you point MovPic to \movies and it will never conflict with \recent_download.

    Still a bug that should be fixed.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    I have similar issues on my laptop (but on final folder)
    I have try to add try / catch on movpic code and i can't reproduce it anymore. (lucky that i have trigger the issue with debug dll :) )
    This is strange because (but surely normal) i need to add the try/catch in existent try/catch :)

    Now :
    Code:
    					// monitor existing paths for change
    					while (true) {
    						// if the filesystem scanner found any files, add them
    						lock (filesAdded.SyncRoot) {
    						  try
    						  {
    							if (filesAdded.Count > 0)
    							{
    							  int processed = 0;
    							  int total = filesAdded.Count;
    							  foreach (object currFile in filesAdded)
    							  {
    								DBLocalMedia addedFile = (DBLocalMedia) currFile;
    								if (!fileList.Contains(addedFile))
    								  fileList.Add((DBLocalMedia) currFile);
     
    								processed++;
    								if (Progress != null)
    								  Progress((int) (processed*100.0/total), processed, total, "Queueing files..");
     
    							  }
     
    							  filesAdded.Clear();
    							  Progress(100, processed, total, "Done!");
    							}
    						  }
    						  catch (Exception Ex)
    						  {
    							logger.ErrorException("Exception import paths {0}.", Ex);
    						  }
    						}
    					   
    						// Process the new files

    Before :

    Code:
    					// monitor existing paths for change
    					while (true) {
    						// if the filesystem scanner found any files, add them
    						lock (filesAdded.SyncRoot) {
    							if (filesAdded.Count > 0) {
    								int processed = 0;
    								int total = filesAdded.Count;
    								foreach (object currFile in filesAdded) {
    									DBLocalMedia addedFile = (DBLocalMedia)currFile;
    									if (!fileList.Contains(addedFile))
    										fileList.Add((DBLocalMedia)currFile);
     
    									processed++;
    									if (Progress != null)
    										Progress((int)(processed * 100.0 / total), processed, total, "Queueing files..");
    								   
    								}
     
    								filesAdded.Clear();
    								Progress(100, processed, total, "Done!");
    							}
    						}
    					   
    						// Process the new files
     

    Users who are viewing this thread

    Top Bottom