Page 1 of 1

madExcept_.bpl file deletion

Posted: Mon Nov 02, 2020 1:37 pm
by stephanemetz
Hi all,

I'm currently working under Delphi 10.4.1 with madCollection 5.1.0.
I have written a delphi package which allows me to dynamically install/uninstall .bpl files when I load my own projects.
It works fine with most bpl files except madExcept_.bpl. Indeed, after uninstalling the file, I try to delete it. But Delphi has retained control over it which prevents deletion.
To be able to delete bpl files, Delphi IDE must be closed.

You can reproduce it easely, with the Delphi package manager :
  1. Add manually madBasic_.bpl, madDisAsm_.bpl and madExcept_.bpl
  2. Remove manually madBasic_.bpl, madDisAsm_.bpl and madExcept_.bpl
  3. Try to delete bpl files in Windows Explorer: deletion is refused
I don't know, but maybe something from madExcept is not properly unregistered when the package is uninstalled, which could explain the denial during removal.
Does anyone have an explanation or a solution to fix it?

In advance, thank you for your answer.

Re: madExcept_.bpl file deletion

Posted: Mon Nov 02, 2020 6:32 pm
by madshi
There are other packages that depend on madExcept_.bpl, e.g. madExceptIde_.bpl and madExceptWizard_.bpl. Have you uninstalled those, as well?

Re: madExcept_.bpl file deletion

Posted: Tue Nov 03, 2020 7:18 am
by stephanemetz
Yes of course, I have reduced the installed packages to madBasic, madDisAsm and madExcept. Are you able to reproduce my problem on your end?

Re: madExcept_.bpl file deletion

Posted: Tue Nov 03, 2020 1:26 pm
by madshi
I've just tested this by unchecking all madCollection packages and I was able to delete madExcept_.bpl just fine. Not sure why it fails for you.

One workaround might be to rename the file and copy the the file in with the correct name. However, if the old file is still loaded, it might not be possible to load the new one. Not sure how Windows will react in that situation.

P.S: Tested with Delphi 7, though. But there's only very little difference in the code. So if it works in Delphi 7 but fails in Delphi 10.4 then it might be a bug in Delphi 10.4, I'm not sure.

Re: madExcept_.bpl file deletion

Posted: Wed Nov 04, 2020 9:20 am
by stephanemetz
You are right, this problem only appears with Delphi 10.4.1. I tested it with Delphi 10.3 and didn't encounter any issues.

It appears that the Delphi developers have improved the package system in version 10.4.1 (see http://docwiki.embarcadero.com/RADStudi ... _Release_1).

I tried cutting / pasting bpl files elsewhere and then deleting them, it works. But after when reloading madExcept bpl files, errors appear. This is weird because I have no problem with other projects BPLs

Re: madExcept_.bpl file deletion

Posted: Wed Nov 04, 2020 9:31 am
by madshi
I don't see anything in the 10.4.1 changelog that would explain this behaviour.