Page 1 of 1

MM5 installer fails if MM5 was running [#17067]

Posted: Wed Sep 02, 2020 11:06 am
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.

Re: MM5 installer fails if MM5 was running

Posted: Wed Sep 02, 2020 11:29 am
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?

Re: MM5 installer fails if MM5 was running

Posted: Wed Sep 02, 2020 12:56 pm
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.

Re: MM5 installer fails if MM5 was running

Posted: Thu Sep 03, 2020 4:08 am
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.

Re: MM5 installer fails if MM5 was running

Posted: Thu Sep 03, 2020 7:50 am
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.

Re: MM5 installer fails if MM5 was running

Posted: Mon Oct 12, 2020 12:24 pm
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.

Re: MM5 installer fails if MM5 was running

Posted: Mon Oct 12, 2020 3:25 pm
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.

Re: MM5 installer fails if MM5 was running

Posted: Mon Oct 19, 2020 8:10 am
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!

Re: MM5 installer fails if MM5 was running

Posted: Mon Oct 19, 2020 2:24 pm
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!

Re: MM5 installer fails if MM5 was running

Posted: Mon Oct 19, 2020 5:08 pm
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.

Re: MM5 installer fails if MM5 was running

Posted: Wed Nov 04, 2020 1:25 pm
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.

Re: MM5 installer fails if MM5 was running

Posted: Sat Nov 07, 2020 10:32 pm
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

Re: MM5 installer fails if MM5 was running

Posted: Tue Nov 10, 2020 10:04 am
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