MPstandbyHandler (1 Viewer)

peque

Moderator - Spanish Forums
  • Premium Supporter
  • August 4, 2007
    861
    99
    Home Country
    Spain Spain
    One more thing: I also see the service eating about 20% of CPU under this situation. Service must be suffering the same bug when you resume and it has to reset tv card (ss2), and starts eating CPU.

    bye!
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    Thx, i will see what i can do :)



    I am sorry, i tested it with two "unknown" devices. No problems on my machine. I can't debug if the bug does ont appear on my system.

    If you are not able to reproduce it, maybe it would be possible to make a debug release, with extensive logging. Maybe this way we could find out where it hangs exactly.

    Regards,
    grubi.
     

    josch.hh

    MP Donator
  • Premium Supporter
  • March 29, 2008
    476
    77
    Hamburg
    Home Country
    Germany Germany
    Thx, i will see what i can do :)



    I am sorry, i tested it with two "unknown" devices. No problems on my machine. I can't debug if the bug does ont appear on my system.

    If you are not able to reproduce it, maybe it would be possible to make a debug release, with extensive logging. Maybe this way we could find out where it hangs exactly.

    Regards,
    grubi.

    Can you provide the Gui logs when this effect appears...
     

    peque

    Moderator - Spanish Forums
  • Premium Supporter
  • August 4, 2007
    861
    99
    Home Country
    Spain Spain
    If I understand well the function of the parameter "AllwaysStart" in MediaPortalStart Job (if set to false, MediaPortal is started only if it was running on previous MediaPortalStop job, so before suspending), then I've got a malfunction on my system.

    This is the log of suspend/resume jobs with MediaPortal not started before suspending:

    Code:
    08/01/2009 11:27:57 - INFO	System PowerEvent: Suspend
    08/01/2009 11:27:57 - INFO	OnSuspend
    08/01/2009 11:27:57 - INFO	JobTools Load - Loading SUSPEND jobs from C:\ProgramData\MPstandbyHandler\Jobs
    08/01/2009 11:27:57 - INFO	Job Load - Loaded MediaportalStop job with 6 properties
    08/01/2009 11:27:57 - INFO	JobTools Load - Loaded 1 SUSPEND jobs
    08/01/2009 11:27:57 - INFO	JobTools Load - Loading RESUME jobs from C:\ProgramData\MPstandbyHandler\Jobs
    08/01/2009 11:27:57 - INFO	Job Load - Loaded TVServiceStop job with 6 properties
    08/01/2009 11:27:57 - INFO	Job Load - Loaded HardwareDeviceRestart job with 6 properties
    08/01/2009 11:27:57 - INFO	Job Load - Loaded TVServiceStart job with 5 properties
    08/01/2009 11:27:57 - INFO	Job Load - Loaded MediaportalStart job with 7 properties
    08/01/2009 11:27:57 - INFO	JobTools Load - Loaded 4 RESUME jobs
    08/01/2009 11:27:57 - INFO	Flags Load - Loading flags from C:\ProgramData\MPstandbyHandler\Flags-Service.xml
    08/01/2009 11:27:57 - INFO	Flags Save - Saving flags to C:\ProgramData\MPstandbyHandler\Flags-Service.xml
    08/01/2009 11:27:57 - INFO	TVServiceStart - Setting TVService run flag to True
    08/01/2009 11:27:57 - INFO	Flags Save - Saving flags to C:\ProgramData\MPstandbyHandler\Flags-Service.xml
    [b]08/01/2009 11:27:57 - INFO	MediaportalStart - Setting Mediaportal run flag to False[/b]
    08/01/2009 11:27:57 - INFO	RemoteClient - Sending: JOB==SUSPEND_000_MediaportalStop
    08/01/2009 11:27:58 - INFO	RemoteClient - Server returned command JOB==SUSPEND_000_MediaportalStop successfully identified
    08/01/2009 11:27:58 - INFO	OnSuspend - Done
    08/01/2009 12:14:10 - INFO	System PowerEvent: ResumeAutomatic
    08/01/2009 12:14:10 - INFO	OnResume
    08/01/2009 12:14:10 - INFO	Settings Load - Loading settings from C:\ProgramData\MPstandbyHandler\MPstandbyHandlerUtils.xml
    08/01/2009 12:14:10 - INFO	System PowerEvent: ResumeSuspend
    08/01/2009 12:14:10 - INFO	OnResume - Already resuming
    08/01/2009 12:14:12 - INFO	JobTools Load - Loading RESUME jobs from C:\ProgramData\MPstandbyHandler\Jobs
    08/01/2009 12:14:12 - INFO	Job Load - Loaded TVServiceStop job with 6 properties
    08/01/2009 12:14:13 - INFO	Job Load - Loaded HardwareDeviceRestart job with 6 properties
    08/01/2009 12:14:13 - INFO	Job Load - Loaded TVServiceStart job with 5 properties
    08/01/2009 12:14:13 - INFO	Job Load - Loaded MediaportalStart job with 7 properties
    08/01/2009 12:14:13 - INFO	JobTools Load - Loaded 4 RESUME jobs
    08/01/2009 12:14:13 - INFO	TVServiceStop - Delaying for 4s
    08/01/2009 12:14:17 - INFO	Process Stop - Trying to KILL TvService (30s) (id:3896)
    08/01/2009 12:14:17 - INFO	Process Stop - Successfully terminated TvService (id:3896)
    08/01/2009 12:14:17 - INFO	HardwareDeviceRestart - Trying to restart: TechniSat DVB-PC TV Star PCI
    08/01/2009 12:14:32 - INFO	HardwareDeviceRestart - Device successfully disabled: TechniSat DVB-PC TV Star PCI
    08/01/2009 12:14:32 - INFO	HardwareDeviceRestart - Waiting 3s before trying to enable: TechniSat DVB-PC TV Star PCI
    08/01/2009 12:14:36 - INFO	HardwareDeviceRestart - Device successfully enabled again: TechniSat DVB-PC TV Star PCI
    08/01/2009 12:14:36 - INFO	Service Start - Trying to start (20s): TVService
    08/01/2009 12:14:39 - INFO	Service Start - Successfully started: TVService
    08/01/2009 12:14:39 - INFO	RemoteClient - Sending: JOB==RESUME_003_MediaportalStart
    08/01/2009 12:14:39 - INFO	RemoteClient - Server returned command JOB==RESUME_003_MediaportalStart successfully identified
    08/01/2009 12:14:39 - INFO	OnResume - Done

    This is the log of suspend/resume jobs with MediaPortal started before suspending:

    Code:
    08/01/2009 12:26:40 - INFO	System PowerEvent: Suspend
    08/01/2009 12:26:40 - INFO	OnSuspend
    08/01/2009 12:26:40 - INFO	JobTools Load - Loading SUSPEND jobs from C:\ProgramData\MPstandbyHandler\Jobs
    08/01/2009 12:26:40 - INFO	Job Load - Loaded MediaportalStop job with 6 properties
    08/01/2009 12:26:40 - INFO	JobTools Load - Loaded 1 SUSPEND jobs
    08/01/2009 12:26:40 - INFO	JobTools Load - Loading RESUME jobs from C:\ProgramData\MPstandbyHandler\Jobs
    08/01/2009 12:26:41 - INFO	Job Load - Loaded TVServiceStop job with 6 properties
    08/01/2009 12:26:41 - INFO	Job Load - Loaded HardwareDeviceRestart job with 6 properties
    08/01/2009 12:26:41 - INFO	Job Load - Loaded TVServiceStart job with 5 properties
    08/01/2009 12:26:41 - INFO	Job Load - Loaded MediaportalStart job with 7 properties
    08/01/2009 12:26:41 - INFO	JobTools Load - Loaded 4 RESUME jobs
    08/01/2009 12:26:41 - INFO	Flags Save - Saving flags to C:\ProgramData\MPstandbyHandler\Flags-Service.xml
    08/01/2009 12:26:41 - INFO	TVServiceStart - Setting TVService run flag to True
    08/01/2009 12:26:41 - INFO	Flags Save - Saving flags to C:\ProgramData\MPstandbyHandler\Flags-Service.xml
    [b]08/01/2009 12:26:41 - INFO	MediaportalStart - Setting Mediaportal run flag to True[/b]
    08/01/2009 12:26:41 - INFO	RemoteClient - Sending: JOB==SUSPEND_000_MediaportalStop
    08/01/2009 12:26:41 - INFO	RemoteClient - Server returned command JOB==SUSPEND_000_MediaportalStop successfully identified
    08/01/2009 12:26:41 - INFO	OnSuspend - Done
    08/01/2009 12:27:29 - INFO	System PowerEvent: ResumeAutomatic
    08/01/2009 12:27:29 - INFO	OnResume
    08/01/2009 12:27:29 - INFO	System PowerEvent: ResumeSuspend
    08/01/2009 12:27:29 - INFO	OnResume - Already resuming
    08/01/2009 12:27:32 - INFO	JobTools Load - Loading RESUME jobs from C:\ProgramData\MPstandbyHandler\Jobs
    08/01/2009 12:27:32 - INFO	Job Load - Loaded TVServiceStop job with 6 properties
    08/01/2009 12:27:32 - INFO	Job Load - Loaded HardwareDeviceRestart job with 6 properties
    08/01/2009 12:27:32 - INFO	Job Load - Loaded TVServiceStart job with 5 properties
    08/01/2009 12:27:32 - INFO	Job Load - Loaded MediaportalStart job with 7 properties
    08/01/2009 12:27:32 - INFO	JobTools Load - Loaded 4 RESUME jobs
    08/01/2009 12:27:32 - INFO	TVServiceStop - Delaying for 4s
    08/01/2009 12:27:36 - INFO	Process Stop - Trying to KILL TvService (30s) (id:5416)
    08/01/2009 12:27:36 - INFO	Process Stop - Successfully terminated TvService (id:5416)
    08/01/2009 12:27:36 - INFO	HardwareDeviceRestart - Trying to restart: TechniSat DVB-PC TV Star PCI
    08/01/2009 12:27:50 - INFO	HardwareDeviceRestart - Device successfully disabled: TechniSat DVB-PC TV Star PCI
    08/01/2009 12:27:50 - INFO	HardwareDeviceRestart - Waiting 3s before trying to enable: TechniSat DVB-PC TV Star PCI
    08/01/2009 12:27:54 - INFO	HardwareDeviceRestart - Device successfully enabled again: TechniSat DVB-PC TV Star PCI
    08/01/2009 12:27:54 - INFO	Service Start - Trying to start (20s): TVService
    08/01/2009 12:27:57 - INFO	Service Start - Successfully started: TVService
    08/01/2009 12:27:57 - INFO	RemoteClient - Sending: JOB==RESUME_003_MediaportalStart
    08/01/2009 12:27:57 - INFO	RemoteClient - Server returned command JOB==RESUME_003_MediaportalStart successfully identified
    08/01/2009 12:27:57 - INFO	OnResume - Done

    If I'm right, in first situation MediaPortal shouldn't start, and in second one, it should be started. Well, in my system, setting "AllwayStart" to false leads in no MediaPortal start at all, whatever situation it was before. As we can see in the logs, MPstandbyHandler detects corretly the state of MediaPortal app on Suspend time... but MediaPortalStart job never starts it. If I set "AllwaysStart" to true, it's started allways, so working right in this case.

    Thank you very much.

    PD: Maybe I'm missunderstanding the funciton of this parameter "AllwaysStart"... ¿?


    Edit: More info. Here you have the log from UserAgent:

    Code:
    08/01/2009 12:45:05 :: Info :: Gui logger started (v2.0.0.3)
    08/01/2009 12:56:14 :: Info :: RemoteServer - Client connected: 127.0.0.1:49289
    08/01/2009 12:56:14 :: Info :: RemoteServer - Recieved job: SUSPEND_000_MediaportalStop
    08/01/2009 12:56:14 :: Info :: Job Load - Loaded MediaportalStop job with 6 properties
    08/01/2009 12:56:14 :: Info :: RemoteServer - Running SUSPEND_000_MediaportalStop.xml
    08/01/2009 12:56:14 :: Info :: Process Stop - Trying to KILL MediaPortal (20s) (id:5488)
    08/01/2009 12:56:14 :: Info :: Process Stop - Successfully terminated MediaPortal (id:5488)
    08/01/2009 12:56:14 :: Info :: RemoteServer - Client disconnected: 127.0.0.1:49289
    08/01/2009 12:56:14 :: Info :: RemoteServer - Started server on port 15677
    08/01/2009 12:56:14 :: Info :: RemoteServer - Waiting for client connection
    08/01/2009 13:07:20 :: Info :: RemoteServer - Client connected: 127.0.0.1:49290
    08/01/2009 13:07:46 :: Info :: RemoteServer - Recieved job: RESUME_003_MediaportalStart
    08/01/2009 13:07:46 :: Info :: Job Load - Loaded MediaportalStart job with 7 properties
    08/01/2009 13:07:46 :: Info :: RemoteServer - Running RESUME_003_MediaportalStart.xml
    08/01/2009 13:07:46 :: Info :: MediaportalStart - Mediaportal was not running on suspend, canceling start
    08/01/2009 13:07:46 :: Info :: RemoteServer - Client disconnected: 127.0.0.1:49290
    08/01/2009 13:07:46 :: Info :: RemoteServer - Started server on port 15677
    08/01/2009 13:07:46 :: Info :: RemoteServer - Waiting for client connection

    So... UserAgent is not detecting that MediaPortal was running when suspend... What I'll try to do is to do the MediaPortalStop the first job after resume, not the last before suspend... Let's see if this works. I'll update this post with the info.

    Edit: Same behaviour moving MediaPortalStop job to resume jobs. So bug confirmated.
     

    josch.hh

    MP Donator
  • Premium Supporter
  • March 29, 2008
    476
    77
    Hamburg
    Home Country
    Germany Germany
    You understood the meaning right.
    Seems like a bug.

    Edit: Plz give me the MPstandbyHandlerUser.log
     

    BachManiac

    Portal Pro
    October 15, 2007
    252
    6
    Home Country
    Austria Austria
    hi!

    when my HTPC goes to standby, the TV-Card would cut off from power, therefore I must restart tvservice on resume.

    this works perfectly under mp RC3 and mpstandbyhandler, but now with 1.0 on resume I always get the message "connection to tv-service lost", but when I enter MyTV, it works!

    So I believe, that MP should wait a few more seconds to access TV-Service on Resume.

    is there any possibility to solve this?

    greets!!

    edit: stopping and starting mp itself works, but this needs a few more seconds for the whole standby-resume. I my opinion it would be more nice when MP wouldn't have to be restartet on standby-resume.. like it worked on RC3. ;)
     

    peque

    Moderator - Spanish Forums
  • Premium Supporter
  • August 4, 2007
    861
    99
    Home Country
    Spain Spain
    Edit: Plz give me the MPstandbyHandlerUser.log
    Do you mean the file? I've added the relevant info of the MPstandbyHandlerUser log to above post (I named it UserAgent, sorry)... I can provide the file anyway, if you want.

    @BachManiac, I stop MediaPortal on suspend, and restart on standby as last job, once TV-Service has been reset.
     

    josch.hh

    MP Donator
  • Premium Supporter
  • March 29, 2008
    476
    77
    Hamburg
    Home Country
    Germany Germany
    Sorry for that...

    Have you tried to delete all config xml files reconfigure Mpsh (service restart, user exe restart)?




    @BachManiac

    hi!

    when my HTPC goes to standby, the TV-Card would cut off from power, therefore I must restart tvservice on resume.

    this works perfectly under mp RC3 and mpstandbyhandler, but now with 1.0 on resume I always get the message "connection to tv-service lost", but when I enter MyTV, it works!

    So I believe, that MP should wait a few more seconds to access TV-Service on Resume.

    is there any possibility to solve this?

    greets!!

    edit: stopping and starting mp itself works, but this needs a few more seconds for the whole standby-resume. I my opinion it would be more nice when MP wouldn't have to be restartet on standby-resume.. like it worked on RC3. ;)

    Set a delay within the properties of MP start job.
     

    peque

    Moderator - Spanish Forums
  • Premium Supporter
  • August 4, 2007
    861
    99
    Home Country
    Spain Spain
    Sorry for that...

    Have you tried to delete all config xml files reconfigure Mpsh (service restart, user exe restart)?
    Yesterday, when PC was in standby mode, our power company had some problems... After power was recovered at home and I could restat the system, MPSH had problems loading flags from xml (file got corrupted I think, so I deleted that file and reload system. flags xml was rebuilt, AND this also solved this bug about "AllwaysStart" behaviour...

    Thank you very much anyway! That tip had resolved the problem also, for sure.

    bye!
     

    peque

    Moderator - Spanish Forums
  • Premium Supporter
  • August 4, 2007
    861
    99
    Home Country
    Spain Spain
    Sorry... I was so glad to see MP start that forgot to do some more tests...

    Behaviour is a little bit buggy... sometimes is started, sometimes is not... So let me do some more tests to try to see what's happening and if I can tell you where's the problem.

    Edit: Actual behaviour in my system is: if first suspend after a system restart is done with MP running, nexts suspends/resumes MP is started, no matter how is before suspend. if first suspend after a system restart is done with MP not running, nexts suspends/resumes MP is not started, no matter how is before suspend.

    bye!
     

    Users who are viewing this thread

    Top Bottom