Page 1 of 1

enable madExcept in release mode only

Posted: Mon Apr 09, 2018 11:20 am
by kjpx
Hi,

is it possible to enable madexcept automatically when I compile my project in release mode?
Up to now I have to enable/disable it manually on build a new setup.



(madExcept 4.0.18)

Re: enable madExcept in release mode only

Posted: Mon Apr 09, 2018 11:39 am
by madshi
Why do you want it disabled in debug mode?

Re: enable madExcept in release mode only

Posted: Fri May 04, 2018 8:26 am
by Han312
I also disable it by default (since it takes a lot of time on my i7 1st generation computer).
First of all when having the option 'report ressource leaks' enabled.
And I can open only some projects at the same time since I reach the 2 Gb memory limit very fast.

So I disabled it by default and patch it only in the Post-Build-Events (for the release):

"c:\Program Files (x86)\madCollection\madExcept\Tools\madExceptPatch.exe" "$(OutputPath)" "w:\\My_PostBuildRelease.mes"

The advantage is that
a) I can use different MES files for different configurations
and
b) different developers or computer can use the same madexcept settings for a release.

Re: enable madExcept in release mode only

Posted: Mon May 07, 2018 3:10 pm
by madshi
Yes, leak reporting makes everything slower and consumes a lot of RAM. So it absolutely makes sense to only enable leak reporting selectively, when you need it. But without leak reporting (and "instantly crash on buffer overrun") madExcept should not really slow your program down at all, so why disabling madExcept completely in either debug or release mode?

Re: enable madExcept in release mode only

Posted: Wed May 09, 2018 7:06 am
by Han312

Re: enable madExcept in release mode only

Posted: Thu Nov 28, 2019 4:23 pm
by madshi
Well, it's hard for me to give recommendations/suggestions if I don't fully understand the reason for why people want what they want. Maybe there's a simple workaround available? But I can't really suggest anything if I don't have all the information.

Possible reasons for not wanting to enable madExcept for release builds could be:

1) Fear that the function names and line numbers could help hackers reverse engineer the code.
2) Fear that madExcept might cause instability.
3) Fear that madExcept might slow the program down.
4) [...]

If 1) is the key problem, then obviously any solution which still embeds function names and line numbers into the code might not be deemed acceptable - unless maybe it's encrypted?

If I knew the exact reasons, I could maybe suggest a good solution, without having to go to the lengths of adding support for release vs debug builds. The problem is that once I start supporting release vs debug builds, it probably won't stop there. But then people will use custom builds and want to support that, as well. It can get complex very quickly.

Re: enable madExcept in release mode only

Posted: Fri Nov 29, 2019 8:34 am
by Han312
In my case I couldn't digitally sign the exe in postbuild as long as madexcept was enabled.
This was some years ago.
So I am not sure whether today I would have still the same problems. (But I also don't want to test it.)