Lately I have experienced a number of access violation when running (F9 or just run) my BCB projects with no apparent errors in the source code (the exact same code will run one moment and fail the next). I'm not 100% sure, but it seems to me that these problems started after I installed madExcept. The problem can usually be solved by "build all", sometimes it requires me to reboot as well.
I found this on http://www.broobles.com/imapsize/news.php :
- imapsize.exe is no longer UPX compressed. It turns out that madExcept (the exception handling component) doesn't work well when the exe is compressed. This was causing intermittent errors (access violations).
I was wondering whether that might have any bearing to the problems I'm seing? Anyone else noticed this kind of behaviour?
Cheers,
Allan
[BCB5] Corrupted exe's?
UPX not only compressed the exe, but it also relocates all functions. So e.g. @GetMem is no longer where it used to be when not using UPX. Normal programs don't care that much, because UPX patches them so that they work. But madExcept relies on the function addresses which the Borland linker originally generated.
I was not aware that UPX compressed exes would crash in combination with madExcept, but I was aware that the stack traces created by madExcept are total trash when UPX is used. There's nothing I can do here, as far as I know.
Some other exe compressors like e.g. Petite don't change the function addresses and work fine with madExcept.
I was not aware that UPX compressed exes would crash in combination with madExcept, but I was aware that the stack traces created by madExcept are total trash when UPX is used. There's nothing I can do here, as far as I know.
Some other exe compressors like e.g. Petite don't change the function addresses and work fine with madExcept.
I was just qouting the UPX problem because it was the only reference I could find that reported a problem similar to the one we having.
And after trying various things over the week, I must conclude that there is something in the combination of madExcept, BCB5 and our project that produces "corrupted" exe's. As mentioned earlier, it usually takes the form of an access violation in code that has previously worked. It looks like some kind of memory address misalignment. At one point I tried to turn of the "Integrated Debugging" option and that helped, but obviously it isn't a solution.
So, unfortunately we cannot use madExcept , which is a pity since we like the product (and spent money on it).
Allan
And after trying various things over the week, I must conclude that there is something in the combination of madExcept, BCB5 and our project that produces "corrupted" exe's. As mentioned earlier, it usually takes the form of an access violation in code that has previously worked. It looks like some kind of memory address misalignment. At one point I tried to turn of the "Integrated Debugging" option and that helped, but obviously it isn't a solution.
So, unfortunately we cannot use madExcept , which is a pity since we like the product (and spent money on it).
Allan
Hmmmm... Do you think it's a bug in madExcept? Right now I've no idea what it could be or how to fix it. I remember one customer (and only one) reporting a corruption problem, but as far as I remember, it only affected some images in the resources. I think stability was not impacted.
Can you reproduce the problem somehow with a brand new project? If I was able to reproduce the problem on my PC, I could most probably find out where the problem is coming from.
Can you reproduce the problem somehow with a brand new project? If I was able to reproduce the problem on my PC, I could most probably find out where the problem is coming from.
I'm not saying it is a bug in madExcept, but everything was working normally untill we installed madExcept. It could be something in BCB5 and/or XP SP2 or whatever. But unstalling madExcept (and reinstalling BCB5) makes the problem go away.
I haven't tried to reproduce the problem with a new project, if time permits I might give it a go. Until then I suppose this will just serve as 1 count of this type of problem.
Allan
I haven't tried to reproduce the problem with a new project, if time permits I might give it a go. Until then I suppose this will just serve as 1 count of this type of problem.
Allan