runtime: [6.0.100-preview.4.21178.2] System.AccessViolationException at RoslynPad when run against 6.0.100-preview.4.21178.2
Application Name: RoslynPad(.net core 3.1 app) OS: Windows 10 RS5 CPU: X64 .NET Build Number: 6.0.100-preview.4.21178.2 Source Code, App & CrashDump : check at https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1303709 Verify Scenarios: 1). Windows 10 RS5 X64 + .NET Core SDK build 6.0.100-preview.4.21178.2 - main branch: Fail 2). Windows 10 RS5 X64 + .NET Core SDK build 6.0.100-preview.3.21180.8 - Preview 3 branch: Fail 3). Windows 10 RS5 X64 + .NET Core SDK build 6.0.100-preview.2.21158.2: Pass 4). Windows 10 RS5 X64 + .NET Core SDK build 5.0.104 : Pass 5). Windows 10 RS5 X64 + .NET Core SDK build 3.1.300 Pass
Repro steps to run
- Copy app from https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1303709
- Run RoslynPad.exe
- in document, input :
#r "framework:Microsoft.WindowsDesktop.App"
using System.Windows;
using System.Windows.Controls;
await Helpers.RunWpfAsync(); // initializes a dispatcher thread
var w = new Window { Content = new Button { Content = "Hello, World!", IsCancel = true } };
w.ShowDialog()
- Click Run button
Expected Result: It should open WPF window
Actual Result: App crashes [crash also could happen after closing WPF window)
Error Log :
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack Trace
System_Collections_Immutable!System.Collections.Immutable.ImmutableList`1+Enumerator[[System.Collections.Generic.KeyValuePair`2[[System.__Canon, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib]], System.Private.CoreLib]].Dispose()+0x20fcab0
01 0000004e`0c4bdb30 00007ff9`8180c998 System_Collections_Immutable!System.Collections.Immutable.ImmutableDictionary`2+<get_Values>d__27[[System.__Canon, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib]].System.IDisposable.Dispose()+0x7c
02 0000004e`0c4bdb80 00007ff9`8180d771 System_Linq!System.Linq.Enumerable+SelectManySingleSelectorIterator`2[[System.__Canon, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib]].Dispose()+0xffffffff`95ed5658*** WARNING: Unable to verify checksum for C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.0-preview.4.21177.4\System.Linq.dll
*** ERROR: Module load completed but symbols could not be loaded for C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.0-preview.4.21177.4\System.Linq.dll
Findings: Error comes from System.Collections.Immutable.dll, when we replace dll with older version, app works.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 23 (21 by maintainers)
Verified with dotnet-sdk-6.0.100-preview.4.21218.3, it should be fixed.