【问题标题】:How to prevent crash from ucrtbase.dll when running .exe file in windows?在 Windows 中运行 .exe 文件时如何防止 ucrtbase.dll 崩溃?
【发布时间】:2019-03-19 06:28:29
【问题描述】:

当 PC 在 windows 上运行我的 .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;
}

问题是当我的应用调用第三方库 (DLL) 的函数时发生崩溃,所以我无法控制。

目前,ucrtbase.dll有问题吗?

如何防止在我的范围内发生这种崩溃?

【问题讨论】:

    标签: c++ windows dll


    【解决方案1】:

    显然有一个没有人发现的异常。您需要深入调用堆栈,直到到达您的代码并尝试在那里捕获异常。您需要找到调用此库代码的代码,这反过来又会导致异常。如果没有看到导致此问题的代码,就无法说出更具体的内容。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-07-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-19
      • 2011-11-25
      • 1970-01-01
      相关资源
      最近更新 更多