FreeLibrary, madExcept and win8

delphi package - automated exception handling

Re: FreeLibrary, madExcept and win8

Postby fpiette » Thu Jan 09, 2020 2:59 pm

Here attached if a very simple DLL and calling application.
When madExcept is enabled, FreeLibrary freeze the application.
Whitout madExcept, everything is OK.
Attachments
MadExceptFreeLibrary_TestProject.zip
(60.7 KiB) Downloaded 43 times
fpiette
 
Posts: 7
Joined: Tue Jan 07, 2020 1:47 pm

Re: FreeLibrary, madExcept and win8

Postby madshi » Thu Jan 09, 2020 5:32 pm

Thanks! How urgent is this? I'm currently busy with another project. Was planning to work on a new madExcept builds later this month or early February. Can it wait that long, or is it urgent?
madshi
Site Admin
 
Posts: 10156
Joined: Sun Mar 21, 2004 5:25 pm

Re: FreeLibrary, madExcept and win8

Postby fpiette » Thu Jan 09, 2020 7:34 pm

It is not very urgent. Later this month is OK.
Thanks
fpiette
 
Posts: 7
Joined: Tue Jan 07, 2020 1:47 pm

Re: FreeLibrary, madExcept and win8

Postby fpiette » Fri Feb 21, 2020 3:47 pm

Any news about this issue?
Thanks.
fpiette
 
Posts: 7
Joined: Tue Jan 07, 2020 1:47 pm

Re: FreeLibrary, madExcept and win8

Postby madshi » Mon Mar 23, 2020 10:45 am

Hi there, and my apologies for taking so long. So here's a new build:

http://madshi.net/madCollectionUpdate.exe

You need to do 2 changes in your test project:

1) In the DLL dpr add the following line: "exports FinalizeMadExcept;".

2) In the EXE form pas change the code as follows:

Code: Select all
procedure TFreeLibraryFreeze.FreeLibraryButtonClick(Sender: TObject);
var Dll_FinalizeMadExcept : procedure;
begin
    if LibHandle = 0 then begin
        ShowMessage('Library not loaded');
        Exit;
    end;

    Dll_FinalizeMadExcept := GetProcAddress(LibHandle, 'FinalizeMadExcept');
    if @Dll_FinalizeMadExcept <> nil then
      Dll_FinalizeMadExcept;
    FreeLibrary(LibHandle);
    ShowMessage('Success!');
    LibHandle := 0;
end;

Together with the new madExcept build this should fix the problem. At least it does here, testing 32bit compiling with XE8.
madshi
Site Admin
 
Posts: 10156
Joined: Sun Mar 21, 2004 5:25 pm

Re: FreeLibrary, madExcept and win8

Postby fpiette » Mon Mar 23, 2020 11:35 am

Thanks you so much.
I will try this fix and comes back here if I still have issue. No reply from me means everyting is OK.
btw: I'm using Delphi 10.3.4.

François Piette
Embarcadero MVP
fpiette
 
Posts: 7
Joined: Tue Jan 07, 2020 1:47 pm

Previous

Return to madExcept

Who is online

Users browsing this forum: No registered users and 7 guests

cron