madExcept_.bpl file deletion

delphi package - automated exception handling

madExcept_.bpl file deletion

Postby stephanemetz » Mon Nov 02, 2020 1:37 pm

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

Re: madExcept_.bpl file deletion

Postby madshi » Mon Nov 02, 2020 6:32 pm

There are other packages that depend on madExcept_.bpl, e.g. madExceptIde_.bpl and madExceptWizard_.bpl. Have you uninstalled those, as well?
madshi
Site Admin
 
Posts: 10303
Joined: Sun Mar 21, 2004 5:25 pm

Re: madExcept_.bpl file deletion

Postby stephanemetz » Tue Nov 03, 2020 7:18 am

Yes of course, I have reduced the installed packages to madBasic, madDisAsm and madExcept. Are you able to reproduce my problem on your end?
stephanemetz
 
Posts: 3
Joined: Mon Nov 02, 2020 1:08 pm

Re: madExcept_.bpl file deletion

Postby madshi » Tue Nov 03, 2020 1:26 pm

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

Re: madExcept_.bpl file deletion

Postby stephanemetz » Wed Nov 04, 2020 9:20 am

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/RADStudio/Sydney/en/10.4_Sydney_-_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
stephanemetz
 
Posts: 3
Joined: Mon Nov 02, 2020 1:08 pm

Re: madExcept_.bpl file deletion

Postby madshi » Wed Nov 04, 2020 9:31 am

I don't see anything in the 10.4.1 changelog that would explain this behaviour.
madshi
Site Admin
 
Posts: 10303
Joined: Sun Mar 21, 2004 5:25 pm


Return to madExcept

Who is online

Users browsing this forum: No registered users and 11 guests