TV service crashing again (2 Viewers)

Spooky

MP Donator
  • Premium Supporter
  • February 14, 2005
    1,187
    47
    void 4tl
    Home Country
    Austria Austria
    TV server:
    MediaPortal Version: 1.2.2.0
    Windows Version: Win XP SP3
    CPU Type: AMD Athlon 64 X2 4800+
    Memory: 2x Corsair CM2X1024-6400C4 + 1x Kingston 2G-UDIMM
    Motherboard: Gigabyte GA-MA78GM-S2H
    1. TV Card: TechnoTrend S2-3200 HDTV-S2 CI
    1. TV Card Type: DVB-S2
    1. TV Card Driver: 5.0.1.8
    Satelite/CableTV Provider: Astra 19.2°E

    I had a similar topic some time ago, but I decided to make a new one, since the crashes occur differently now. Due to the crashes back then, I decided to make a completely fresh installation with MediaPortal 1.2.1.0 and also use a FloppyDTV-S2 instead of the S2-3200. This generally worked a lot better, at least I experienced no such crashes of the TV Server (and everything else went a lot smoother as well). However, my FloppyDTV suffers from the 'sequence 3 problem' now. Thus I switched back to the S2-3200 momentarily, to check if it works better now, or if I still experience crashes then.

    Well, as it turns out, it crashes, but the crashes are different. When the TV Service crashed and I try to open the configuration, I get this error message after some time:

    tvserviceerror.png


    The error.log contains these entries:
    Code:
    2012-01-06 13:59:37.671875 [DVB EPG timer(12)]: Exception   :System.Runtime.Remoting.RemotingException: Der angeforderte Dienst wurde nicht gefunden.
    
    Server stack trace: 
       bei System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
    
    Exception rethrown at [0]: 
       bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       bei TvControl.IController.IsRecording(IUser& user)
       bei TvService.EpgCard.IsCardIdle(Int32 cardId)
       bei TvService.EpgCard.GrabEpgForChannel(Channel channel, IChannel tuning, Card card)
       bei TvService.EpgCard.GrabEpg()
       bei TvService.EpgGrabber.GrabEpgOnCard(EpgCard epgCard)
       bei TvService.EpgGrabber._epgTimer_Elapsed(Object sender, ElapsedEventArgs e)
    
    2012-01-06 16:17:30.787694 [TVService(6)]: TvService OnStart failed : System.Threading.ThreadAbortException: Der Thread wurde abgebrochen.
       bei System.Threading.Thread.SleepInternal(Int32 millisecondsTimeout)
       bei TvService.TvServiceThread.OnStart()
    2012-01-06 16:45:25.428319 [SetupTv(1)]: ServiceHelper: Stopping tvservice failed. Please check your installation. 
    Error: System.ServiceProcess.TimeoutException: Der Vorgang wurde nicht abgeschlossen, da der Timeout abgelaufen ist.
       bei System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)
       bei SetupTv.ServiceHelper.Stop()
    2012-01-06 16:45:35.428319 [SetupTv(1)]: Exception   :System.Runtime.Remoting.RemotingException: Das Objekt "/TvControl" wurde getrennt oder ist nicht auf dem Server vorhanden.
    
    Server stack trace: 
       bei System.Runtime.Remoting.Channels.ChannelServices.CheckDisconnectedOrCreateWellKnownObject(IMessage msg)
       bei System.Runtime.Remoting.Channels.ChannelServices.DispatchMessage(IServerChannelSinkStack sinkStack, IMessage msg, IMessage& replyMsg)
    
    Exception rethrown at [0]: 
       bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       bei TvControl.IController.get_Cards()
       bei SetupTv.Startup.Main(String[] arguments)
    The service crashed at 16:17. At 16:45 I tried to open the configuration. I don't know what the entry at 13:59 means.


    This is the tv.log entry at 16:17:
    Code:
    2012-01-06 16:17:30.709569 [EPG Update thread(5)]: schedule.SynchProgramStatesForAll
    2012-01-06 16:17:30.725194 [EPG Update thread(5)]: EPG: database updated for #0 ORF III
    2012-01-06 16:17:30.725194 [EPG Update thread(5)]: user:epg remove
    2012-01-06 16:17:30.725194 [EPG Update thread(5)]: tvcard:FreeSubChannel: subchannels count 1 subch#0 keep graph=False
    2012-01-06 16:17:30.725194 [EPG Update thread(5)]: DVB subch:0 Decompose()
    2012-01-06 16:17:30.740819 [EPG Update thread(5)]: FreeSubChannel CA: freeing sub channel : 0
    2012-01-06 16:17:30.740819 [EPG Update thread(5)]: tvcard:FreeSubChannel : no subchannels present, pausing graph
    2012-01-06 16:17:30.740819 [EPG Update thread(5)]: dvb:StopGraph called
    2012-01-06 16:17:30.740819 [EPG Update thread(5)]: tvcard:FreeAllSubChannels
    2012-01-06 16:17:30.740819 [EPG Update thread(5)]: dvb:StopGraph
    2012-01-06 16:17:30.772069 [EPG Update thread(5)]: Tvservice stopped due to an unhandled app domain exception System.AccessViolationException: Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.
       bei DirectShowLib.IMediaControl.Stop()
       bei TvLibrary.Implementations.DVB.TvCardDvbBase.StopGraph()
       bei TvLibrary.Implementations.DVB.TvCardDVBS.StopGraph()
       bei TvLibrary.Implementations.TvCardBase.FreeSubChannel(Int32 id, Boolean continueGraph)
       bei TvLibrary.Implementations.DVB.TvCardDvbBase.FreeSubChannel(Int32 id)
       bei TvService.EpgGrabbing.Stop(IUser user)
       bei TvService.TVController.StopGrabbingEpg(IUser user)
       bei TvService.EpgCard.UpdateDatabaseThread()
       bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       bei System.Threading.ThreadHelper.ThreadStart()
    2012-01-06 16:17:30.787694 [TVService(6)]: TV Service: stopping
    2012-01-06 16:17:30.787694 [TVService(6)]: TV service StopRemoting
    2012-01-06 16:17:30.787694 [TVService(6)]: Remoting stopped
    2012-01-06 16:17:30.787694 [TVService(6)]: Controller: DeInit.
    2012-01-06 16:17:30.787694 [TVService(6)]: Controller: HeartBeat monitor stopped...
    2012-01-06 16:17:30.803319 [TVService(6)]: Controller: stop streamer...
    2012-01-06 16:17:30.803319 [TVService(6)]: RTSP: stop streamer
    2012-01-06 16:17:30.803319 [TVService(6)]: RTSP: stop all streams (1)
    2012-01-06 16:17:30.803319 [TVService(6)]: RTSP: remove stream 9F9E7D48
    2012-01-06 16:17:30.803319 [TVService(6)]: Controller: streamer stopped...
    2012-01-06 16:17:30.803319 [TVService(6)]: Controller: stop scheduler...
    2012-01-06 16:17:30.818944 [TVService(6)]: Scheduler: stopped
    2012-01-06 16:17:30.818944 [TVService(6)]: Scheduler: thread stopped.
    2012-01-06 16:17:30.850194 [TVService(6)]: Controller: scheduler stopped...
    2012-01-06 16:17:30.850194 [TVService(6)]: Controller: stop epg grabber...
    2012-01-06 16:17:30.865819 [TVService(6)]: user:epg remove
    2012-01-06 16:17:30.865819 [TVService(6)]: tvcard:FreeSubChannel: subchannels count 0 subch#0 keep graph=False
    2012-01-06 16:17:30.865819 [TVService(6)]: tvcard:FreeSubChannel :0 - sub channel not found
    2012-01-06 16:17:30.865819 [TVService(6)]: tvcard:FreeSubChannel : no subchannels present, pausing graph
    2012-01-06 16:17:30.865819 [TVService(6)]: dvb:StopGraph called
    2012-01-06 16:17:30.881444 [TVService(6)]: tvcard:FreeAllSubChannels
    2012-01-06 16:17:36.397069 [RTSP Streaming thread(19)]: RTSP: Streamer stopped


    Another thing to note: when such a crash like the one at 16:17 occured and a client tries to access the TV section: he can generally enter the TV section (i.e. the TV service seems to respond to the client initially), however, when I try to open the EPG, or the channel list, or the recordings list, the client hangs indefinitely.


    My suspicion simply is, that my TT S2-3200 is simply broken. However, it would be nice if someone else could actually strengthen my suspicion by analysing these logs ;)
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    AW: TV service crashing again

    Does it work if you disable EPG grabbing?
     

    MSlater

    Portal Member
    December 23, 2011
    9
    0
    Home Country
    England England
    My Tv services crashes when watching a channel at the point a recording starts on another channel.

    I'm using a compro e-700 dual Tv card - there's nothing to suggest a problem in any of the logs. Live TV freezes and I have to physically power off to recover TV. If I try to shutdown the system never reaches poweroff.

    I've scanned the logs 10 times over and there's no error reported
     

    Spooky

    MP Donator
  • Premium Supporter
  • February 14, 2005
    1,187
    47
    void 4tl
    Home Country
    Austria Austria
    Re: AW: TV service crashing again

    Does it work if you disable EPG grabbing?
    In the original thread the crashes happened when grabbing EPG from specific channels. But this time, the crashes do not seem to be tied to EPG grabbing, or am I reading the log wrong?

    (But I'll try none the less.)
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi again Spooky

    Happy new year - I hope you are well! :)
    I'll get straight to the point: this looks like a *really* nasty problem. I'm not sure if it is a TV Server problem or a TT driver issue or a TsWriter problem or something else. What seems to be happening is a DirectShow crash when the graph is stopped:

    Code:
            FilterState state;
            ((IMediaControl)_graphBuilder).GetState(10, out state);
            if (state == FilterState.Stopped)
            {
              Log.Log.WriteFile("dvb:StopGraph filterstate already stopped, returning.");
              return;
            }
            Log.Log.WriteFile("dvb:StopGraph");
            [B]int hr = ((IMediaControl)_graphBuilder).Stop();   // CRASH HERE!!! :([/B]
            if (hr < 0 || hr > 1)
            {
              Log.Log.Error("dvb:StopGraph returns:0x{0:X}", hr);
              throw new TvException("Unable to stop graph");
            }

    To me at least it seems like a very odd way and place for a crash. I mean, the EPG grabber had been scanning away fine and then suddenly this particular time it can't stop successfully (!?! :confused:). My understanding would be that any filter in the graph (including the TT tuner and capture filters, TsWriter, and other Microsoft filters) could cause the crash.

    The last line in the TsWriter log is:

    06-01-2012 16:17:30.740 CMpTsFilter::confused:top()

    That indicates that the graph was in the process of stopping. TsWriter had been asked to stop... but it doesn't mean it had successfully stopped - there is other code that executes after that.

    It seems most likely to me that this is a problem with TsWriter (again :() rather than with your tuner. However nothing is really out of the question. I do doubt it is a hardware problem.

    Is the problem reproducible?

    MSlater: have you posted logs anywhere. Might be good if we could take a look, else we can't do anything about the problem.

    mm
     

    MSlater

    Portal Member
    December 23, 2011
    9
    0
    Home Country
    England England
    mm1352000

    Looks like I have exactly the same problem, I'm trying to debug further but it looks almost certain to be in the TSwriter.

    Some how the card driver stops responding on Graph stop. BUT only when live TV is being played (ie TSWriter is active)


    I'll continue to test and see if I can narrow it down any further.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    My hands are obviously tied without logs - I can only help as much as you let me... :)
     

    MSlater

    Portal Member
    December 23, 2011
    9
    0
    Home Country
    England England
    I'll post logs up as soon as I can. I'm re-running tests with some different drivers, there's very little to indicate a problem in the log though. The first time you see a problem is a few minutes after the crash.

    I'll post back later.
     

    Spooky

    MP Donator
  • Premium Supporter
  • February 14, 2005
    1,187
    47
    void 4tl
    Home Country
    Austria Austria
    Is the problem reproducible?

    I have deactivated EPG grabbing and so far no crash happened. I'll reactivate it again to check if the problem occurs again. Btw. contrary to before, this crash is sort of like a... half-crash. The TVserver process is still running, but when trying to open the TV server configuration, the error (screenshot) appears every time.


    These severe problems did not occur with the FloppyDTV (when it was working...), that's why I am currently assuming, that the S2-3200 itself is at fault. I also suspected a general system instability, but as indicated in my other thread, 24 hours of running Prime and several hours of memtest did not yield any errors.
     

    Spooky

    MP Donator
  • Premium Supporter
  • February 14, 2005
    1,187
    47
    void 4tl
    Home Country
    Austria Austria
    I have re-enabled EPG grabbing at 03:40. At 2012-01-08 04:02:31 another exception occured (see the *.bak files). At 11:32 I tried to access SetupTV, but the same error as described in the first post happens as well.
     

    Users who are viewing this thread

    Top Bottom