HeartBeatTransmitter causes random crash (1 Viewer)

mrstef

Portal Pro
March 15, 2007
58
8
Home Country
Sweden Sweden
TV-Server Version: SVN 16615
MediaPortal Version: 0.2.3.0 Stable
MediaPortal Skin:
Windows Version: WinXP SP2
CPU Type: Intel Core2 Duo
HDD: 320 GB
Memory: 2 GB
Motherboard: HP Pavilion Laptop
Motherboard Chipset: Intel
Motherboard Bios:
Video Card: Nvidia Geforce 8600M GS
Video Card Driver:
Sound Card: Creative SB Audigy NX2 USB
Sound Card AC3:
Sound Card Driver:
1. TV Card: FireDTV
1. TV Card Type: DVB-T
1. TV Card Driver: 4.5N
2. TV Card:
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: Nvidia Purevideo
MPEG2 Audio Codec: AC3Filter
Satelite/CableTV Provider: Swedish Boxer
HTPC Case:
Cooling:
Power Supply:
Remote:
TV: Samsung LCD
TV - HTPC Connection: HDMI

I get a random crash while watching full screen TV. The crash occurs after having watched a channel for quite some time. There is no interaction with Mediaportal when it crashes, I just sit back and enjoy when it suddenly crashes. The crash appears maybe 3 times a week or something like that. The stacktrace from the exception seems to be:

ExceptionType: System.NullReferenceException
Message: Objektreferensen har inte angetts till en instans av ett objekt.
Source: TvPlugin

Stack trace:
vid TvPlugin.TVHome.HeartBeatTransmitter()
vid System.Threading.ThreadHelper.ThreadStart_Context(Object state)
vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
vid System.Threading.ThreadHelper.ThreadStart()

When it crashes, one of two things happens:

1) The screen freezes, and the Windows XP "Your application has crashed"-window appears behind MediaPortal.
2) The screen freezes for 3-5 seconds, I can see the WinXP "Your application has crashed" flicker before it disappears behind MediaPortal, and then the TV resumes. If I try to stop the TV and start it again, it most oftenly crashes and I have to restart MediaPortal.

I have attached full logs for scenario 1 above!

Best Regards
 

gibman

Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    I could try a safer approach ;

    Log.Debug("TVHome: sending HeartBeat signal to server.");
    try
    {
    RemoteControl.Instance.HeartBeat(TVHome.Card.User);
    }
    catch (Exception e)
    {
    Log.Debug("TVHome: failed sending HeartBeat signal to server. ({0})", e.Message);
    }

    Its in SVN.
    It merely ignores any errors encountered and logs them instead.
    So the worst thing that could happen is that the server kicks u for being idle.

    /gibman
     

    mrstef

    Portal Pro
    March 15, 2007
    58
    8
    Home Country
    Sweden Sweden
    Great! Thanks!

    I think something similar is needed when handling plugins. I caused an exception in a plugin I wrote, which I didn't catch, and that exception wasn't caught anywhere, so I caused the whole MediaPortal to crash.

    Perhaps it would be a good idea to safeguard with try catch around all calls to plugins and just log the error.

    But of course, if I write a bad plugin, I'll have to suit myself! ;)
     

    rtv

    Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    Both ideas aren't helping MP to stability.
    Of course this takes the user's blame from gibman but the original problem remains unfixed and with all those try-catches it won't even be noticed any longer :(
     

    ykamchi

    Member
    June 23, 2006
    41
    6
    51
    TV-Server Version: 13/12
    MediaPortal Version: 13/12
    MediaPortal Skin: Blue two
    Windows Version: XP
    CPU Type: 2 dual core 2.4
    HDD:
    Memory: 2G
    Motherboard:
    Motherboard Chipset:
    Motherboard Bios:
    Video Card:
    Video Card Driver:
    Sound Card:
    Sound Card AC3:
    Sound Card Driver:
    1. TV Card: PVR150
    1. TV Card Type:
    1. TV Card Driver:
    2. TV Card:
    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: Nvidia
    MPEG2 Audio Codec:
    Satelite/CableTV Provider:
    HTPC Case:
    Cooling:
    Power Supply:
    Remote:
    TV:
    TV - HTPC Connection:


    I have the same problem. when configuring the resolution to 1920x1080 and starting TV on a full screen the TV client got stuck. The log reports "TVHome: sending HeartBeat signal to server." every 5 sec and I cannot shutdown Meiaportal. Only a hard reboot works.

    BTW - will the high resolution (when it will work) affect the TV picture quality on a full screen? I got a poor picture on full screen while within an internal window (small picture) it works great.

    Thx,
    Yohay
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    mediaportal or the tsreader filter is probably stuck somewhere - although the heartbeat code runs in its own thread.
    Thats why u see all the heart beat logging.

    Nothing to worry about there.
    /gibman
     

    ykamchi

    Member
    June 23, 2006
    41
    6
    51
    gibman,

    I cannot understand your reply. My computer got stuck and I need to reboot it. I think I should be worry :).

    Thx,
    Yohay
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    As I said, something made MP freeze - but some internal processes in MP are still running fine.
    Heartbeat is one of them.

    so even though MP has gone to heaven, heartbeat is still alive and well.

    so in other words, dont let the log fool u with all the heartbeats :)

    savy mate :) ?

    /gibman
     

    ykamchi

    Member
    June 23, 2006
    41
    6
    51
    gibman,

    So why my computer got stuck when I an using full screen on 1920x1080. Are you assuming that your code will fix it?


    and ... do you think that changing the resolution to 1920x1080 will bring a better quality to my TV picture?


    Thx,
    Yohay
     

    Marcusb

    Retired Team Member
  • Premium Supporter
  • February 16, 2005
    1,995
    29
    Melbourne
    hi ykamchi,

    What Gibman means is that the fault you are seeing is not to do with heartbeat and that the crash is due to something else.
    For that reason, you are best to start a new thread and post all details there. You'll need to post logs as well.

    Just out of interest, if you do change resolution, do you still get the crash? Maybe it's more than your gfx card can handle? You didn't post details so I can only guess ;-)
     

    Users who are viewing this thread

    Top Bottom