Mediaportal 1.02 and For The Record 1.4RC (1 Viewer)

thesystemera

Portal Pro
May 26, 2008
810
22
42
Auckland
Home Country
New Zealand New Zealand
Got this a few times while watching S-Video feed from my PVR150..

Never had TV issues before... It is either MP1.02 or the latest For The Record..

Any one else having this issue?

2009-05-13 23:09:25.461695 [ERROR][7]: VMR9: Dispose() from wrong thread
2009-05-13 23:09:25.581695 [ERROR][7]: VMR9: Error removing filter - System.InvalidCastException: Specified cast is not valid.
at DirectShowLib.IGraphBuilder.RemoveFilter(IBaseFilter pFilter)
at MediaPortal.Player.VMR9Util.Dispose()
 

tourettes

Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    2009-05-13 23:09:25.581695 [ERROR][7]: VMR9: Error removing filter - System.InvalidCastException: Specified cast is not valid.
    at DirectShowLib.IGraphBuilder.RemoveFilter(IBaseFilter pFilter)
    at MediaPortal.Player.VMR9Util.Dispose()

    Sounds like 4TR is stopping the graph from a wrong thread.
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Home Country
    Belgium Belgium
    The For The Record recorder/tuner for TV server has a built-in mechanism to make sure the IController that's passed in with the plugin's Start() method it always accessed in a thread-safe way.

    So far so good, however, the actual call itself may indeed come from a different thread and apparently this is causing the above issue :(

    But what is the official way to call IController methods after a plugin's Start() has ended (in other words: from a background thread). The main thread is under control of TvService, so how can a plugin "play nice"?

    With the required information I'll fix this asap.

    [EDIT]
    Perhaps I should simply use RemoteControl.Instance.Foo() when I make calls to the controller? Even though I'm on the same machine as TV server?
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Home Country
    Belgium Belgium
    After some pondering, I will change the For The Record recorder/tuner to use RemoteControl.Instance in version 1.4. So it will use TV server's remoting interface and in a way will act as a "client" of TV server, which it sort of also is :)

    This will do away with any potential threading issues as far as the code in the recorder/tuner is concerned.
     

    thesystemera

    Portal Pro
    May 26, 2008
    810
    22
    42
    Auckland
    Home Country
    New Zealand New Zealand
    Thanks dvdfreak... Do you need any more logs or did that small bit of code describe it all... Any chance of a quck patch...

    It is strange, seems to effect my timeshift as well.. Quite simply I'm having random drop outs with no particular time and consistancy... Have noticed seems to happen more when I'm flipping through my STB channels with my PVR-150...

    Thanks for the prompt reply.. Think I'm gonna have to top you up over there :D
     

    thesystemera

    Portal Pro
    May 26, 2008
    810
    22
    42
    Auckland
    Home Country
    New Zealand New Zealand
    Hey I'm still having the above problem.. MediaPortal 1.02 and the latest 4TR

    2009-05-31 21:03:58.362998 [ERROR][7]: VMR9: Dispose() from wrong thread
    2009-05-31 21:03:58.506998 [ERROR][7]: VMR9: Error removing filter - System.InvalidCastException: Specified cast is not valid.
    at DirectShowLib.IGraphBuilder.RemoveFilter(IBaseFilter pFilter)
    at MediaPortal.Player.VMR9Util.Dispose()
    2009-05-31 21:04:01.330998 [ERROR][MPMain]: VMR9: Error removing filter - System.Runtime.InteropServices.InvalidComObjectException: COM object that has been separated from its underlying RCW cannot be used.
    at DirectShowLib.IGraphBuilder.RemoveFilter(IBaseFilter pFilter)
    at MediaPortal.Player.VMR9Util.Dispose()
    2009-05-31 21:04:01.567998 [ERROR][MPMain]: VMR9: Multiple instances of VMR9 running!!!
    2009-05-31 21:04:01.568998 [ERROR][MPMain]: TSReaderPlayer:exception while creating DShow graph VMR9Helper: Multiple instances of VMR9 running!!! at MediaPortal.Player.VMR9Util.AddVMR9(IGraphBuilder graphBuilder)
    at MediaPortal.Player.TSReaderPlayer.GetInterfaces(String filename)
    2009-05-31 21:04:01.568998 [ERROR][MPMain]: TSReaderPlayer:GetInterfaces() failed


    Once this error happens I can't do any thing what ever because basically 4TR has the tuner still in use and does not release it..
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Home Country
    Belgium Belgium
    I'm going to make a bold statement and call this a TV server bug. For The Record now uses RemoteControl.Instance to control TV server, and since this is the "official" API of TV server the problem must lie within it...
     

    thesystemera

    Portal Pro
    May 26, 2008
    810
    22
    42
    Auckland
    Home Country
    New Zealand New Zealand
    I agree.. Just trying to gather attention to the issue... It could be a codec issue but I've tried a few different codecs and still with no luck... AARRGG
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    I'm going to make a bold statement and call this a TV server bug. For The Record now uses RemoteControl.Instance to control TV server, and since this is the "official" API of TV server the problem must lie within it...

    If you look more closely the error log its not happening on the server side, but instead on the client side. I.e. when stopping the playback directshow graph someone is calling the stop from wrong thread.

    I would look at the client plugin at first (not sure how much 4TR has own code for the client side).
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Hey I'm still having the above problem.. MediaPortal 1.02 and the latest 4TR

    PLease uninstall 4TR and try to reproduce the issue so we know where to look from. TVE3 users haven't reported such issue (at least I haven't seen on the forums).
     

    Users who are viewing this thread

    Top Bottom