did I spot bug ?. (1 Viewer)

te3hpurp

Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    Hi.

    I was wondering why some videos hanged every now and then, I need to restart
    Mp lient in order to survive. It locks up Directx totally. Nothing could be played when it happens.

    Last line in log is from OnlineVideosPlayer.cs

    IBaseFilter sourceFilter = DirectShowUtil.AddFilterToGraph(graphBuilder, "File Source (URL)");

    After that I think is the dangerous part.

    new Thread(MonitorBufferProgress) { IsBackground = true, Name = "MonitorBufferProgress" }.Start();
    while (PercentageBuffered < OnlineVideoSettings.Instance.playbuffer) Thread.Sleep(50);


    If MonitorBufferProgress does not upgrade PercentageBuffered, or Thread gets otherwise messed, then there is a possibility for infinity-loop. I think that's happening for me quite regulary.

    There should be some some monitoring of MonitorBufferProgress thread and/or break that while loop, saying for example cannot retrieve data.

    Br,
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    As I don't have any lockups, I can't say for sure what is happening on your system -> I really need logfiles from a lockup. Any perticular videos that are causing this so I can test?

    AddFilterToGraph can take a very long time to timeout, if a previous graph was not cleaned correctly...

    The while loop should in no case lock the GUI as it is executed in background. If the Thread can't be started the while loop is never executed and the MonitorBufferProgress function has a complete try catch around. One problem I see is that if the monitoring fails right in the beginning it might end clean, due to try catch but never end the while. I'll add some code to prevent that. Can you test a new build to see if that would fix your problems?
     

    te3hpurp

    Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    Yes ill get logs when system is free from family. You are right. Gui is not locked, only directshow,or maybe its that timeout you mentioned.

    No specific video that causes this. It usually happens in less than 10 videos played.

    And of course it could be that previous graph is not cleaned ok. I know those marshal com obj can be really painful. I fighted with them a lot few years back. :)
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    You can try to stop the buffering pressing ESC or STOP (but I'm sure you have noticed that already ;) and it didn't help).

    I just commited some changes, so if you are a self-compiler you can test that version.
     

    te3hpurp

    Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    I can compile. I tried allready, but provided dll wont read onlinevideos.xml, i get some null exception. Ie site list is empty. Should svn have working source, or is there some trick im not aware?
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    Make sure the PostBuildEvents are run and don't copy the compiled dll -> the one created in the ILmerge postbuild event usually copies to the correct folder already. Check the build log for successful run of the postbuild tasks.
     

    te3hpurp

    Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    Thanks, right dll works. Im trying some quick&dirty way to control timeout case=Counter inside while loop and check for persentage changes to reset counter. So far it is good.
    Br,
     

    Users who are viewing this thread

    Top Bottom