MM5 installer fails if MM5 was running [#17067]

Help improve MediaMonkey 5 by testing the latest pre-release builds, and reporting bugs and feature requests.

Moderator: Gurus

drakinite
Posts: 987
Joined: Tue May 12, 2020 10:06 am
Contact:

MM5 installer fails if MM5 was running [#17067]

Post by drakinite »

Hello,
So the MM5 installer does know to close MediaMonkey if it's already running, but if it does so, it fails partway through.

-

Image
This is the error I get. It seems to usually get stuck on MMHelper.dll.

-

Image
Attempting to delete the file manually says that it's open in MediaMonkey 5 Setup.

-

Image
It appears that in this circumstance, there are two MM5 Setup background tasks running; Perhaps one of them has opened MediaMonkeyHelper.dll while the other is attempting to read it.

-

I attempted to record the issue in DbgView but the setup program didn't seem to log anything to it.
It's reproducible both by running the 2266 installer when 2265 is installed+running, and by running the 2266 installer when 2266 is already installed+running.
Image
Data scientist, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
Lowlander
Posts: 58620
Joined: Sat Sep 06, 2003 5:53 pm

Re: MM5 installer fails if MM5 was running

Post by Lowlander »

I was unable to reproduce, but I tested with Portable to Portable update.

Can you reproduce if you restart the PC, start MediaMonkey and then run the installer? Are you updating a regular or portable install?
drakinite
Posts: 987
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: MM5 installer fails if MM5 was running

Post by drakinite »

Interesting. When I restarted my computer then attempted it the first time, I was unable to reproduce it (Installer worked without freezing, even when MM5 was open). However, when I did it the second time, it froze on MMHelper.dll.

I did it first on a regular install, but I was able to reproduce it on a portable install.
Image
Data scientist, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
Ludek
Posts: 5093
Joined: Fri Mar 09, 2007 9:00 am

Re: MM5 installer fails if MM5 was running

Post by Ludek »

I remember this issue appeared time from the time on MM4 too. It was Windows itself that was locking the MMHelper.dll, because this DLL registers/unregisters low level keyboard hook (for global hotkeys purposes) and low level mouse hook. So it is possible that MM was not closed properly and thus the hook was not unregitered --> resulting in Windows locking the DLL until PC restart.
drakinite
Posts: 987
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: MM5 installer fails if MM5 was running

Post by drakinite »

Interestingly enough, in this situation, MMHelper.dll does not get locked until restart. If I click Abort after it's stuck, then double check that no instances of MediaMonkey or MediaMonkey Setup are running, then re-run MediaMonkey Setup - it installs perfectly fine. The issue only occurs when the *current* installation attempt needs to automatically close MM5.
Image
Data scientist, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
drakinite
Posts: 987
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: MM5 installer fails if MM5 was running

Post by drakinite »

Same thing happened when updating from 2268 to 2269. I had MM running (and music playing) while I opened MediaMonkey_5.0.0.2269_Debug.exe. It closed MM as normal, but once it got to MMHelper.dll, it froze and gave the same error (DeleteFile failed: code 5. Access is denied.)

After hitting Abort, closing the installer and re-running the installer, it installed successfully as normal.
Image
Data scientist, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
Ludek
Posts: 5093
Joined: Fri Mar 09, 2007 9:00 am

Re: MM5 installer fails if MM5 was running

Post by Ludek »

I have reproduced the issue by running 2268 and playing a file while trying to install 2269 to the same folder.

It shown the same error during install, but inspecting the MMHelper.dll by LockHunter shown that no process is locking the file, see:
https://www.dropbox.com/s/e0ghp6svcq535 ... l.jpg?dl=0

I am going to find more, re-opened https://www.ventismedia.com/mantis/view ... 388#c19693 for checking the broadcast solution mentioned there.
drakinite
Posts: 987
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: MM5 installer fails if MM5 was running

Post by drakinite »

Thanks! Just checked with the installer for 2270, it installed without a hitch even when MM5 was running initially :grinning:

And dang, I can't believe that that issue kept coming up every so often since 2003. Holy cow. Y'all have been working on MediaMonkey for so long!
Image
Data scientist, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
Ludek
Posts: 5093
Joined: Fri Mar 09, 2007 9:00 am

Re: MM5 installer fails if MM5 was running

Post by Ludek »

drakinite wrote: Mon Oct 19, 2020 8:10 am Thanks! Just checked with the installer for 2270, it installed without a hitch even when MM5 was running initially :grinning:

And dang, I can't believe that that issue kept coming up every so often since 2003. Holy cow. Y'all have been working on MediaMonkey for so long!
:-)
I was not part of the team in 2003, but fixed it later in 2009 for MM4.
But "recently" (two years ago) the issue has been re-introduced in MM5 by fixing issue #13916

Good that you catched it ;-)

Thanks!
Peke
Posts: 18271
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: MM5 installer fails if MM5 was running

Post by Peke »

drakinite wrote: Mon Oct 19, 2020 8:10 am Thanks! Just checked with the installer for 2270, it installed without a hitch even when MM5 was running initially :grinning:

And dang, I can't believe that that issue kept coming up every so often since 2003. Holy cow. Y'all have been working on MediaMonkey for so long!
We are improving first time it took 6 years to fix then no issues for 10 years and then it took only two years to fix. Which translated that Ludek improved efficiency of our team by 3x times :roll: 8) :wink: :lol:

Wonder it there is any relations to changes in windows from XP and X(10) or not.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
drakinite
Posts: 987
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: MM5 installer fails if MM5 was running

Post by drakinite »

Looks like in the most recent builds, if Close to Tray is enabled, the installer doesn't kill MM, and instead it just closes to tray.
Also, I've had experiences where MM sometimes has a background process still running, which causes the installer to fail until I manually close them with task manager.

It might be a good idea to add an extra screen in the installer when it detects MM running, telling the user that it's force-closing it.
Image
Data scientist, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
drakinite
Posts: 987
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: MM5 installer fails if MM5 was running

Post by drakinite »

Related: I got some weird error related to popupmenu.js while attempting to update to the most recent build.
Close-to-tray was enabled, the installer attempted to close MM but my music continued playing, and I tried to right-click on the tray icon to close it. Maybe the installer closed one of the multiple MM processes, and that's what caused the error?
The bug-report sender didn't seem to send the logs successfully, but in case you did, the ID it gave me is 6D2B9B9F
Image
Data scientist, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
Ludek
Posts: 5093
Joined: Fri Mar 09, 2007 9:00 am

Re: MM5 installer fails if MM5 was running

Post by Ludek »

Thanks, I can confirm that MM installer fails to close MM when MM is closed in the tray (and fails to install).
To be fixed as https://www.ventismedia.com/mantis/view.php?id=17067
Post Reply