Search code examples
c++windowsprocesstermination

process termination C++


I have the following problem: I have an application (server that never ends) written in C++ running as a service containing inside the main thread also 3 threads (mainly doing IO).

In the main loop I CATCH all possible exceptions.

The process terminated and nothing was printed either by the main loop or by the threads themselves. I saw in the event log that the process stopped with code 1000.

  1. Does Windows creates Core files like in unix ?
  2. If from the event log I get a memory address, is there any way of knowing in which part in the application it occurred?
  3. Maybe this is a clue: at the same time that it happened I started another application (not the same type).

Solution

  • Does Windows creates Core files like in unix ?

    it does not, automatically. however you can enable such a files by either implementing it in your code or by using external application as windbg, or Dr. Watson

    If from the event log I get a memory address, is there any way of knowing in which part in the application it occurred?

    There is no way if in general, if you don't keep debug information files (pdb)

    Maybe this is a clue: at the same time that it happened I started another application (not the same type).

    this is not helpful information, unless both of the applications are interacted each other