madExcept_.bpl file deletion

delphi package - automated exception handling
Post Reply
stephanemetz
Posts: 3
Joined: Mon Nov 02, 2020 1:08 pm

madExcept_.bpl file deletion

Post 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.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: madExcept_.bpl file deletion

Post by madshi »

There are other packages that depend on madExcept_.bpl, e.g. madExceptIde_.bpl and madExceptWizard_.bpl. Have you uninstalled those, as well?
stephanemetz
Posts: 3
Joined: Mon Nov 02, 2020 1:08 pm

Re: madExcept_.bpl file deletion

Post 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?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: madExcept_.bpl file deletion

Post 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.
stephanemetz
Posts: 3
Joined: Mon Nov 02, 2020 1:08 pm

Re: madExcept_.bpl file deletion

Post 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
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: madExcept_.bpl file deletion

Post by madshi »

I don't see anything in the 10.4.1 changelog that would explain this behaviour.
Post Reply