[confirm] Mediaportal randomly stops playing videos from networkshare (1 Viewer)

mironicus

Portal Pro
March 9, 2008
688
44
Country flag
Since some weeks I noticed a very annoying behaviour if I play videos from a network share. After some minutes the videoplay just randomly stops.

In the logs you can see the cause of the problem:

2010-12-01 17:36:36.503209 [Debug][(28)]: fileSystemWatcher_Error path z:\bakuman exception=System.ComponentModel.Win32Exception: Der angegebene Netzwerkname ist nicht mehr verfügbar
2010-12-01 17:36:36.503209 [Debug][(22)]: fileSystemWatcher_Error path z:\mm! exception=System.ComponentModel.Win32Exception: Der angegebene Netzwerkname ist nicht mehr verfügbar
2010-12-01 17:36:36.504209 [Debug][(21)]: fileSystemWatcher_Error path z:\fortune arterial exception=System.ComponentModel.Win32Exception: Der angegebene Netzwerkname ist nicht mehr verfügbar
2010-12-01 17:36:36.505209 [Debug][(28)]: RemoveWatcher z:\bakuman
2010-12-01 17:36:36.505209 [Debug][(22)]: RemoveWatcher z:\mm!
2010-12-01 17:36:36.506209 [Debug][(21)]: RemoveWatcher z:\fortune arterial
2010-12-01 17:36:36.543211 [Debug][FileSystemManager Thread(6)]: AddWatcher z:\gokujyo no koibito
2010-12-01 17:36:36.550211 [Debug][FileSystemManager Thread(6)]: AddWatcher z:\hyakka ryouran samurai girls
2010-12-01 17:36:36.555212 [Debug][FileSystemManager Thread(6)]: AddWatcher z:\iron man
2010-12-01 17:36:36.560212 [Debug][FileSystemManager Thread(6)]: AddWatcher z:\kuragehime
2010-12-01 17:36:53.965208 [Info.][MPMain(1)]: VideoPlayer9: Cleanup DShow graph
The FileSystemWatcher reports that it can't find the network folder anymore and the movie playback stops. However after the video is stopped I can just start it again without problems.

The attached Mediaportal.log is from the latest SVN. I also attached a complete log where Mediaportal crashed during video playback - the logs also reports some fileSystemWatcher errors.
 

mironicus

Portal Pro
March 9, 2008
688
44
Country flag
AW: Mediaportal randomly stops playing videos from networkshare

My problem seems related to Mantis 3062:

Revision: 26712
Autor: gibman_dk
Datum: 20:49:21, Montag, 8. November 2010
Meldung:
fixed mantis : 3126: performance improvements
bug in HasFolderBeenScanned
filesystem watchers are being added sooner.
----
Verändert : /trunk/mediaportal/Core/Util/Util.cs
I have compiled svn 26938 with 26712 changes reverted. This seems to solve it - no more error messages that the folder names are missing and the playback goes till the end when playing files over network. With the unchanged svn 26938 I still get the messages and the video stops randomly.
 

mironicus

Portal Pro
March 9, 2008
688
44
Country flag
AW: Mediaportal randomly stops playing videos from networkshare

No one can confirm this? The issue still exists for me on the latest build. My self compiled version 26938 with the reverted change from 26712 works fine though.
 

draclich

Portal Member
March 4, 2007
21
3
melb.vic.au
Yeah I can confirm it. Will have to chase up logs since to get around the issue I disabled sections of code in util.cs to eliminate the file watchers being added.
 

draclich

Portal Member
March 4, 2007
21
3
melb.vic.au
This issue is easy to reproduce the error. Just add a network share to your video folder list. The network share can be to a local drive and it still happens. Then browse in and out of folders in the network share until MediaPortal locks up.

Both logs show different errors and its hard to pin point the exact cause. I commented out calls to AddWatcher, SetupFileSystemManagerThread and SetupFileExistsCacheThread in Util.cs so that MediaPortal was usable.
 

draclich

Portal Member
March 4, 2007
21
3
melb.vic.au
Well having a better look at it the issue is with the updatewatcher call. Removing the add watcher call stopped it from freezing. While debugging there are several smb errors getting caught and i think update watcher is just adding to the issue by trying to spin off new threads until it become non responsive.

the smb error is "The network BIOS command limit has been reached" so i think there are just two many threads being opened. I test out later with modifying a registry key as per "The network BIOS command limit has been reached" error message in Windows Server 2003, in Windows XP, and in Windows 2000 Server to include the command limit. However I don't think this is the right solution.
 

draclich

Portal Member
March 4, 2007
21
3
melb.vic.au
To stop MediaPortal from freezing the below will disable caching and therefore the issue without a code change. I can't find the option in the configuration tool.

in MediaPortal.xml

add

Code:
<entry name="fileexistscache">false</entry>
just after

Code:
<section name="general">
 

draclich

Portal Member
March 4, 2007
21
3
melb.vic.au
I have created a patch that cleans up the watcher handling. Below is the main changes

The remove watcher section was looping for every directory that was being adding instead of just once per cycle.

The SQLlite journal files where triggering the created and deleted handlers due to the user data directory having a file watcher on it. The journal files are now ignored.

Changed the method by which the main file watch loop occurs to be a boolean switch instead of a date time check. Set the switch in the created and deleted file handlers so that the main loop processes on both conditions, previously it only worked for created.

Lastly don't create any watchers on file shares.
 

Attachments

Guzzi

Retired Team Member
  • Premium Supporter
  • August 20, 2007
    2,161
    747
    Country flag
    AW: Re: Mediaportal randomly stops playing videos from networkshare

    Lastly don't create any watchers on file shares.
    I haven't looked into any code, but istn't it especially the shares, where a performanceboost is expected b the caching dictionary?
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    g0rsq Info box randomly popping up when watching TV or other video MediaPortal 2 Newcomers Forum 1
    Symphy Version 0.2.9.0 for MediaPortal 1.25 ASIO music player 0
    doskabouter Installing mediaportal MediaPortal 1 3
    A Mediaportal Allgemeines Support- und Diskussionsforum 0
    G Update von MediaPortal Installationsprobleme? 0
    ajs [News] MediaPortal 1 - 1.25 Released! News and Announcements 1
    horned_reaper Standby is prevented by MediaPortal client General Support 0
    U [solved] MediaPortal crashing on startup General Support 10
    high [unanswered] Hallo möchte gerne Mediaportal. nutzen kann mich jemand anrufen? contactform feedback and requests 2
    ajs [News] MediaPortal 1.25 Pre-Release ready for testing! News and Announcements 0
    ajs [Rejected] Mediaportal Codename MediaPortal 1 41
    M 2nd (Touch-)Display Support on MediaPortal 2 such MPDisplay++? General 2
    N Steam release of MediaPortal MediaPortal 1 Talk 0
    torone Dritter versuch mit Mediaportal 2 Allgemeines Support- und Diskussionsforum 1
    M Fehlerhafter Link auf der aktuellen MediaPortal Seite Page- und Forumsfeedback 0
    H 1.24.0 MP 1.24 high CPU utilization when 'Keep MediaPortal always on top' option enabled Bugreports 4
    mickb [solved] Mediaportal Stops working General Support 5
    J [solved] Newbie to MediaPortal 2 - Cannot open/run TV programs Newcomers Forum 4
    atlantic How to use Spotify inside Mediaportal? Listen Music 18
    horned_reaper MediaPortal configuration error log message General Support 1
    Rob Hexenmeister Mediaportal Properties #plot etc... General Support 3
    ajs [News] MediaPortal 1 - 1.24 Released! News and Announcements 3
    S [solved] access the desktop without leaving mediaportal General Support 5
    J New computer with win10 and how will i set Mediaportal up ? Newcomers Forum 55
    T MediaPortal Extensions Manager Fehlermeldung bei Installation einer Erweiterung Installationsprobleme? 1
    Similar threads

























    Top Bottom