c++ - 如何找出应用程序崩溃的原因 - Win 10 LTSB

标签 c++ windows crash

我有使用 VS 2017 15.7.4 构建的应用程序,它是 64 位命令行 C++ 应用程序。

我已将它与所有依赖项 DLL 一起复制到装有 Windows 10 Enterprise 2016 LTSB 64 位(版本为 10.0.14393)的机器上。应用程序工作。

然后我将它复制到另一台具有相同版本 Windows 的机器上。它立即停止,消息停止工作。

编辑:找到原因,详情见评论

我试图解决的问题:

  • Visual Studio 2017 可再发行组件不会改变这种情况。
  • 事件日志有一些崩溃事件,事件 1001:没有任何有用的信息,除了所有依赖模块 dll 都已加载。
  • 事件 1000:无用
  • 事件 1005 有消息:

  • Windows cannot access the file for one of the following reasons: there is a problem with the network connection, the disk that the file is stored on, or the storage drivers installed on this computer; or the disk is missing. Windows closed the program my_program.exe because of this error.

    Program: my_program.exe File:

    The error value is listed in the Additional Data section. User Action

    1. Open the file again. This situation might be a temporary problem that corrects itself when the program runs again.
    2. If the file still cannot be accessed and
      • It is on the network, your network administrator should verify that there is not a problem with the network and that the server can be contacted.
      • It is on a removable disk, for example, a floppy disk or CD-ROM, verify that the disk is fully inserted into the computer.
    3. Check and repair the file system by running CHKDSK. To run CHKDSK, click Start, click Run, type CMD, and then click OK. At the command prompt, type CHKDSK /F, and then press ENTER.
    4. If the problem persists, restore the file from a backup copy.
    5. Determine whether other files on the same disk can be opened. If not, the disk might be damaged. If it is a hard disk, contact your administrator or computer hardware vendor for further assistance.

    Additional Data Error value: 00000000 Disk type: 0


  • 我尝试使用 VS 2017 15.8.4(不同于 15.7.4)在不同的机器上编译它,然后二进制文件在目标机器上工作。虽然,这不是解决方案,因为这台机器不用于“夜间构建”。
  • Depends 不显示任何缺失的依赖项
  • 最佳答案

    正如评论者指出我找到答案的正确方法:
    事后调试 - 附加 WinDbg - 向我显示错误是“非法指令”,该指令也是“vmovdqu”,它是 AVX 指令。并且实用程序CoreInfo显示 native CPU不支持AVX指令。解决方案是在没有此支持的情况下进行编译。

    关于c++ - 如何找出应用程序崩溃的原因 - Win 10 LTSB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52781629/

    相关文章:

    ios - 在 iOS 13 中使用 UIImagePickerController 时崩溃

    c++ 部分特化 : How can I specialize this template<class T1, 类 T2> 到此模板<类 T1>?

    c++ - boost 测试—— "The ordinal 313 could not be located"

    c++ - 矩阵矩形部分转置Cuda

    java - Windows 找不到 rmi 注册表

    iphone - 当应用程序在 ipad 中运行 10 分钟时,错误 = 24

    c++ - 使用 [] 括号访问 shared_memory 中的 std::vector 值

    C++ URLencode 库(支持 Unicode)?

    windows - Windows 上的 vscode 终端中的 `PS` 命令是什么意思?

    android - int countervalue = i.getIntExtra ("Count", 0);使应用程序崩溃