Freeze on resume from standby (1 Viewer)

mba

Portal Pro
September 16, 2005
129
4
Aarhus
Home Country
Denmark Denmark
Hi

First of all thanks a bundle for the new release, beside the problem described below it is rock-stable on my setup!

TV-Server Version: 1.0
MediaPortal Version: 1.0
MediaPortal Skin: Indigo 2.4 / Blue3 Wide
Windows Version: Windows XP Home

I have observed that MP freezes occasionally when resuming from standby. This happens 2-3 times a day either when I turn on the system by remote or when MP starts automatically for recording something. I had the problem on both RC4 and now on MP 1.0 and at first I thought it was related to https://forum.team-mediaportal.com/1-0-rc4-svn-builds-299/mp-crashed-vc-runtime-error-49234/ where people was getting a "pure virtual" error.

Looking in the logs it seems that MP calls set_BlankScreen() and throws "Object reference not set to an instance of an object."

A section from the attached log where the error first happens:

2009-01-04 18:07:50.213968 [Info.][MPMain]: Main: Windows has resumed from hibernate mode
2009-01-04 18:07:51.335580 [Info.][MPMain]: Exception :confused:ystem.NullReferenceException: Object reference not set to an instance of an object.
at MediaPortal.GUI.Library.GUIGraphicsContext.set_BlankScreen(Boolean value)
at MediaPortal.GUI.Library.GUIGraphicsContext.ResetLastActivity()
at MediaPortalApp.OnResume()
at MediaPortalApp.WndProc(Message& msg)


Has anybody seens this behavior?

Best regards
Martin
 

mba

Portal Pro
September 16, 2005
129
4
Aarhus
Home Country
Denmark Denmark
thanks for the input seco but my logs indicates a completely different problem, I read some of the logs attached to the thread you refer to but they doesn't seem show the same error message.
 

rtv

Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    Code:
        public static bool BlankScreen
        {
          get { return blankScreen; }
          set
          {
            if (value != blankScreen)
            {
              if (turnOffMonitor)
              {
                if (value)
                  SendMessage(Form.ActiveForm.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, (IntPtr)MONITOR_OFF);
                else
                  SendMessage(Form.ActiveForm.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, (IntPtr)MONITOR_ON);
              }
    
              blankScreen = value;
              if (OnVideoWindowChanged != null)
                OnVideoWindowChanged();
            }
          }
        }
    Most likely in your case there's no Form handle available right after standby.

    Please try if unchecking that general option to turn the display off completely cures your issue.
     

    mba

    Portal Pro
    September 16, 2005
    129
    4
    Aarhus
    Home Country
    Denmark Denmark
    thanks rtv -

    that sounds very plausible when looking at the code. I have now removed the checkmark in the configuration.
    I downloaded MP source from SF earlier today but I wasn't able to grep the BlankScreen function, where is this located?
    What is the reason why the form object is unavailable just after resuming from standby? Is this a normal C#/.net situation or is there something wrong with my setup?

    best regards
    Martin
     

    markius

    Portal Pro
    December 26, 2006
    175
    4
    Maidstone, UK
    Home Country
    England England
    rtv

    I've done some testing here as I get the same problem.

    The configuration option that causes the problem is "Turn monitor / tv on when resuming from standby". If this option is enabled, the freeze occurs.


    In my environment I don't see any use for that option... when the PC resumes from hibernation the monitor is already on. Maybe other systems behave differently?

    Mark
     

    ketjap

    Portal Member
    July 28, 2008
    33
    1
    45
    Home Country
    Netherlands Netherlands
    When I wake up my system MP also hangs. This occurs probably when MP did a wakekup earlier when the display was turned off to grap EPG data etc. I will now try to turn off the option "Turn monitor / tv on when resuming from standby". My logs are attached.
     

    ketjap

    Portal Member
    July 28, 2008
    33
    1
    45
    Home Country
    Netherlands Netherlands
    So far so good. The option "Turn monitor / tv on when resuming from standby" seems to work for me.
     

    ketjap

    Portal Member
    July 28, 2008
    33
    1
    45
    Home Country
    Netherlands Netherlands
    Didn't work :(

    rtv, is this possible fix in the weekly testbuild of this week?
     

    Users who are viewing this thread

    Top Bottom