Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/147.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 在windows中运行.exe文件时,如何防止ucrtbase.dll崩溃?_C++_Windows_Dll - Fatal编程技术网

C++ 在windows中运行.exe文件时,如何防止ucrtbase.dll崩溃?

C++ 在windows中运行.exe文件时,如何防止ucrtbase.dll崩溃?,c++,windows,dll,C++,Windows,Dll,当电脑在windows上运行my.exe文件时,它会在ucrtbase.dll中崩溃,如下所示: extern "C" LONG WINAPI __scrt_unhandled_exception_filter(LPEXCEPTION_POINTERS const pointers) { auto const exception_record = reinterpret_cast<EHExceptionRecord*>(pointers->ExceptionRecord

当电脑在windows上运行my.exe文件时,它会在ucrtbase.dll中崩溃,如下所示:

extern "C" LONG WINAPI __scrt_unhandled_exception_filter(LPEXCEPTION_POINTERS const pointers)
{
    auto const exception_record = reinterpret_cast<EHExceptionRecord*>(pointers->ExceptionRecord);
    if (PER_IS_MSVC_PURE_OR_NATIVE_EH(exception_record))
    {
        terminate(); // Crash here
    }

    return EXCEPTION_CONTINUE_SEARCH;
}
extern“C”长WINAPI\uuuSCRT\uUnhandled\uException\uFilter(LPEXCEPTION\uPointers常量指针)
{
自动常量异常记录=重新解释强制转换(指针->异常记录);
如果(PER_是_MSVC_PURE_或_NATIVE_EH(例外记录))
{
terminate();//在此崩溃
}
返回异常\u继续\u搜索;
}
问题是,当我的应用程序调用第三方库(DLL)的函数时会发生崩溃,因此我无法控制这一点

目前,ucrtbase.dll是否存在任何问题


如何在我的范围内防止此崩溃?

显然有一个例外,没有人发现。您需要深入调用堆栈,直到到达您的代码,并尝试捕获那里的异常。您需要找到调用此库的代码的代码,这反过来又会导致异常。如果没有看到导致这种情况的代码,就不能说得更具体。

显然有一个例外,没有人发现。您需要深入调用堆栈,直到到达您的代码,并尝试捕获那里的异常。您需要找到调用此库的代码的代码,这反过来又会导致异常。如果没有看到导致这种情况的代码,就不能说得更具体