when service installed MM does not close its process after closing

Get answers about using MediaMonkey 4 for Windows.

Moderator: Gurus

surfer
Posts: 296
Joined: Fri Oct 22, 2004 4:55 am

when service installed MM does not close its process after closing

Post by surfer »

The same behaviour with the newest beta 4.2.21 and earlier versions as well since at least 2 years.
earlier and newest version of windows 10

When MM service is installed under Media Sharing, MM behaves as follows:

New start of my PC
, under Task manager 2 background processes are started:
MMservice.exe
MM (32 bit)

now i start MM:
- under Task manager / "background processes" 1 more "mm (32bit)" process gets added, "MMservice.exe" diappears: there are now 2 processes "mm (32bit)" started under "background processes"

i close MM again:
- "mm (32bit)" under "processes/apps" disappears,
- under "background processes" 1 more process "mm (32bit)" gets added, and the process "MMservice.exe" appears

... and so forth: each starting and closing of MM adds a new process "mediamonkey (32 bit)" under "background processes" and there are sometomes 10-20 of "mm (32bit)" processes open, each one at about 30-35 MB RAM and between 0,3 - 7% CPU usage.

Why do the processes not close on closing MM?


-----
An ISSUE about that - when the "service" is installed - is for example:
I use the cast feature of MMA or the andoid app "bubbleupnp" to stream music from android to mmw player. When i new start the pc all works ok.
But after starting mm and closing it the streaming does not work anymore, something gets blocked.
Last edited by surfer on Sun Jun 24, 2018 4:17 am, edited 4 times in total.
Lowlander
Posts: 56574
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: when service installed MM does not close its process after closing

Post by Lowlander »

An Addon could be preventing MediaMonkey from closing. Are you using File > Exit to close MediaMonkey (The X button may be set to close to tray)?
surfer
Posts: 296
Joined: Fri Oct 22, 2004 4:55 am

Re: when service installed MM does not close its process after closing

Post by surfer »

Thanks, lowlander! I've editet my opening topic to explain it more exactly, please take a look above.

The issue is only there when the "service" is installed under "media sharing". When "service" uninstalled MMW closes correctly.
Closing by "exit" or "X" does not change anything.

Under win10 task manager / processes there are actually 3 groups of processes: apps, background processes and windows processes.

What i wrote above is related to the "background processes" only, i.e. when closing MM ...

- the process "mediamonekey (32bit)" under "apps" closes each time as expected,
- and only a new background process "mediamonkey (32bit)" gets added each time,
- and a "MediaMonkeyService.exe" starts again: and this one - only sometimes! - disappears and changes to even one more process "mediamonkey (32bit)"
- as a result by closing MM there are - sometimes - even 2 more processes "mediamonkey (32bit)" added under "background processes".
Last edited by surfer on Wed Jun 27, 2018 4:01 am, edited 1 time in total.
Lowlander
Posts: 56574
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: when service installed MM does not close its process after closing

Post by Lowlander »

Capture it in a debug log (step 4b) and attach it to a Support Ticket: http://www.mediamonkey.com/forum/viewtopic.php?f=1&t=69
Ludek
Posts: 4959
Joined: Fri Mar 09, 2007 9:00 am

Re: when service installed MM does not close its process after closing

Post by Ludek »

Hi,
I was able to replicate the issue exactly as described with the "Backup 6.0 by trixmoto" script.
With this script I am getting "Access Denied" error on each MM close and I need to click [OK] button on the error window to close the MM.

With service installed the MediaMonkey.exe fails to close, because in the service mode no one can click [OK] button on an error dialog when closing.
So yes, in that case the MediaMonkeyService.exe process fails to close/kill the child MediaMonkey.exe process and it leaks in processes as described above.
Note that addons/scripts are loaded also in the service mode so that e.g. Magic Nodes can be shown when accessing MM served via DLNA/UPnP.

Add to Mantis as https://www.ventismedia.com/mantis/view.php?id=14915 , the service should probably force kill the MM.EXE in such a situation
Ludek
Posts: 4959
Joined: Fri Mar 09, 2007 9:00 am

Re: when service installed MM does not close its process after closing

Post by Ludek »

I've fixed it for the next build 1872.

Could you please locate your MediaMonkeyService.exe file and replace it by this one:
https://www.dropbox.com/s/x2fpslssmcg7i ... e.exe?dl=0

This should fix the issue for you, can you confirm?

Note that in order to be able to replace the file you need to either stop the service in Services > MediamonkeyService or start MediaMonkey (which stops the service temporarily while MM is running)
surfer
Posts: 296
Joined: Fri Oct 22, 2004 4:55 am

Re: when service installed MM does not close its process after closing

Post by surfer »

Thanks, Ludek!

Yes, Closing/Opening MM with service installed seems to bahave now as expected:
- start MM: only the "apps process" MM (32bit) appears
- close MM: "apps process" disappears, and 2 "background processes" appear: MMservice.exe (32bit) & MM.exe(32bit)

Unfortunately when MM closed and only the service visible under the task manager, the MM server disappears in Android MMA under "Upnp".

Only when MM is started again the "media server" appears again, normally at once, and can be seen and browsed under "MMA upnp".
But sometimes even when i start MM, the server does not appear under "upnp", so it seems in some way not reliable/stable enough in this respect.
Ludek
Posts: 4959
Joined: Fri Mar 09, 2007 9:00 am

Re: when service installed MM does not close its process after closing

Post by Ludek »

Yes, Closing/Opening MM with service installed seems to bahave now as expected:
Thanks for confirmation.
surfer wrote: Wed Jun 27, 2018 9:09 am Unfortunately when MM closed and only the service visible under the task manager, the MM server disappears in Android MMA under "Upnp".

Only when MM is started again the "media server" appears again, normally at once, and can be seen and browsed under "MMA upnp".
In my case the server disappears just for a while (while MM is closed and service isn't up yet), but as soon as the service starts the server re-appears.
i.e. it is "down" just for several seconds, isn't this the case for you?
surfer wrote: Wed Jun 27, 2018 9:09 am But sometimes even when i start MM, the server does not appear under "upnp", so it seems in some way not reliable/stable enough in this respect.
I can't replicate this, is this issue just with MMA or do you see the server in BubbleUPnP at the same time?
surfer
Posts: 296
Joined: Fri Oct 22, 2004 4:55 am

Re: when service installed MM does not close its process after closing

Post by surfer »

But sometimes even when i start MM, the server does not appear under "upnp", so it seems in some way not reliable/stable enough in this respect.
Ok, i have to observe this for some time more, it happened 2-3 times (MM started, but no MM server), but now i cannot reproduce that, hopefully it was only some sort of a "hiccups" ;)

When i close MM and only the service running, than the server normally disappears and does not reappear even after a longer time of serveral minutes, not in MMA and not in BubbleUpnp. Also restarting MMA/bubbleupnp does not solve that.
---
But sometimes the "MM server" does appear under MMA/upnp and bubbleupnp, but inspite of that i cannot browse its content because of a "connection error".


What's strange: in both bubbleupnp and MMA the windows "MM player" on the PC appears as a renderer when i want to cast a song. Which of course cannot be played because MM on the PC is not running. This was already earlier the case before you fixed the "MMservice.exe"
Post Reply