- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
这是我在 stackoverflow 上的第一个问题,所以我会尽量具体一点。我在论坛上搜索了任何相关主题,但没有成功。不管怎样,这里是:
我正在使用 Visual Studio 2005。我遇到了堆栈溢出异常:IHR.exe 中 0x775715de 处未处理的异常:0xC00000FD:堆栈溢出。 ,在尝试调试我的项目时。调用堆栈没有帮助,因为它在 ntdll.dll 处停止,甚至在进入 main() 函数之前。
起初我怀疑这可能是编译设置的问题,但是当我将在我的计算机上编译的可执行文件发送到第二台计算机时,它可以正常运行,只是不会在我的机器上运行。
同样的情况反过来发生,我在第二台计算机上编译了可执行文件,它可以在第二台计算机上运行良好。但是当我试图在我的电脑上运行在第二台电脑上编译好的可执行文件时,却无法运行。出现的只是一个空白的命令提示符和一条 Windows 消息,说明程序没有响应。
我使用的是 Windows 7 Professional SP1,64 位。另一台计算机具有相同的操作系统版本。由于公司政策,我不能在这里发布任何源代码,但无论如何我认为它与源代码没有任何关系。我怀疑这可能是运行时环境的问题。感谢任何帮助。谢谢。
这是调用堆栈中的所有内容:
->ntdll.dll!775715de()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!775715de()
ntdll.dll!7756014e()
感谢@WhozCraig 的建议,我设法在调用堆栈上获得了更有意义的消息。仍然难过。
IHR.exe!_mbscmp(const unsigned char * s1=0x00fe8c10, const unsigned char * s2=0x00fe8c10) Line 84 + 0xf bytes
IHR.exe!_mbscmp(const unsigned char * s1=0x00fe8c10, const unsigned char * s2=0x00fe8c10) Line 84 + 0xf bytes
IHR.exe!strcmp(const char * _s1=0x00fe8c10, const char * _s2=0x00fe8c10) Line 1646 + 0x2b bytes
IHR.exe!_mbscmp_l(const unsigned char * s1=0x00fe8c10, const unsigned char * s2=0x00fe8c10, localeinfo_struct * plocinfo=0x00000000) Line 58 + 0xd bytes
IHR.exe!_mbscmp(const unsigned char * s1=0x00fe8c10, const unsigned char * s2=0x00fe8c10) Line 84 + 0xf bytes
IHR.exe!strcmp(const char * _s1=0x00fe8c10, const char * _s2=0x00fe8c10) Line 1646 + 0x2b bytes
还有一些,导致上面的堆栈
IHR.exe!_mbscmp_l(const unsigned char * s1=0x00fe8c10, const unsigned char * s2=0x00fe8c10, localeinfo_struct * plocinfo=0x00000000) Line 58 + 0xd bytes C++
IHR.exe!_mbscmp(const unsigned char * s1=0x00fe8c10, const unsigned char * s2=0x00fe8c10) Line 84 + 0xf bytes C++
IHR.exe!strcmp(const char * _s1=0x00fe8c10, const char * _s2=0x00fe8c10) Line 1646 + 0x2b bytes
IHR.exe!_setlocale_get_all(threadlocaleinfostruct * ploci=0x002f13a0) Line 1147 + 0x24 bytes
IHR.exe!_setlocale_nolock(threadlocaleinfostruct * ploci=0x002f13a0, int _category=0, const char * _locale=0x00000000) Line 966 + 0x9 bytes C
IHR.exe!setlocale(int _category=0, const char * _locale=0x00000000) Line 826 + 0x1b bytes
IHR.exe!std::_Locinfo::_Locinfo_ctor(std::_Locinfo * pLocinfo=0x0018f8f8, const char * locname=0x00ea591c) Line 192 + 0x9 bytes
IHR.exe!std::_Locinfo::_Locinfo(const char * _Pch=0x00ea591c) Line 78 + 0xd bytes
IHR.exe!std::ctype::ctype(const short * _Table=0x00000000, bool _Deletetable=false, unsigned int _Refs=0) Line 1740 + 0x10 bytes
IHR.exe!std::ctype::_Getcat(const std::locale::facet * * _Ppf=0x0018fbd8) Line 1760 + 0x4d bytes IHR.exe!std::use_facet >(const std::locale & _Loc={...}) Line 478 + 0x9 bytes IHR.exe!std::basic_ios >::widen(char _Byte=' ') Line 124 + 0x34 bytes
IHR.exe!std::basic_ios >::init(std::basic_streambuf > * _Strbuf=0x00ff7908, bool _Isstd=false) Line 135 + 0xa bytes
IHR.exe!std::basic_ostream >::basic_ostream >(std::basic_streambuf > * _Strbuf=0x00ff7908, bool _Isstd=false) Line 53
IHR.exe!std::`dynamic initializer for 'cout''() Line 13 + 0x16 bytes IHR.exe!_initterm(void (void)* * pfbegin=0x00e8d10c, void (void)* * pfend=0x00e9dca0) Line 855 IHR.exe!_cinit(int initFloatingPrecision=1) Line 293 + 0xf bytes
IHR.exe!tmainCRTStartup() Line 310 + 0x7 bytes
IHR.exe!mainCRTStartup() Line 196
kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes
ntdll.dll!RtlUserThreadStart@8() + 0x27 bytes
ntdll.dll!_RtlUserThreadStart@8() + 0x1b bytes
它不断重复调用 strcmp、mbscmp、mbscmp_l,直到遇到堆栈溢出异常。
更新(2013 年 4 月 11 日):我找到了导致问题的那一行,但我仍然完全不知道为什么会导致它。这是strcmp的用法。
struct Foo
{
char text[4];
bool operator < (const Foo &rhs) const
{
return strcmp(text, rhs.text) < 0;
}
}
当这个strcmp被注释掉的时候。程序没有崩溃。处理此类问题的任何想法或经验?同一个程序在其他机器上仍然可以正常运行,但由于这条线,只会在我的机器上崩溃。 other strcmp 在整个程序中使用没有问题。谢谢
最佳答案
很可能您有全局/静态变量,并且它们试图在您运行 main 之前进行初始化。实际初始化的顺序可能不是您所期望的,就像您将它们放在不同的文件中一样,没有办法告诉它们应该以什么顺序创建。
要么删除这些变量,要么将它们安排到同一个文件中。
关于c++ - main() 之前的堆栈溢出异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15426285/
我正在寻找一种使此打印 HTML 代码 fragment 向后兼容旧 Android 版本的简单方法: @TargetApi(Build.VERSION_CODES.KITKAT) private v
我在 GCC 终端 (centos linux) 中为 ATM 项目编译以下 c 和 .h 代码时收到以下错误。请帮忙,因为我是编程新手。 validate_acc.h #ifndef _VALIDA
在写关于 SO 的不同问题的答案时,我制作了这个片段: @import url('https://fonts.googleapis.com/css?family=Shadows+Into+Light'
试图弄清楚我应该如何在 my_div_class 之前放置一个 span 而不是替换所有它。现在它取代了 div,但我不想这样做。我假设它类似于 :before 但不知道如何使用它。 { va
我正在使用选择库 http://github.hubspot.com/select/和 noUiSlider https://refreshless.com/nouislider/ .我面临的问题如下
我是开发新手,独自工作。我正在使用 Xcode 和 git 版本控制。可能我没有适本地组织和做错事,但我通常决定做 promise 只是为了在我破坏一切之前做出安全点。在那一刻,我发现很难恰本地描述我
我想确保在同一个桶和键上读取和写入时,应该更新获取的值,也就是说,应该在对其进行写入操作之后获取它。我怎样才能做到这一点? 我想要的是,如果我更新一个键的值,如果我同时使用不同线程获取值,则更新同一个
我的问题与this有关问题,已经有了答案: yes, there is a happens-before relationship imposed between actionsof the thre
The before and after hook documentation on Relish仅显示 before(:suite) 在 before(:all) 之前调用。 我什么时候应该使用其中
我有 CSV 行,我想在其中检测所有内部双引号,没有文本限定符。这几乎可以正常工作,但我的正则表达式还可以检测双引号后的字符。 CSV 部分: "7580";"Lorem ipsum";"";"Lor
是否可以通过Youtube数据API检查广告是否可以与特定视频一起显示? 我了解contentDetails.licensedContent仅显示视频是否已上传至同一伙伴然后由其声明版权。由于第三者权
考虑一下用漂亮的彩色图表描述的“像素管道” https://developers.google.com/web/fundamentals/performance/rendering/ 我有一个元素(比
之前?
在 MVC3 中,我可以轻松地将 jQuery 脚本标签移动到页面底部“_Layout.vbhtml” 但是,在 ASP.NET MVC3 中,当您使用编辑器模板创建 Controller 时,脚手
悬停时内容被替换,但是当鼠标离开元素时我希望它变回来。我该怎么做? $('.img-wrap').hover(function(){ $(this).find('h4').text('Go
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 已关闭 9 年前。 有关您编写的代码问题的问题必须在问题本身中描述具体问题 - 并包含有效代码以重现该问题。
版本:qwt 6.0.1我尝试开发频谱的对数缩放。我使用简单的线条来启用缩放plotspectrum->setAxisScaleEngine(QwtPlot::yLeft, new QwtLog10S
我有两个相同的表,I_Subject 和 I_Temp_Subject,我想将 Temp_Subject 表复制到 Subject 表。 I_Temp_Subject 由简单用户使用,I_Subjec
我的印象是第一次绘制发生在触发 DOMContentLoaded 事件之后。特别是,因为我认为为了让第一次绘制发生,需要渲染树,它依赖于 DOM 构造。另外,我知道 DOM 构造完成时会触发 DOMC
我是一名优秀的程序员,十分优秀!