nfengine icon indicating copy to clipboard operation
nfengine copied to clipboard

Handle segmentation fault (aka. access violation)

Open Witek902 opened this issue 9 years ago • 3 comments

When a segmentation fault occurrs we could catch it and print last log message containing stack trace and other useful debug info. Check if it is possible on Windows also.

Witek902 avatar Sep 03 '15 13:09 Witek902

Not sure if You're talking about structured exceptions or obtaining stack trace, but: • We can use VS /EHa exception handling model option • Here is a little guide about structured and typed cpp exceptions

About stack trace and useful debug info...do we have this implemented? I remember there was discussion and some nice links in Error Handling issue.

mkulagowski avatar Sep 03 '15 13:09 mkulagowski

  1. If Windows SEH can be done as easly as signal catchig in Linux, then OK.
  2. No, stacktrace is not implemented yet.

Witek902 avatar Sep 03 '15 14:09 Witek902

This can be useful: https://randomascii.wordpress.com/2012/07/22/more-adventures-in-failing-to-crash-properly/

Witek902 avatar Sep 29 '16 12:09 Witek902