VS2015在主

时间:2015-11-16 17:58:44

标签: visual-c++ visual-studio-2015

我有几个在VS 2010中创建但最近已更新到VS 2015的项目。所有这些项目都编译正常,但其中许多现在在到达main之前抛出异常:

'MyApp.exe' (Win32): Loaded 'C:\Users\kloux\Documents\Visual Studio 2010\Projects\BandwidthCruncher\Debug\MyApp.exe'. Symbols loaded.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sysfer.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-timezone-l1-1-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-file-l2-1-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-localization-l1-2-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-synch-l1-2-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-processthreads-l1-1-1.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\api-ms-win-core-file-l1-2-0.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'MyApp.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
Exception thrown at 0x74F4C42D in MyApp.exe: Microsoft C++ exception: std::exception at memory location 0x0032F3EC.
Exception thrown at 0x74A17780 (sysfer.dll) in MyApp.exe: 0xC0000005: Access violation reading location 0x00000010.

我总是可以在生成的对话框中选择“继续”,从那时起应用程序似乎没有问题。这些是GUI应用程序和控制台应用程序的混合。这似乎仅限于我从VS 2010导入的项目 - 我从来没有在VS 2015中创建的应用程序出现这种情况。

对于其中一个项目,我已经完成了删除所有外部库并将源减少到仅包含以下内容的单个文件的过程:

#include <cstdlib>
int main(int, char**)
{
    return 0;
}

我甚至取消选中“从父级或项目默认值继承”按钮。这些都没有任何影响 - 我仍然继续得到这个例外。

如果我使用VS 2010编译任何这些项目,问题就会消失 - 直到我再次使用VS 2015进行编译。在VS 2015中,更改平台工具集也无效。

感谢任何帮助。

谢谢!

编辑:错误地写了VS 2005应该读取VS 2010

1 个答案:

答案 0 :(得分:0)

运行程序时,Visual Studio将加载sysfer.dll(来自Symantec CMC防火墙)。

从您在此处复制的日志中,sysfer.dll似乎是个问题。

这实际上是第一次机会异常。

禁用加载sysfer.dll,使用regedit将以下注册表设置为4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SysPlant]
"Start"=dword:00000004 

更改regedit后重新启动。