[Approved] Fix for tv service crashing with a bad signal (1 Viewer)

miroslav22

Development Group Member
  • Premium Supporter
  • September 4, 2009
    703
    460
    Warwick
    Home Country
    United Kingdom United Kingdom
    ****************
    Note to all users:

    We need help with regression testing for this patch. This means we want to make sure it doesn't introduce any problems for normal every-day use.

    Even if you do not have bad signal problems, it will still help us immensely if you could test it on your system and report back (positive feedback is as important as problem reports)

    Many thanks
    ****************

    Hi all,

    I've created a patch which I hope will fix the problem of tv service crashing when there is a bad incoming signal from the tuner. A bad signal can be caused by a thunderstorm, heavy rain/snow or it could just be weak in the area that you live in.

    The crash is caused when the incoming TV packets are corrupted in some way. TSWriter can't always deal with this and so access violations and buffer overruns can occur. (A buffer overrun means that the program has overwritten memory that is wasn't supposed to. This will usually lead to a hard crash)

    This patch introduces checks at the key areas where the crash can occur and should hopefully prevent it from happening.

    I'm looking for anyone who might be able to help with testing. I've introduced artificial corruption on my system (by deliberately overwriting the incoming data in random places), but I haven't been able to test with a 'genuine' bad signal. If anyone has any channels with a weak signal that can trigger this crash, then it'd be a big help if you could test the attached binary to see if it improves stability.

    At the moment this patch is mainly intended to improve the stability of timeshifting and recording. There may still be some stability problems in EPG grabbing, although this patch should still help.


    * Note that this is not a magic cure for a bad signal. A bad signal simply cannot be fixed so there will still be picture and sound problems.



    To install:

    Download the appropriate version of tswriter.zip
    Stop tv service
    Navigate to: "C:\Program Files\Team MediaPortal\MediaPortal TV Server\" (if you have 64bit windows, this will be "program files (x86)")
    Rename the file "tswriter.ax" to "tswriter-old.ax"
    Copy the patched version of this file to this folder.
    Start tv service


    26 June 2011 18:42 - Fixed issue which was causing packet/section parsing to fail in some places
     

    Attachments

    • tswriter segmentation fault fix v2.patch
      4.7 KB
    • TsWriter (for 1.2.0 beta).zip
      114.9 KB
    • TsWriter (for latest SVN 27991).zip
      114.9 KB
    • TsWriter (for 1.1.2, 1.1.3).zip
      120.1 KB
    • TsWriter (for latest SVN 28019).zip
      115.4 KB

    mm1352000

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

    I'll compile for 1.1.2/1.1.3. :)
     

    Jelmo

    Portal Pro
    September 8, 2007
    711
    55
    Home Country
    Germany Germany
    AW: Fix for tv service crashing with a bad signal

    Hi Miroslav,

    i will test this patch.

    Sometimes my provider ( DVB-C ) seems to have problems in there network. SO sometime 2minutes or so, no signal for all channels.
    In this case MePo chrases. So hopefully this patch will fix this.

    I will keep you up to date
     

    miroslav22

    Development Group Member
  • Premium Supporter
  • September 4, 2009
    703
    460
    Warwick
    Home Country
    United Kingdom United Kingdom
    * Sorry there is a glitch i've just found in the patch and binaries I uploaded this morning. Will upload new ones soon.
     

    miroslav22

    Development Group Member
  • Premium Supporter
  • September 4, 2009
    703
    460
    Warwick
    Home Country
    United Kingdom United Kingdom
    Fixed an issue with packet/section parsing.

    Please re-download binaries/patch file if you downloaded before the time of this post.
     

    mcrob83

    MP Donator
  • Premium Supporter
  • November 10, 2009
    206
    12
    St.Marienkirchen, Eferding
    Home Country
    Austria Austria
    AW: Fix for tv service crashing with a bad signal

    Will download your file again tomorrow...today I had severe problems when tuning non-fta channels with your tswriter.ax.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    (I'll provide an updated patch for 1.1.2 and 1.1.3 when I get home from work in 8 hours or so... :))

    [Edit: binary added to first post.]
     

    sukceso

    Portal Pro
    November 6, 2008
    181
    31
    Herrenberg
    Home Country
    Germany Germany
    I have tested the fix (MP 1.2.0 SVN) for 2 days now and it works perfectly. Before, I had sometimes problems tuning to an encrypted channel. Since I have this fix applied, I have not seen this problem any more. I cannot definitely say that it really fixed the problem yet, but so far it looks very promising. I hope that the fix will make it into MP 1.2.0.
     

    sukceso

    Portal Pro
    November 6, 2008
    181
    31
    Herrenberg
    Home Country
    Germany Germany
    Could someone please build the patch based on the latest SVN where another TsWriter patch (28015) came in?
     

    mm1352000

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

    I can do it when I get home from work tonight (if nobody does it before then). I was going to do it last night but I had a power cut just as I opened VS! :(

    mm
     

    Users who are viewing this thread

    Top Bottom