Mediaportal crash while watching TV (1 Viewer)

mikeyko

Retired Team Member
  • Premium Supporter
  • February 14, 2008
    194
    49
    Home Country
    Slovakia Slovakia
    TV-Server Version: latest SVN + IPTV patch
    MediaPortal Version: latest SVN
    MediaPortal Skin: XFace
    Windows Version: Vista x64 SP1
    CPU Type: Core 2 Duo E6750
    HDD: Samsung 500 GB
    Memory: 4 GB
    Motherboard: Asus P5K Deluxe
    Video Card: ATI HD2600 Pro
    Video Card Driver: Catalyst 8.8
    Sound Card: ADI on board
    Sound Card AC3: SPD/IF
    Sound Card Driver: 41
    1. TV Card: Avermedia Hybrid
    1. TV Card Type:
    1. TV Card Driver:
    2. TV Card: IPTV
    2. TV Card Type:
    2. TV Card Driver:
    3. TV Card:
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card:
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec: Microsoft
    MPEG2 Audio Codec: Microsoft
    h.264 Video Codec: Cyberlink 7.3
    Satelite/CableTV Provider:
    HTPC Case: Zalman 160
    Cooling:
    Power Supply: Zalman 460 W
    Remote: Zalman
    TV: Panasonic TH-42PV60EH
    TV - HTPC Connection: HDMI

    I am experiencing ocassionally Mediaportal crash while watching TV. Problem is in teletext decoder where proper array length checking is missing:

    2008-08-30 14:19:58.665000 [ERROR][17]: MediaPortal: Unhandled exception occured
    2008-08-30 14:19:58.893000 [ERROR][17]: Exception :confused:ystem.IndexOutOfRangeException: Index was outside the bounds of the array.
    at MediaPortal.Player.Teletext.PESDecoder.OnTsPacket(Byte[] tsPacket, UInt64 presentTime) in C:\work\projects\mediaportal\trunk\mediaportal\Core\Player\Teletext\PESDecoder.cs:line 130
    at MediaPortal.Player.Teletext.TeletextReceiver.OnTSPacket(IntPtr pbuf, Int32 len) in C:\work\projects\mediaportal\trunk\mediaportal\Core\Player\Teletext\TeletextReceiver.cs:line 85
    2008-08-30 14:19:58.893000 [ERROR][17]: Exception :Index was outside the bounds of the array.
    2008-08-30 14:19:58.893000 [ERROR][17]: site :Void OnTsPacket(Byte[], UInt64)
    2008-08-30 14:19:58.894000 [ERROR][17]: source :Core
    2008-08-30 14:19:58.894000 [ERROR][17]: stacktrace: at MediaPortal.Player.Teletext.PESDecoder.OnTsPacket(Byte[] tsPacket, UInt64 presentTime) in C:\work\projects\mediaportal\trunk\mediaportal\Core\Player\Teletext\PESDecoder.cs:line 130
    at MediaPortal.Player.Teletext.TeletextReceiver.OnTSPacket(IntPtr pbuf, Int32 len) in C:\work\projects\mediaportal\trunk\mediaportal\Core\Player\Teletext\TeletextReceiver.cs:line 85

    In code, it is this line:

    if (tsPacket[pos+0]==0 && tsPacket[pos+1]==0 && tsPacket[pos+2]==1)

    I can make workaround for me, but it will be better if someone from mediaportal devs will look at this and fix it in proper way

    :D
     

    mikeyko

    Retired Team Member
  • Premium Supporter
  • February 14, 2008
    194
    49
    Home Country
    Slovakia Slovakia
    I got different crash in the same source file:

    2008-08-31 10:09:41.462000 [ERROR][16]: Assertion failed in PESDecoder: About to exceed buffer size!
    2008-08-31 10:09:41.488000 [ERROR][16]: MediaPortal: Unhandled exception occured
    2008-08-31 10:09:41.576000 [ERROR][16]: Exception :confused:ystem.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
    at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
    at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)
    at MediaPortal.Player.Teletext.PESDecoder.OnTsPacket(Byte[] tsPacket, UInt64 presentTime) in C:\work\projects\mediaportal\trunk\mediaportal\Core\Player\Teletext\PESDecoder.cs:line 200
    at MediaPortal.Player.Teletext.TeletextReceiver.OnTSPacket(IntPtr pbuf, Int32 len) in C:\work\projects\mediaportal\trunk\mediaportal\Core\Player\Teletext\TeletextReceiver.cs:line 85
    2008-08-31 10:09:41.576000 [ERROR][16]: Exception :Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
    2008-08-31 10:09:41.577000 [ERROR][16]: site :Void Copy(System.Array, Int32, System.Array, Int32, Int32, Boolean)
    2008-08-31 10:09:41.577000 [ERROR][16]: source :mscorlib
    2008-08-31 10:09:41.578000 [ERROR][16]: stacktrace: at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
    at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)
    at MediaPortal.Player.Teletext.PESDecoder.OnTsPacket(Byte[] tsPacket, UInt64 presentTime) in C:\work\projects\mediaportal\trunk\mediaportal\Core\Player\Teletext\PESDecoder.cs:line 200
    at MediaPortal.Player.Teletext.TeletextReceiver.OnTSPacket(IntPtr pbuf, Int32 len) in C:\work\projects\mediaportal\trunk\mediaportal\Core\Player\Teletext\TeletextReceiver.cs:line 85

    This code is very unreliable, there is assertion that failed, but program is trying to copy the array anyway. Next bad thing - exception that is raised in this method will crash the whole mediaportal.
     

    Users who are viewing this thread

    Top Bottom