exe_common.inl中的非法指令 [英] Illegal Instruction in exe_common.inl

查看:980
本文介绍了exe_common.inl中的非法指令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。如果这不是发布该问题的正确位置,我很抱歉,但我真的需要帮助。请告诉我在哪里询问。



(我是法国人,所以我为任何英语错误道歉)


上下文


我有一个Visual Studio项目,它是从OpenFace开发的,OpenFace是一个免费的开源库,在该地址下载:https://github.com/ TadasBaltrusaitis / OpenFace。 "从......开发"因为该项目只使用OpenFace的代码。我确认该项目不是由我制作的,我是从私人存储库中检出的。


问题


我的项目构建了一个可执行文件,但没有运行,在第223行的文件exe_common.inl(不知道这个文件是什么)上的非法指令停止了,然后进入我的程序的入口点(cout<<""<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< endl'这是有罪的行:

 __ scrt_current_native_startup_state = __scrt_native_startup_state :: initialized; 

这里是该断点处的堆栈跟踪:

 CamFeaturesExtractor_Affich.exe!dlib :: get_global_clock(void)
CamFeaturesExtractor_Affich.exe!00007ff63493114e()
ucrtbase.dll!_initterm()
CamFeaturesExtractor_Affich.exe!__ scrt_common_main_seh()第223行
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUs erThreadStart()

这里确切的消息异常:

 

CamFeaturesExtractor_Affich.exe中0x00007FF63499C5B7处的未处理异常:0xC000001D:非法指令。

我做了什么



  • 将VS 2017更改为2015
  • 在x64 / x86中构建调试/发布
  • 更改配置属性中的增强指令集> C / C ++>代码生成到AVX,AVX2,SSE,SSE2,IA32,No Set ...
  • 禁用任何优化

该问题未出现在一些更新的计算机(请查看下面的我的规格)所以我的第一个猜测是说这是一个硬件问题。英特尔酷睿双核处理器不会触发异常(与我的计算机型号相同)。以下是我的规格:



  • 版本:Windows 10 Professionel
  • 版本:1511
  • 操作系统版本:10586.679
  • 处理器:Intel(R)Celeron(R)CPU 2950M @ 2.00 GHz 2.00 GHz
  • RAM:4G
  • 系统类型:OS 64位,processeur x64

如果它来自没有一些指令集的Intel Celeron,我需要一些解决方法或者我需要更换我的电脑......


如果您需要一些我忘记提供的信息,请告诉我,如果您试图帮助我,请提前感谢...

解决方案

您好AlEmerich,


感谢您在此处发帖。


>>我的项目构建一个可执行文件但没有运行,在进入我的程序的入口点之前,在第223行的文件exe_common.inl(不知道这个文件是什么)上的非法指令停止了


您能否提供有关您项目的更多信息?你的项目类型是什么?


默认情况下,链接器包含CRT库,它提供自己的启动代码。此启动代码初始化CRT库,调用全局初始值设定项,然后为控制台应用程序调用用户提供的主函数。


根据C / C ++标准, dlib :: get_global_clock
必须在执行main()之前调用。


有关详细信息,请参阅以下是本文档。


https://msdn.microsoft。 com / zh-CN / library / bb918180.aspx


另请不要忘记打开Windows设置>更新&安全 - > Windows Update,然后选择检查更新。


希望这可以为您提供帮助。


最好的问候,

Sera Yu




Hi everyone. I am sorry if this is not the right place to post that question but I really need help. Please tell me where to ask if not.

(I am french so I apologize for any English mistakes)

CONTEXT

I have a Visual Studio Project which has been developed from OpenFace, a free open-source library, downloaded at that address:https://github.com/TadasBaltrusaitis/OpenFace . "Developed from" because the project just uses the code of OpenFace. I precise that the project was not made by me, I checked out from a private repository.

PROBLEM

My project build an executable but not run, stopped by an illegal instruction at the file exe_common.inl (don't know what this file is) at the line 223, before getting into in the entry point of my programm (cout << " " << endl at the very beggining of the main() function is not executed).

Here is the guilty line:

__scrt_current_native_startup_state = __scrt_native_startup_state::initialized;

Here the stack trace at that breakpoint:

CamFeaturesExtractor_Affich.exe!dlib::get_global_clock(void)
CamFeaturesExtractor_Affich.exe!00007ff63493114e()
ucrtbase.dll!_initterm()
CamFeaturesExtractor_Affich.exe!__scrt_common_main_seh() line 223
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()

Here the exact message exception:

Unhandled exception at 0x00007FF63499C5B7 in CamFeaturesExtractor_Affich.exe: 0xC000001D: Illegal Instruction.

WHAT I TRIED

  • Change VS 2017 to 2015
  • Build in Debug/Release in x64/x86
  • Change Enhanced Instruction Set in Configuration Properties > C/C++ > Code Generation to AVX, AVX2, SSE, SSE2, IA32, No Set...
  • Disable any optimization

That problem doesn't appear on some more recent computer (check below for my spec) so my first guess is to say that is a hardware problem. The exception is not triggered on Intel Core Duo (on the same model of computer than mine). Here is my specs:

  • Edition : Windows 10 Professionel
  • Version : 1511
  • OS Version : 10586.679
  • Processor : Intel(R) Celeron(R) CPU 2950M @ 2.00 GHz 2.00 GHz
  • RAM : 4G
  • System type : OS 64 bits, processeur x64

If it comes from Intel Celeron which not having some instruction set, I need some workaround or I will need to change my computer...

Let me know if you need some informations I forgot to provide and thanks in advance if you try to help me...

解决方案

Hi AlEmerich,

thanks for posting here.

>>My project build an executable but not run, stopped by an illegal instruction at the file exe_common.inl (don't know what this file is) at the line 223, before getting into in the entry point of my program

Could you please provide more information about your project? What's your project type?

By default, the linker includes the CRT library, which provides its own startup code. This startup code initializes the CRT library, calls global initializers, and then calls the user-provided main function for console applications.

According to the C/C++ standard, dlib::get_global_clock must be called before main() is executed.

For more information, please refer to this document below.

https://msdn.microsoft.com/en-us/library/bb918180.aspx

Also don't forget to open your Windows Settings > Update & security-> Windows Update, and select Check for updates.

Hope this could be help of you.

Best Regards,
Sera Yu


这篇关于exe_common.inl中的非法指令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆