C++ 如何修复“故障模块 msvcr100.dll”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9136958/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to fix "faulting module msvcr100.dll"
提问by Cookie
I am getting this very strange crash on a client system for my C++ executable:
我的 C++ 可执行文件在客户端系统上遇到了这个非常奇怪的崩溃:
Faulting application Client.exe, version 0.0.0.0, faulting module msvcr100.dll, version 10.0.30319.1, fault address 0x0008d635.
It works fine on a Windows 7 client, and it has above crash on a Windows Server 2003 R2, even after installing the visual C++ runtime environment. The first line of Client.exe is a std::cout
command, so that I am very confident that the fault is not in the execution, but rather in dynamically loading the dlls. Unfortunately one of the libraries I link against is third party and not available with a static link to the runtime environment, so I can't statically link the executable.
它在 Windows 7 客户端上运行良好,并且在 Windows Server 2003 R2 上发生上述崩溃,即使在安装了 Visual C++ 运行时环境之后也是如此。Client.exe 的第一行是一个std::cout
命令,所以我非常确信问题不在执行上,而是在动态加载 dll 上。不幸的是,我链接的库之一是第三方库,无法通过静态链接到运行时环境,因此我无法静态链接可执行文件。
Any advice on how to proceed on such an issue (and this one in particular)?
关于如何处理这样一个问题(尤其是这个问题)的任何建议?
采纳答案by Cookie
WinDbg actually pointed to the problem. Simply was some global variable that couldn't initialize due to a file missing on the client, and that was just the exception report.
WinDbg 实际上指出了这个问题。只是一些全局变量由于客户端缺少文件而无法初始化,这只是异常报告。
回答by paulsm4
Take a look at this link:
看看这个链接:
http://forums.adobe.com/thread/851511
http://forums.adobe.com/thread/851511
And consider 32- vs 64-bit.
并考虑 32 位与 64 位。
Finally, run "depends" (it should be available with all MSVisual Studio editions) against all three of:
最后,针对所有三个运行“ depends”(它应该适用于所有 MSVisual Studio 版本):
Your .exe
Your 3rd party .dll
Your msvc runtime .dll
你的.exe
您的第 3 方 .dll
您的 msvc 运行时 .dll
回答by Ajay
What's the exception-code? I don't see third party DLL is the only cause, otherwise OS would have shown the error that particular DLL is missing.
什么是异常代码?我不认为第三方 DLL 是唯一的原因,否则操作系统会显示特定 DLL 丢失的错误。
Or is that third party DLL being loaded dynamically (somehow using LoadLibrary
), or is a Managed DLL?
或者是动态加载的第三方 DLL(以某种方式使用LoadLibrary
),还是托管 DLL?
Use Dependency Walker, see if some DLL is missing. Try Tracing (F7) using depends itself, and see the debug output in lower pane of Depends.
使用 Dependency Walker,查看是否缺少某些 DLL。尝试使用依赖本身进行跟踪 (F7),并在依赖的下部窗格中查看调试输出。