madExcept not catching exceptions in 64bit
madExcept not catching exceptions in 64bit
Hello,
madExcept does not seems to be catching exceptions in my main project when it's compiled in 64 bit. I already updated to the latest version and checked that the conditional define is set for all targets. This is both when launched from Delphi or with command line patching.
Basically I added some faulty code (TList.Add() on a non-initialized TList) to trigger an AV, the madExcept window shows up in 32 bit but I get a standard Windows error message (Access violation at address...) in 64 bit.
Any insight on what might prevent it from working or what I should test for?
madExcept does not seems to be catching exceptions in my main project when it's compiled in 64 bit. I already updated to the latest version and checked that the conditional define is set for all targets. This is both when launched from Delphi or with command line patching.
Basically I added some faulty code (TList.Add() on a non-initialized TList) to trigger an AV, the madExcept window shows up in 32 bit but I get a standard Windows error message (Access violation at address...) in 64 bit.
Any insight on what might prevent it from working or what I should test for?
Re: madExcept not catching exceptions in 64bit
Are we talking Delphi or BCB? Which version exactly? Can you try with a brand new almost empty test project?
Re: madExcept not catching exceptions in 64bit
My apologies, I forgot to specify, it's for a Delphi project, on XE5+Update2
Re: madExcept not catching exceptions in 64bit
Can you try with a brand new almost empty test project?
If you don't initialize a TList, it's possible that it's by random nil, then there will be no crash. It's better to test with a "raise Exception.Create('test')" or with something else which will definitely crash, e.g. "integer(nil^) := 0".
If you don't initialize a TList, it's possible that it's by random nil, then there will be no crash. It's better to test with a "raise Exception.Create('test')" or with something else which will definitely crash, e.g. "integer(nil^) := 0".
Re: madExcept not catching exceptions in 64bit
I manage to find a workaround although I'm not sure if this is a bug or a side effect of my project.
Basically we used madExcept as runtime package. It works in 32 bit mode but not in 64 bit. As soon as I removed madExcept_ from the runtime package list to use (I checked by keeping madBasic_ and madDisAsm_ but only madExcept_ seems to have an effect) the expected dialog box popped up.
Is it a known limitation? Is the best practice to link madExcept statically in the final executable/runtime package/DLL?
Basically we used madExcept as runtime package. It works in 32 bit mode but not in 64 bit. As soon as I removed madExcept_ from the runtime package list to use (I checked by keeping madBasic_ and madDisAsm_ but only madExcept_ seems to have an effect) the expected dialog box popped up.
Is it a known limitation? Is the best practice to link madExcept statically in the final executable/runtime package/DLL?
Re: madExcept not catching exceptions in 64bit
If you can link madExcept into your exe, that's good practice, as long as your runtime packages don't need to have access to any of the madExcept functions/APIs.
Hmmmm... Not sure why it doesn't work. Will put that on my to do list.
Hmmmm... Not sure why it doesn't work. Will put that on my to do list.
Re: madExcept not catching exceptions in 64bit
Thank you.
I'll link it statically for now, this is an easy workaround.
I'll link it statically for now, this is an easy workaround.