I have a bug somewhere that is causing my app to just vanish without an error message or something like that. The app just dissapears from the screen and it's no longer listed on the Task Manager.
The app is a C++Builder app (CBuilder2007), and I have tried everything I have think of to try to catch this error. It happens very very seldom, it has never crashed on my machine and just once in the test machines we have in the office. With one of our customers it happens a little bit more frequent, but we haven't find a way to make it happen, or to find the circumstances where it happens. It is a heavy multithreaded app.
I have madExcept enabled in this app, but it doesn't catch anything. I have already added handlers using the set_terminate
and set_unexpected
RTL routines, without any luck.
The only info I have is from a "loader app" wrapper I did, to get the return code from the main app. It exits with the C0000005
code, which I believe means an Access Violation happened. The strange thing is that, as mentioned, there is not even the Windows error box or something like that.
The question would be: any ideas to try to catch this? As I don't even have a clue where this might be happening (I have a lot of logging around the app, but the "trail" before the app crashes hasn't lead to anywhere) my idea with the set_terminate
and set_unexpected
routines was to get a stack trace to try to see where the error was generated, but so far those routines aren't being called at all (at least the only time this has happened here in my office)
Thanks in advance
[Update 22.Sept.2009] Using AddVectoredHandlerException I was able to get a callstack from the crash, and now I can start trying to isolate and fix the bug. Thanks!!!