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

Discussion in '1.3.x' started by georgius, April 5, 2013.

  1. georgius
    • Premium Supporter

    georgius Retired Team Member

    Joined:
    October 31, 2010
    Messages:
    1,376
    Likes Received:
    437
    Gender:
    Male
    Occupation:
    Software Architect
    Location:
    Bratislava
    Ratings:
    +668 / 0
    Home Country:
    Slovakia Slovakia
    Show System Specs
    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).
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. HomeY
    • Team MediaPortal

    HomeY Test Group

    Joined:
    February 23, 2008
    Messages:
    6,460
    Likes Received:
    2,627
    Gender:
    Male
    Occupation:
    Network Engineer
    Location:
    ::1
    Ratings:
    +4,737 / 16
    Home Country:
    Netherlands Netherlands
    Show System Specs
    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?
     
  4. georgius
    • Premium Supporter

    georgius Retired Team Member

    Joined:
    October 31, 2010
    Messages:
    1,376
    Likes Received:
    437
    Gender:
    Male
    Occupation:
    Software Architect
    Location:
    Bratislava
    Ratings:
    +668 / 0
    Home Country:
    Slovakia Slovakia
    Show System Specs
    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.
     
    • Like Like x 1
  5. HomeY
    • Team MediaPortal

    HomeY Test Group

    Joined:
    February 23, 2008
    Messages:
    6,460
    Likes Received:
    2,627
    Gender:
    Male
    Occupation:
    Network Engineer
    Location:
    ::1
    Ratings:
    +4,737 / 16
    Home Country:
    Netherlands Netherlands
    Show System Specs
  6. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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 ?
     
    • Like Like x 1
  7. georgius
    • Premium Supporter

    georgius Retired Team Member

    Joined:
    October 31, 2010
    Messages:
    1,376
    Likes Received:
    437
    Gender:
    Male
    Occupation:
    Software Architect
    Location:
    Bratislava
    Ratings:
    +668 / 0
    Home Country:
    Slovakia Slovakia
    Show System Specs
    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 (Text):
    1. 2013-04-04 19:01:16.453125 [DVB EPG timer(4)]: WaitForPMT: Waiting for PMT 44D
    After 10 seconds:
    Code (Text):
    1. 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 (Text):
    1. 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 (Text):
    1. 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.
     
    • Like Like x 1
  8. HomeY
    • Team MediaPortal

    HomeY Test Group

    Joined:
    February 23, 2008
    Messages:
    6,460
    Likes Received:
    2,627
    Gender:
    Male
    Occupation:
    Network Engineer
    Location:
    ::1
    Ratings:
    +4,737 / 16
    Home Country:
    Netherlands Netherlands
    Show System Specs
    So are you saying this is somehow a 'setup issue' and not a Bug?
     
  9. georgius
    • Premium Supporter

    georgius Retired Team Member

    Joined:
    October 31, 2010
    Messages:
    1,376
    Likes Received:
    437
    Gender:
    Male
    Occupation:
    Software Architect
    Location:
    Bratislava
    Ratings:
    +668 / 0
    Home Country:
    Slovakia Slovakia
    Show System Specs
    Surely it is bug, but I don't have any idea why there are several processes (if I'm not wrong).
     
    • Like Like x 1
  10. georgius
    • Premium Supporter

    georgius Retired Team Member

    Joined:
    October 31, 2010
    Messages:
    1,376
    Likes Received:
    437
    Gender:
    Male
    Occupation:
    Software Architect
    Location:
    Bratislava
    Ratings:
    +668 / 0
    Home Country:
    Slovakia Slovakia
    Show System Specs
    It is fixed in GIT. What should be right status in mantis?
     
    • Like Like x 2
  11. Holzi
    • Team MediaPortal

    Holzi Super Moderator

    Joined:
    April 21, 2010
    Messages:
    7,928
    Likes Received:
    1,591
    Gender:
    Male
    Location:
    Ba-Wü
    Ratings:
    +2,228 / 8
    Home Country:
    Germany Germany
    Show System Specs
    Ready for testing and scheduled for MP 1.4.0?! :)
     
    • Like Like x 2
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!