【问题标题】:Visual Studio 2013 crashing on startVisual Studio 2013 在启动时崩溃
【发布时间】:2015-09-15 10:15:59
【问题描述】:

我刚刚在一台新笔记本电脑上安装了 VS 2013 pro,当我尝试打开现有项目或创建新项目时,无法加载。然后我在新版本的调试器中打开它并得到这些错误。

通过打开现有项目,我得到了

System.AccessViolationException was unhandled
Message: An unhandled exception of type 'System.AccessViolationException' occurred in Microsoft.VisualStudio.Shell.UI.Internal.dll
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Microsoft.VisualStudio.Shell.UI.Internal.pdb contains the debug information required to find the source for the module Microsoft.VisualStudio.Shell.UI.Internal.dll
Try one of the following options: - Change existing PDB and binary search paths and retry

当我尝试创建一个新项目时,我收到了类似的错误

System.AccessViolationException was unhandled
Message: An unhandled exception of type 'System.AccessViolationException' occurred in Microsoft.VisualStudio.TemplateWizard.dll
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    Microsoft.VisualStudio.TemplateWizard.pdb contains the debug information required to find the source for the module Microsoft.VisualStudio.TemplateWizard.dll
    Try one of the following options: - Change existing PDB and binary search paths and retry

我还注意到VS正在创建解决方案文件夹和它上面的文件夹中的.sln文件,但是什么也没有,崩溃后解决方案文件夹是空的

我不知道为什么会发生这种情况,但似乎与安装有关,或者可能与以前的安装混淆了路径信息有关。 (在我安装 2013 pro 之前,它已经安装了 VS 2013 shell)

有什么想法吗?

【问题讨论】:

  • 尝试禁用扩展,直到它起作用
  • 干净的开始,是的。现在将尝试禁用扩展程序
  • 似乎我无法禁用任何东西。这可能与没有本地管理员权限的情况下运行有关吗?
  • 或者可能是扩展需要从程序和功能窗格中删除。 devenv.exe /SafeMode 将在没有任何第三方扩展的情况下加载 VS,尝试这样做以排除扩展是问题。
  • 我尝试了安全模式,但当我尝试创建新项目时仍然出现同样的错误

标签: c# visual-studio exception visual-studio-2013


【解决方案1】:

备份您的代码。只需尝试删除 .pdb 文件并重新加载项目。 试试看吧。

【讨论】:

  • 我实际上还没有要加载的项目,只是想创建一个新的空白模板项目
【解决方案2】:

显然有些人here 通过更改此设置解决了这个问题:

Tools menu ->Options -> Debugging -> General -> Uncheck this option "Suppress JIT optimization on module load"

关于该链接的其他建议:

  1. 尝试开启所有优化,在调试器下运行程序,看看是否出现错误。 (通常,所有优化都在调试模式下关闭,以便调试更容易。)当您有更多调试信息时,这至少会为您提供一种重现错误的方法。老实说,这对您没有多大帮助,因为当您崩溃时,破坏内存的方法调用早已不复存在。

  2. 查看您正在调用的所有非托管代码:COM 对象、C/C++ DLL、Win32 调用等。检查所有非托管代码的 P/Invoke 签名和 COM 互操作 thunk,以验证它们是正确的。不要相信你在网上找到的 P/Invoke 签名。它们并不总是正确的。亲自验证您的数据类型和参数顺序是否正确。

  3. 尝试删除非托管代码(存根调用)并查看问题是否消失。如果是,请检查组件以验证它是否没有内存泄漏。 (请注意,您可能只是在重新排列代码时掩盖了问题。)

  4. 尝试在 Compuware BoundsChecker 等非托管内存检查器下运行您的代码,该检查器将查找内存泄漏和访问冲突。这可能会给您一些关于哪个非托管组件行为不端的提示。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-10-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多