简体   繁体   English

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

[英]How to find out why application crashes - Win 10 LTSB

I have application built with VS 2017 15.7.4, it is 64-bit command-line C++ app. 我有使用VS 2017 15.7.4构建的应用程序,它是64位命令行C ++应用程序。

I have copied it with all dependency DLL's to machine with Windows 10 Enterprise 2016 LTSB 64bit (ver says Version 10.0.14393). 我已将所有依赖项DLL复制到具有Windows 10 Enterprise 2016 LTSB 64位的计算机上(版本为10.0.14393)。 Application works. 应用程序有效。

Then I copied it to another machine with the same version of windows. 然后,我将其复制到具有相同版本Windows的另一台计算机上。 There it stops right away with message stopped working . 消息立即停止 ,并在那里停止工作

edit: found the cause, details are in comments 编辑:找到原因,详细信息在注释中

What I tried to fix the problem: 我试图解决的问题:

  • Visual Studio 2017 redistributables do not change the situation. Visual Studio 2017可再发行内容不会更改这种情况。
  • Event log has some events for crash, event 1001: without any useful information except that all dependency module dll's have been loaded. 事件日志中有一些崩溃事件,事件1001:没有任何有用的信息,只不过已经加载了所有依赖模块dll。
  • Event 1000: nothing of use 事件1000:无用
  • Event 1005 has message: 事件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; Windows由于以下原因之一无法访问该文件:网络连接,文件存储在的磁盘或此计算机上安装的存储驱动程序有问题; or the disk is missing. 或磁盘丢失。 Windows closed the program my_program.exe because of this error. Windows由于此错误关闭了程序my_program.exe。

Program: my_program.exe File: 程序:my_program.exe文件:

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. 它位于可移动磁盘(例如软盘或CD-ROM)上,请验证该磁盘已完全插入计算机中。
  3. Check and repair the file system by running CHKDSK. 通过运行CHKDSK检查并修复文件系统。 To run CHKDSK, click Start, click Run, type CMD, and then click OK. 若要运行CHKDSK,请单击“开始”,单击“运行”,键入CMD,然后单击“确定”。 At the command prompt, type CHKDSK /F, and then press ENTER. 在命令提示符下,键入CHKDSK / F,然后按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 其他数据错误值:00000000磁盘类型:0

  • I tried to compile it on different machine, with VS 2017 15.8.4 (different from 15.7.4) and then the binary works on the target machine. 我尝试使用VS 2017 15.8.4(与15.7.4不同)在不同的计算机上编译它,然后二进制文件在目标计算机上工作。 Though, this is not solution, because this machine is not used for 'nightly builds'. 但是,这不是解决方案,因为该机器不用于“每晚构建”。
  • Depends does not show any missing dependencies Depends不显示任何缺少的依赖项

As commenters pointed me to correct way of finding the answer: Postmortem debugging - attaching WinDbg - showed me that error was "Illegal instruction", also that instruction was "vmovdqu" which is AVX instruction. 正如评论员指出的那样,我找到了找到答案的正确方法:事后调试-附加WinDbg-向我显示错误是“非法指令”,而该指令也是“ vmovdqu”,这是AVX指令。 And utility CoreInfo shows that this machine CPU does not support AVX instructions. 而且实用程序CoreInfo显示该计算机CPU不支持AVX指令。 Solution is to compile without this support. 解决方案是在没有这种支持的情况下进行编译。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用静态文本控件时,C ++ Win32应用程序连续崩溃。 不知道为什么 - C++ Win32 application continuously crashes when working with static text control. Can't figure out why 如果应用程序崩溃(例如segfault或未处理的异常),由于某些Win10更新,它现在似乎无声地死掉了 - If application crashes (eg. segfault or unhandled exception), since some Win10 update it now seems to die silently 如何找到Win32对话框为什么挂起? - How to find why win32 dialog drawing hangs? Win7 / Eclipse / OpenCV / MinGW:每次启动时应用程序崩溃 - Win7 / Eclipse / OpenCV / MinGW: Application crashes everytime it starts 如何找出GetObject失败的原因? - How to find out the reason why GetObject failed? Win32文件已锁定以供阅读:如何找出锁定它们的人 - Win32 files locked for reading: how to find out who's locking them 从Windows 10上的Win32 GUI应用程序输出到控制台 - Output to console from a Win32 GUI application on Windows 10 Windows Universal App和桌面应用程序之间的IPC通信(Win 10) - IPC Communication between Windows Universal App and Desktop application (Win 10) 我的应用程序在KNearest :: find_nearest崩溃 - my application crashes at KNearest::find_nearest C ++ string :: find使应用程序崩溃 - C++ string::find crashes application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM