Shutdown exception handling for Win32/C++

后端 未结 3 703
执笔经年
执笔经年 2021-01-24 12:50

I have a process that handles exceptions great. It calls:

_set_se_translator(exception_trans_func); 
SetUnhandledExceptionFilter(UnhandledExceptionFilterHandler         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-24 13:05

    It could be that STL code is being executed during the destruction of global variables at program shutdown time and perhaps (depending on the version of STL that you're using) some global variables that it requires have already been destroyed.

    I've seen this with VS2008's STL. There are some STL lock objects that are created via a file level static during start up.

    Are you using STL in your error handler functions? It could be that one of these is going off late in program shutdown and causing the problem.

提交回复
热议问题