Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio hangs and then crashes when opening a solution with a circular package graph #3374

Closed
davkean opened this issue Mar 13, 2018 · 7 comments
Assignees
Labels
Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references Tenet-Reliability This issues affects the "Reliability" tenet; crashes, hangs and UI delays.
Milestone

Comments

@davkean
Copy link
Member

davkean commented Mar 13, 2018

Feedback items:
https://developercommunity.visualstudio.com/content/problem/103063/visual-studio-hangs-and-crashes-after-opening-solu.html
https://developercommunity.visualstudio.com/content/problem/210330/opening-a-large-solution-in-vs-causes-it-to-crash.html

  1. Add feed to: https://dotnet.myget.org/feed/dotnet-core/
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="System.IO.Pipelines" Version="4.5.0-preview2-26312-02" />
  </ItemGroup>

</Project>
  1. Change netstandard2.0-> netstandard1.3

clr!COMNlsHashProvider::HashiStringKnownLower80
clr!COMNlsInfo::InternalGetCaseInsHash
mscorlib_ni!System.Globalization.TextInfo.GetCaseInsensitiveHashCode(System.String, Boolean, Int64)
mscorlib_ni!System.OrdinalComparer.GetHashCode(System.String)
mscorlib_ni!System.Collections.Generic.Dictionary`2[[System.Guid, mscorlib],[System.__Canon, mscorlib]].FindEntry(System.Guid)
mscorlib_ni!System.Collections.Generic.Dictionary`2[[System.Guid, mscorlib],[System.__Canon, mscorlib]].TryGetValue(System.Guid, System.__Canon ByRef)
Microsoft_VisualStudio_ProjectSystem_Managed_VS!Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.TargetedDependenciesSnapshot.GetDependencyChildren(Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.IDependency)
Microsoft_VisualStudio_ProjectSystem_Managed_VS!Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.TargetedDependenciesSnapshot.FindUnresolvedDependenciesRecursive(Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.IDependency)
Microsoft_VisualStudio_ProjectSystem_Managed_VS!Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.TargetedDependenciesSnapshot.FindUnresolvedDependenciesRecursive(Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.IDependency)
Microsoft_VisualStudio_ProjectSystem_Managed_VS!Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.TargetedDependenciesSnapshot.FindUnresolvedDependenciesRecursive(Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.IDependency)
Microsoft_VisualStudio_ProjectSystem_Managed_VS!Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.TargetedDependenciesSnapshot.FindUnresolvedDependenciesRecursive(Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.IDependency)
Microsoft_VisualStudio_ProjectSystem_Managed_VS!Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.TargetedDependenciesSnapshot.FindUnresolvedDependenciesRecursive(Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.IDependency)
Microsoft_VisualStudio_ProjectSystem_Managed_VS!Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.TargetedDependenciesSnapshot.FindUnresolvedDependenciesRecursive(Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.IDependency)
Microsoft_VisualStudio_ProjectSystem_Managed_VS!Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.TargetedDependenciesSnapshot.FindUnresolvedDependenciesRecursive(Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.IDependency)
Microsoft_VisualStudio_ProjectSystem_Managed_VS!Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.TargetedDependenciesSnapshot.FindUnresolvedDependenciesRecursive(Microsoft.VisualStudio.ProjectSystem.VS.Tree.Dependencies.Snapshot.IDependency)
@davkean davkean added the Bug label Mar 13, 2018
@davkean davkean added this to the 15.7 milestone Mar 13, 2018
@davkean davkean self-assigned this Mar 13, 2018
@davkean
Copy link
Member Author

davkean commented Mar 13, 2018

This has the following hits:

Source Application Version Hits
Watson devenv.exe 15.6.27413.0 4
Watson devenv.exe 15.6.27205.2004 8
Watson devenv.exe 15.0.27130.2024 15
Watson devenv.exe 15.0.27130.2010 52
Watson devenv.exe 15.0.27004.2005 38

@davkean
Copy link
Member Author

davkean commented Mar 13, 2018

This looks to be caused by a circular dependency in the "System.Runtime.CompilerServices.Unsafe (4.5.0-preview2-26312-02) (.NETStandard,Version=v1.3/System.Runtime.CompilerServices.Unsafe/4.5.0-preview2-26312-02)" package, it looks like it indirectly depends on itself:

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata minClientVersion="2.12">
    <id>System.Runtime.CompilerServices.Unsafe</id>
    <version>4.5.0-preview2-26312-02</version>
    <title>System.Runtime.CompilerServices.Unsafe</title>
    <authors>Microsoft</authors>
    <owners>microsoft,dotnetframework</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <licenseUrl>https://github.com/dotnet/corefx/blob/master/LICENSE.TXT</licenseUrl>
    <projectUrl>https://dot.net/</projectUrl>
    <iconUrl>http://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
    <description>Provides the System.Runtime.CompilerServices.Unsafe class, which provides generic, low-level functionality for manipulating pointers.

Commonly Used Types:
System.Runtime.CompilerServices.Unsafe
 
f1f3b3f8af21c0f782f7f0699d505a0cdb9026ba 
When using NuGet 3.x this package requires at least version 3.4.</description>
    <releaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</releaseNotes>
    <copyright>© Microsoft Corporation.  All rights reserved.</copyright>
    <serviceable>true</serviceable>
    <dependencies>
      <group targetFramework=".NETFramework4.5" />
      <group targetFramework=".NETStandard1.0">
        <dependency id="NETStandard.Library" version="1.6.1" />
      </group>
      <group targetFramework=".NETStandard2.0" />
      <group targetFramework=".NETPortable4.5-Profile259" />
      <group targetFramework="Windows8.0" />
      <group targetFramework="WindowsPhone8.0" />
      <group targetFramework="WindowsPhoneApp8.1" />
    </dependencies>
  </metadata>
</package>

We should fix the code to not crash in this case.

@davkean
Copy link
Member Author

davkean commented Mar 13, 2018

@etbyrd This is a good one for you to pick up and take for 15.7.

@davkean
Copy link
Member Author

davkean commented Mar 13, 2018

I've made .NET aware that this circular dependency exists.

@davkean
Copy link
Member Author

davkean commented Mar 13, 2018

Strike above, the issue System.Threading.Tasks.Extensions:

The issue is System.Xml.ReaderWriter:

"NETStandard.Library (1.6.1) (NETStandard.Library)" -> 
"System.Xml.ReaderWriter (4.3.0) (.NETStandard,Version=v1.3/System.Xml.ReaderWriter/4.3.0)" ->
"System.Threading.Tasks.Extensions (4.5.0-preview2-26312-02) (.NETStandard,Version=v1.3/System.Threading.Tasks.Extensions/4.5.0-preview2-26312-02)" -> 
"System.Runtime.CompilerServices.Unsafe (4.5.0-preview2-26312-02) (.NETStandard,Version=v1.3/System.Runtime.CompilerServices.Unsafe/4.5.0-preview2-26312-02)" ->
"NETStandard.Library (1.6.1) (NETStandard.Library)" 

It depends on Tasks.Extensions, which depends on Unsafe, which depends on NETStandard.Library, which depends on ReaderWriter, which depends on Extensions and so on.

@davkean davkean changed the title Visual Studio crashes and hangs opening a solution Visual Studio crashes and hangs when opening a solution with a circular package graph Mar 15, 2018
@davkean davkean changed the title Visual Studio crashes and hangs when opening a solution with a circular package graph Visual Studio hangs and then crashes when opening a solution with a circular package graph Mar 15, 2018
@Pilchie Pilchie added Tenet-Reliability This issues affects the "Reliability" tenet; crashes, hangs and UI delays. Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references labels Apr 16, 2018
@ivanbasov ivanbasov modified the milestones: 15.7, 15.8 Apr 23, 2018
@ivanbasov
Copy link

The corresponding VSO issue was moved to 15.8 due to small number of issues in recent version. Moving this one to 15.8 as well

@etbyrd
Copy link
Contributor

etbyrd commented Apr 25, 2018

Fixed in #3474

@etbyrd etbyrd closed this as completed Apr 25, 2018
@drewnoakes drewnoakes removed the Bug label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references Tenet-Reliability This issues affects the "Reliability" tenet; crashes, hangs and UI delays.
Projects
None yet
Development

No branches or pull requests

5 participants