MP2 - V2.4.1 Client stop opening when asked (1 Viewer)

jfd553

Portal Member
January 2, 2016
37
5
Home Country
Canada Canada
I am using MediaPortal 2.4.1.
I use Mediaportal almost daily but once in a while (a few times a week) the MP2 client stops opening when asked. It appears to be available/running as it shows up in the system tray and in Monitor Service. I also had this problem with the previous MP2 version. I usually have to restart the system to have it running properly again (Server and client are on the same PC).

Any idea what's going on?

Provided logs were created a few minutes after it did not open when asked.
 

Attachments

  • MediaPortal2-Logs-2022-11-27-19.44.37.zip
    511.8 KB

ge2301

Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,735
    3,501
    Stuttgart
    Home Country
    Germany Germany
    I have this issue only about once per month. I could not find any helpful traces in the log files, but it seemed the client didn't close properly before it didn't start.

    So question: Does this happen on the first start after a fresh boot or when the client was already opened at least once after the last boot?

    PS: I could resolve it by killing the MP2-client.exe via task manager before starting the client again. No reboot. It should be basically possible with a script as well (batch file, that tries to kill the process and then starts it. If the process can not be killed, it starts the clinet directly).
     

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,305
    1,884
    Home Country
    United Kingdom United Kingdom
    Thanks for the report. Looking at the logs it looks like the client did not shut down cleanly at 15:46 on the 26/11 (Client.3.log) due to a background task not terminating as expected, from the log:
    Code:
    [2022-11-26 15:46:30,511] [304029 ] [Main     ] [WARN ] - ThreadPool: Not all worker threads terminated
    I suspect this would cause the later attempts to launch the client to fail as there are some checks to ensure that only a single instance of the client is allowed to run and if the process was still hanging around because it didn't close properly then this would fail. I can't pinpoint what prevented a clean shutdown was from the logs, however it looks like the client had lots of issues trying to playback videos when it was run, e.g.
    Code:
    [2022-11-26 15:46:22,873] [296392 ] [AMQ 'PlayerContextManager'] [WARN ] - MediaPortal.UI.Players.Video.VideoPlayer: Unable to play 'Resource '{e88e64a8-0233-4fdf-ba27-0b44c6a39ae9}:///F:/Movies/Contact [FR.1997.720p].mp4' at system '12b50fe9-41ef-45a4-84ae-67a7c97f6bcb'
    System.Runtime.InteropServices.COMException (0x80040265): Cannot play back the file.  The format is not supported.
       at DirectShow.Helper.HRESULT.Throw()
       at MediaPortal.UI.Players.Video.BaseDXPlayer.SetMediaItem(IResourceLocator locator, String mediaItemTitle, MediaItem mediaItem)
       at MediaPortal.UI.Players.Video.VideoPlayerBuilder.GetPlayer(MediaItem mediaItem)
    [2022-11-26 15:46:22,874] [296393 ] [AMQ 'PlayerContextManager'] [ERROR] - Unable to create media player for media item 'Contact (1997)'
    System.Runtime.InteropServices.COMException (0x80040265): Cannot play back the file.  The format is not supported.
       at DirectShow.Helper.HRESULT.Throw()
       at MediaPortal.UI.Players.Video.BaseDXPlayer.SetMediaItem(IResourceLocator locator, String mediaItemTitle, MediaItem mediaItem)
       at MediaPortal.UI.Players.Video.VideoPlayerBuilder.GetPlayer(MediaItem mediaItem)
       at MediaPortal.UI.Services.Players.PlayerManager.BuildPlayer_NoLock(MediaItem mediaItem, ICollection`1& exceptions)
    This looks like a file system or codec issue preventing playback and may have lead to some background operation getting hung, but again I can't see any further clues in the logs
    A workaround in future would be to check Task Manager in Windows, either under the Processes tab or the Details tab, and see if you can see an instance of MP2Client still running unexpectedly and if so try closing it with End Task. This should allow you to start the client again without a full restart.
     

    jfd553

    Portal Member
    January 2, 2016
    37
    5
    Home Country
    Canada Canada
    So question: Does this happen on the first start after a fresh boot or when the client was already opened at least once after the last boot?
    Never after first start, usually after being opened several times.
    I could resolve it by killing the MP2-client.exe via task manager before starting the client again. No reboot. It should be basically possible with a script as well (batch file, that tries to kill the process and then starts it. If the process can not be killed, it starts the client directly).
    It's much smarter than rebooting the whole system every time. I'll see how I can do that (I'm not an expert) hoping it will save me a lot of frustration!
     

    jfd553

    Portal Member
    January 2, 2016
    37
    5
    Home Country
    Canada Canada
    A workaround in future would be to check Task Manager in Windows, either under the Processes tab or the Details tab, and see if you can see an instance of MP2Client still running unexpectedly and if so try closing it with End Task. This should allow you to start the client again without a full restart
    Thanks, @ge2301 just offered me the same trick
    This looks like a file system or codec issue preventing playback
    I’ll watch the latest operations (which might have hung) the next time it happens.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,735
    3,501
    Stuttgart
    Home Country
    Germany Germany
    Create an empty text file „MP2-Client.txt“ and add following content
    Code:
    taskkill /F /FI "IMAGENAME eq MP2-Client.exe"
    Start ""  "C:\Program Files (x86)\Team MediaPortal\MP2-Client\MP2-Client.exe"

    • Check, if the path enough is also valid for you and modify it in case
    • Save the file and rename the ending from *.txt to *.bat
    • Executing will force killing the client and start it again, you may always start the client using this batch file
    • The code is silent, so you won't see a console window to confirm or exit
     
    Last edited:

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,944
    1,850
    Southampton
    Home Country
    United Kingdom United Kingdom
    This also happens with MP1. :mad:

    However... I use the Ortek remote control with an AutoHotKey script that automatically checks for MP running without any windows (which is the MP1 case), and kills it if found. So I never have to do anything special to avoid this problem (such as running the BAT file that was suggested earlier).

    Ideally the MP2-client start-up code should include this check and take appropriate action. Unfortunately I don't think that the end user can solve this problem for standard MCE remote controls, as the START button on an MCE remote sends a code that is different from the Ortek remote, and I am not sure that AutoHotKey can detect the MCE code. :(

    -- from CyberSimian in the UK
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,735
    3,501
    Stuttgart
    Home Country
    Germany Germany
    However... I use the Ortek remote control with an AutoHotKey script that automatically checks for MP running without any windows (which is the MP1 case), and kills it if found. So I never have to do anything special to avoid this problem (such as running the BAT file that was suggested earlier).
    Yeah, better would be of course if the MP2-client.exe could kill running instances at first, because anyway only one instance per PC is possible.
    Maybe one of our developers has an easy solution similar to the batch file.
     

    AdHu86

    Portal Pro
    January 14, 2022
    88
    98
    Berlin
    Home Country
    England England
    @ge2301
    Thanks, I just created a batch file with your code and it works perfectly. It should be possible to integrate this into the regular client exe I believe!
     

    Users who are viewing this thread

    Top Bottom