TV Service taking long while to shutdown, delaying Windows shutdown/reboot (1 Viewer)

michael_t

Portal Pro
November 30, 2008
1,258
813
Home Country
Germany Germany
...The MP1-3172 fix makes TVService react on the Windows pre-shutdown message and let it stop the TVController and all TVServer plugins cleanly. Before they were killed by the Windows Service Manager which led to exceptions and error messages in the logs. But: Though the TVService shuts down cleanly now (seen from MP's view), Windows does not notice that the TVService has been stopped and therefore now waits for 10 seconds to get a stop notification (gives an error in the System event log) and only then continues its shutdown progress. I have found no way so far how to signal Windows that the TVService has been stopped from .NET managed code.
So the options are:
- Revert the MP1-3172 fix and ignore the pre-shutdown message (will bring back exceptions and error logs but shuts down 10 sec faster)
- Keep everything as it is now (slower shutdown and error in System event log)
- Find a way to stop TVService cleanly and under control of the Windows Service manager
The latter should be achieved, so @Developers who can help?

Michael
I found a solution for the problem which triggers TV Service Stop() on receiving the pre-shutdown message and lets the Windows Service Control Manager know that the tvservice has stopped. The code is based on this blog. I reopened the MP1-3172 issue in JIRA and provided a branch in github (https://issues.team-mediaportal.com...ice_ignores_shutdown_(reopened)/MediaPortal-1).

Michael
 
Last edited:

l337

MP Donator
  • Premium Supporter
  • December 18, 2012
    238
    73
    Home Country
    Germany Germany
    which build I can download and test? thank you michael t
     

    ed76

    MP Donator
  • Premium Supporter
  • August 4, 2012
    170
    14
    43
    Home Country
    Germany Germany
    will this fix be implemented in mp 1.6 pre version?
     

    l337

    MP Donator
  • Premium Supporter
  • December 18, 2012
    238
    73
    Home Country
    Germany Germany
    Hi

    I have installed 1.6 final the shutdown time is slow i wait 40 seconds and the pc power off....

    I kill the tvserver with taskmanager and than shutdown the pc i wait 7 seconds and pc power off...

    Michael t? Ideas?
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    The fix was not included. TV Server is in code freeze and we decided this is not a serious enough problem to make an exception.
     

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    Maybe we can post binarys based on MP 1.6.0 for this issue?
    @Sebastiii are you able to do this? :)
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    The new branch reserved for it and for help to apply it on TVE35 was deleted by michael (request by elliotmc in internal cleanup git branch forum/thread).
     

    l337

    MP Donator
  • Premium Supporter
  • December 18, 2012
    238
    73
    Home Country
    Germany Germany
    if I understand correctly, this "error" only solved with TVE 35
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    TVE35 didn't have previous fix that trigger the issue, so i would say that it should work correctly.
    But when we will update TVE35 against current master (hope it will be done with no pain lol) then we need to have the shutdown fix on it).
    The PB is that this branch was deleted but we have it in master history :)
     

    Users who are viewing this thread

    Top Bottom