[MANTIS 4331] - TvService crash when tune cancelled in same time as received new PMT (1 Viewer)

georgius

Retired Team Member
  • Premium Supporter
  • October 31, 2010
    1,376
    654
    Bratislava
    Home Country
    Slovakia Slovakia
    Reported by @bart0190 in this post.

    Problem description:
    TvService crash due to unhandled exception in OnPMTReceived() method when any exception is thrown (just see TvService log, time: 2013-04-04 19:01:16.984375).
     

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    0004331: TvService crash due to unhandled exception in OnPMTReceived() method when any exception is thrown

    @georgius are you able to fix this? Should i assign this to you?
     

    georgius

    Retired Team Member
  • Premium Supporter
  • October 31, 2010
    1,376
    654
    Bratislava
    Home Country
    Slovakia Slovakia
    Yes you can. But I'm not sure if right solution is just simple try ... catch statement of everything in OnPMTReceived() method. Anyway, this method is callback from TsWriter and it should not return any error value.
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    TNX! Assigned to you. @Owlsroost any comments on the above?

    I agree with Georgius - there should be a 'pmtgrabber: do callback pid' log line in TsWriter log when it actually uses the callback, but it's not there in your logs, so maybe the 'OnPMTReceived()' exception is not actually because of the callback ?
     

    georgius

    Retired Team Member
  • Premium Supporter
  • October 31, 2010
    1,376
    654
    Bratislava
    Home Country
    Slovakia Slovakia
    I look deeper in logs and it's more than strange. In logs are missing 4 log lines - 2 from TsWriter ("pmtgrabber: got new pmt version:%x %x, service_id:%x", "pmtgrabber: do callback pid %x") and 2 from TvDvbChannel ("subch:{0} CancelTune()", "subch:{0} OnPMTReceived() pmt:{3:X} ran:{1} dynamic:{2}"). Because TvExceptionTuneCancelled exception is thrown, than _cancelled variable must be set and this happen only in CancelTune() method, which writes to log file message "subch:{0} CancelTune()".

    Another thing: EPG started waiting for PMT at 19:01:16.453:
    Code:
    2013-04-04 19:01:16.453125 [DVB EPG timer(4)]: WaitForPMT: Waiting for PMT 44D
    After 10 seconds:
    Code:
    2013-04-04 19:01:26.453125 [DVB EPG timer(4)]: WaitForPMT: Timed out waiting for PMT after 10 seconds. Increase the PMT timeout value?
    And after 10 seconds:
    Code:
    2013-04-04 19:01:36.453125 [DVB EPG timer(4)]: WaitForPMT: Timed out waiting for PMT after 10 seconds. Increase the PMT timeout value?

    How can be EPG timer working if TV service stopped working at:
    Code:
    2013-04-04 19:01:17.187500 [TVService(6)]:  stop

    This leads me to only one reason: multiple TV service processes were running at same time.

    Anyway I think that all callbacks from COM objects should be wrapped in try ... catch statements to avoid unhandled exceptions.
     

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    This leads me to only one reason: multiple TV service processes were running at same time.
    So are you saying this is somehow a 'setup issue' and not a Bug?
     

    Users who are viewing this thread

    Top Bottom