madCollection and BCB64

contains all delphi packages mentioned below
Post Reply
AlexB
Posts: 4
Joined: Sun Feb 18, 2007 7:03 am

madCollection and BCB64

Post by AlexB »

Hi, madshi.
Thank you for your excellent tool.

In private correspondence, you told me that there is no official support for the c-builder-64, in particular because of problems with linking.

I managed to compile my test project (it just required manually adding all *.a files from the installation directory to it), but unfortunately the memory leak detection does not work: there is no resource leak report, I see only how a small window flickers on the program exit.

What do you think, are there any 'simple' reasons (I refer to the 'complex' reasons as the fact that the BCB64 is not supported :wink: ) for this? Any "simple" advice?
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: madCollection and BCB64

Post by madshi »

Good question, I'm not entirely sure. You could try calling "madExcept.ReportLeaksNow(false)" as the last line in the finalization section of one of your units (ideally one which is finalized very late). The problem with calling this manually is that not all finalization sections have run through yet, which means that some allocations have not been freed yet, so there will probably be some false positive leak reports. Normally, madExcept waits until your EXE actually calls ExitProcess() and only then does the leak reporting. I'm not sure why that doesn't work in BCB64 projects.
AlexB
Posts: 4
Joined: Sun Feb 18, 2007 7:03 am

Re: madCollection and BCB64

Post by AlexB »

Unfortunately nothing helps... :(
Nor "mad" exception handling, nor leaks detection.

OK, Looks like I'll have to give up trying; unsupported is unsupported, period.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: madCollection and BCB64

Post by madshi »

Sorry about that... :cry:
roddy
Posts: 2
Joined: Mon Dec 08, 2008 3:03 pm

Re: madCollection and BCB64

Post by roddy »

I'd like to vote for adding support for this. (OK, I know this is not a democracy :wink: )

My main motivation for moving from BDS2010 to RAD Studio 11 was 64-bit support, so I'm rather stuck without madExcept, which I've relied on for many years...

Let me know if I can help debug/test stuff for this. I'm happy to dive quite deep, although my assembler skills are rusty. I think the first stumbling block is the injected #pragma lines which need to be different for BCB 64bit.

https://docwiki.embarcadero.com/RADStud ... to_Linking
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: madCollection and BCB64

Post by madshi »

Hi roddy, and sorry for the late reply.

It's been an eternity since I looked into BCB 64bit support. At some point I had it working to some extent, but I was not able to make the linker happy when providing precompiled OBJ and LIB files. So after a lot of tinkering and trying and failing, I finally gave up.

To be honest, I've no idea how much BCB 64 has changed since then, it's been many years. It's possible that the same 64bit support that sorta worked back then would still work today, but recently someone tried, by copying all the madExcept.pas files into their BCB64 project folder and manually calling madExceptPatch.exe etc, and couldn't get it to work, so maybe too much has changed since then.

I'm currently extremely busy with another project, so I don't really have any time to look into BCB64 support. That said, if you want to deep dive into it, I could try to help. But if BCB64 has changed a lot, it could get ugly very fast, potentially requiring new assembler stubs and low level RTL hooks etc.
Post Reply