dotnet / dotnet/sdk

System.AccessViolationException in build process

Open
#41,868 1 comment 0 reactions 0 assignees View on GitHub
Area-Compilers
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Describe the bug
A clear and concise description of what the bug is.

### To Reproduce
When I build the following repository I get an AccessViolationException:

Repository: https://github.com/Squidex/squidex/tree/c7e08cb1ac83e2171db65fa1d185be44a2b08064

### Exceptions (if any)

A typical error is like this, but it is not always the same:

```
C:\Program Files\dotnet\sdk\8.0.302\Roslyn\Microsoft.CSharp.Core.targets(85,5): error : Fatal error. System.AccessViola
tionException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. [
C:\Users\mail2\Downloads\squidex-master\squidex-master\backend\src\Migrations\Migrations.csproj]
C:\Program Files\dotnet\sdk\8.0.302\Roslyn\Microsoft.CSharp.Core.targets(85,5): error : at Microsoft.CodeAnalysis.Di
agnostics.AnalyzerExecutor.ExecuteSyntaxNodeActions[[Microsoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.C
Sharp, Version=4.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](System.Collections.Generic.IEnumerable`1, Microsoft.CodeAnalysis.Collections.ImmutableSegmentedDictionary`2>>, Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer, Microsof
t.CodeAnalysis.ISymbol, Microsoft.CodeAnalysis.SemanticModel, System.Func`2, AnalyzerDiagnosticReporter, System.Func`3, System.Nullable`1, Boolean, Boolean, System.T
hreading.CancellationToken) [C:\Users\mail2\Downloads\squidex-master\squidex-master\backend\src\Migrations\Migrations.c
sproj]
```

### Further technical details
- Only .NET Core SKD 8.302 on a new Windows 11 machine. Using powershell.
This happens only on one machine. I tried a lot to ensure that it is not a hardware error:

1. Test the disk with Samsung Magicion
2. Test the disk with Windows chdsk
3. Check the RAM with Windows MEmory Diagnoser
4. Check the RAM with memtest86
5. Reinstall Windows
6. Replace the RAM
7. Replace the Disk

Actually nothing helps. But it is really difficult these days to have a brand new Windows. Some settings are always transferred when you login with your Microsoft account-

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.