如何找出应用程序崩溃的原因 - Windows 10 LTSB
How to find out why application crashes - Win 10 LTSB
我有使用 VS 2017 15.7.4 构建的应用程序,它是 64 位命令行 C++ 应用程序。
我已将它与所有依赖 DLL 一起复制到具有 Windows 10 Enterprise 2016 LTSB 64 位的机器(版本号为 10.0.14393)。应用程序有效。
然后我把它复制到另一台windows相同版本的机器上。它立即停止并显示消息 stopped working.
编辑:找到原因,详情在评论
我尝试解决的问题:
- 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
- Open the file again. This situation might be a temporary problem that corrects itself when the program runs again.
- 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.
- 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.
- If the problem persists, restore the file from a backup copy.
- 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),然后二进制文件在目标机器上运行。不过,这不是解决方案,因为这台机器不用于 'nightly builds'.
- Depends 不显示任何缺失的依赖项
评论者指出我找到答案的正确方法:
事后调试 - 附加 WinDbg - 向我显示错误是 "Illegal instruction",而且该指令是 "vmovdqu",这是 AVX 指令。实用程序 CoreInfo 显示此机器 CPU 不支持 AVX 指令。解决方案是在没有此支持的情况下进行编译。
我有使用 VS 2017 15.7.4 构建的应用程序,它是 64 位命令行 C++ 应用程序。
我已将它与所有依赖 DLL 一起复制到具有 Windows 10 Enterprise 2016 LTSB 64 位的机器(版本号为 10.0.14393)。应用程序有效。
然后我把它复制到另一台windows相同版本的机器上。它立即停止并显示消息 stopped working.
编辑:找到原因,详情在评论
我尝试解决的问题:
- 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
- Open the file again. This situation might be a temporary problem that corrects itself when the program runs again.
- 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.
- 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.
- If the problem persists, restore the file from a backup copy.
- 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),然后二进制文件在目标机器上运行。不过,这不是解决方案,因为这台机器不用于 'nightly builds'.
- Depends 不显示任何缺失的依赖项
评论者指出我找到答案的正确方法: 事后调试 - 附加 WinDbg - 向我显示错误是 "Illegal instruction",而且该指令是 "vmovdqu",这是 AVX 指令。实用程序 CoreInfo 显示此机器 CPU 不支持 AVX 指令。解决方案是在没有此支持的情况下进行编译。