0

A user of my software is reporting that it is terminating without a "by your leave". I have catch handlers in my main thread and where it is possible on other threads. I also have a terminate handler. Most of these use StackWalker to try to generate a back trace (on Windows).

I expect that an exception may be happening on a thread where I can't install catch handlers.

Is there any way to find out what the call stack was at the time that abort() was called (on any thread) without having access to the user machine - assume the user doesn't have the skill set to run a debugger.

Thanks David

  • On Linux or macOS systems, make sure that a coredump can be generated, then get it from the user and debug locally on your own system. Windows have something similar IIRC. – Some programmer dude Dec 14 '22 at 09:23
  • 1
    Yes, have the user turn on minidump generation for your process (see [this answer](https://stackoverflow.com/a/69533972/1548468)) or add [Google Breakpad](https://github.com/google/breakpad) and have the minidump be automatically uploaded to you. – Botje Dec 14 '22 at 09:37
  • I should have been clearer in stating what I wanted! What I really want to know is what (if anything) I can do in my code to determine where the unhandled exception came from that resulted in abort() being called. Or indeed any exception that I catch. Part of the problem is that putting a stack walk into the C++ catch blocks buys next to nothing as by the time you get to the handler the stack has been fully unwound (yes I knew C++ unwound the stack, but didn't realise that meant a stack walk wasn't very helpful in a catch block. – David Partridge Dec 14 '22 at 14:24

0 Answers0