stryker-mutator / stryker-net

Mutation testing for .NET core and .NET framework!
https://stryker-mutator.io
Apache License 2.0
1.74k stars 177 forks source link

Action delegates break mutation process #2925

Closed richardwerkman closed 2 months ago

richardwerkman commented 2 months ago

Describe the bug During improving the integration tests with various constructs I noticed the following code breaks stryker:

        Action greet = delegate { Console.WriteLine("Hello!"); };
        greet();

        Action<int, double> introduce = delegate { Console.WriteLine("This is world!"); };
        introduce(42, 2.7);

Logs


   _____ _              _               _   _ ______ _______  
  / ____| |            | |             | \ | |  ____|__   __| 
 | (___ | |_ _ __ _   _| | _____ _ __  |  \| | |__     | |    
  \___ \| __| '__| | | | |/ / _ \ '__| | . ` |  __|    | |    
  ____) | |_| |  | |_| |   <  __/ |    | |\  | |____   | |    
 |_____/ \__|_|   \__, |_|\_\___|_| (_)|_| \_|______|  |_|    
                   __/ |                                      
                  |___/                                       

Version: 4.0.4

[17:53:11 INF] Analysis starting.
[17:53:11 INF] Identifying projects to mutate in C:\Dev\Repos\stryker-net\integrationtest\TargetProjects\IntegrationTestApp.sln. This can take a while.
[17:53:14 INF] Found 3 source projects
[17:53:14 INF] Found 5 test projects
[17:53:14 INF] Found project C:\Dev\Repos\stryker-net\integrationtest\TargetProjects\TargetProject\TargetProject.csproj to mutate.
[17:53:14 INF] Analysis complete.
[17:53:14 INF] Building solution IntegrationTestApp.sln
[17:53:22 WRN] Project 'C:\Dev\Repos\stryker-net\integrationtest\TargetProjects\EmptyTestProject\EmptyTestProject.csproj' did not report any test. This may be because the test adapter package, xunit.runner.visualstudio, failed to deploy. Check if any dependency is missing or there is a version conflict.
[17:53:23 INF] Number of tests found: 30 for project C:\Dev\Repos\stryker-net\integrationtest\TargetProjects\TargetProject\TargetProject.csproj. Initial test run started.
[17:53:26 INF] Time Elapsed 00:00:15.0190041
Unhandled exception. System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.)
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.BaseFunctionOrchestrator`1.InjectMutations(T sourceNode, T targetNode, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\BaseFunctionOrchestrator.cs:line 110
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.Mutate(SyntaxNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 122
   at Stryker.Core.Mutants.MutationContext.Mutate(SyntaxNode node, SemanticModel model) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\MutationContext.cs:line 83
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.<>c__DisplayClass7_0.<OrchestrateChildrenMutation>b__0(SyntaxNode original, SyntaxNode _) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 82
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitEqualsValueClause(EqualsValueClauseSyntax node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.EqualsValueClauseSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replace[TNode](SyntaxNode root, IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.ReplaceCore[TNode](IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.SyntaxNodeExtensions.ReplaceNodes[TRoot,TNode](TRoot root, IEnumerable`1 nodes, Func`3 computeReplacementNode)
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.OrchestrateChildrenMutation(TNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 81
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.Mutate(SyntaxNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 122
   at Stryker.Core.Mutants.MutationContext.Mutate(SyntaxNode node, SemanticModel model) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\MutationContext.cs:line 83
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.<>c__DisplayClass7_0.<OrchestrateChildrenMutation>b__0(SyntaxNode original, SyntaxNode _) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 82
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitVariableDeclarator(VariableDeclaratorSyntax node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclaratorSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replace[TNode](SyntaxNode root, IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.ReplaceCore[TNode](IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.SyntaxNodeExtensions.ReplaceNodes[TRoot,TNode](TRoot root, IEnumerable`1 nodes, Func`3 computeReplacementNode)
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.OrchestrateChildrenMutation(TNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 81
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.Mutate(SyntaxNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 122
   at Stryker.Core.Mutants.MutationContext.Mutate(SyntaxNode node, SemanticModel model) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\MutationContext.cs:line 83
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.<>c__DisplayClass7_0.<OrchestrateChildrenMutation>b__0(SyntaxNode original, SyntaxNode _) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 82
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitListElement[TNode](TNode node)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitList[TNode](SeparatedSyntaxList`1 list)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitVariableDeclaration(VariableDeclarationSyntax node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replace[TNode](SyntaxNode root, IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.ReplaceCore[TNode](IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.SyntaxNodeExtensions.ReplaceNodes[TRoot,TNode](TRoot root, IEnumerable`1 nodes, Func`3 computeReplacementNode)
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.OrchestrateChildrenMutation(TNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 81
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.Mutate(SyntaxNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 122
   at Stryker.Core.Mutants.MutationContext.Mutate(SyntaxNode node, SemanticModel model) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\MutationContext.cs:line 83
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.<>c__DisplayClass7_0.<OrchestrateChildrenMutation>b__0(SyntaxNode original, SyntaxNode _) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 82
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitLocalDeclarationStatement(LocalDeclarationStatementSyntax node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.LocalDeclarationStatementSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replace[TNode](SyntaxNode root, IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.ReplaceCore[TNode](IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.SyntaxNodeExtensions.ReplaceNodes[TRoot,TNode](TRoot root, IEnumerable`1 nodes, Func`3 computeReplacementNode)
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.OrchestrateChildrenMutation(TNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 81
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.Mutate(SyntaxNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 122
   at Stryker.Core.Mutants.MutationContext.Mutate(SyntaxNode node, SemanticModel model) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\MutationContext.cs:line 83
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.<>c__DisplayClass7_0.<OrchestrateChildrenMutation>b__0(SyntaxNode original, SyntaxNode _) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 82
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitListElement[TNode](TNode node)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitList[TNode](SyntaxList`1 list)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitBlock(BlockSyntax node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replace[TNode](SyntaxNode root, IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.ReplaceCore[TNode](IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.SyntaxNodeExtensions.ReplaceNodes[TRoot,TNode](TRoot root, IEnumerable`1 nodes, Func`3 computeReplacementNode)
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.OrchestrateChildrenMutation(TNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 81
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.Mutate(SyntaxNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 122
   at Stryker.Core.Mutants.MutationContext.Mutate(SyntaxNode node, SemanticModel model) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\MutationContext.cs:line 83
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.<>c__DisplayClass7_0.<OrchestrateChildrenMutation>b__0(SyntaxNode original, SyntaxNode _) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 82
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitMethodDeclaration(MethodDeclarationSyntax node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.MethodDeclarationSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replace[TNode](SyntaxNode root, IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.ReplaceCore[TNode](IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.SyntaxNodeExtensions.ReplaceNodes[TRoot,TNode](TRoot root, IEnumerable`1 nodes, Func`3 computeReplacementNode)
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.OrchestrateChildrenMutation(TNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 81
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.Mutate(SyntaxNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 122
   at Stryker.Core.Mutants.MutationContext.Mutate(SyntaxNode node, SemanticModel model) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\MutationContext.cs:line 83
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.<>c__DisplayClass7_0.<OrchestrateChildrenMutation>b__0(SyntaxNode original, SyntaxNode _) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 82
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitListElement[TNode](TNode node)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitList[TNode](SyntaxList`1 list)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitClassDeclaration(ClassDeclarationSyntax node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replace[TNode](SyntaxNode root, IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.ReplaceCore[TNode](IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.SyntaxNodeExtensions.ReplaceNodes[TRoot,TNode](TRoot root, IEnumerable`1 nodes, Func`3 computeReplacementNode)
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.OrchestrateChildrenMutation(TNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 81
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.Mutate(SyntaxNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 122
   at Stryker.Core.Mutants.MutationContext.Mutate(SyntaxNode node, SemanticModel model) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\MutationContext.cs:line 83
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.<>c__DisplayClass7_0.<OrchestrateChildrenMutation>b__0(SyntaxNode original, SyntaxNode _) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 82
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitListElement[TNode](TNode node)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitList[TNode](SyntaxList`1 list)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitFileScopedNamespaceDeclaration(FileScopedNamespaceDeclarationSyntax node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.FileScopedNamespaceDeclarationSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replace[TNode](SyntaxNode root, IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.ReplaceCore[TNode](IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.SyntaxNodeExtensions.ReplaceNodes[TRoot,TNode](TRoot root, IEnumerable`1 nodes, Func`3 computeReplacementNode)
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.OrchestrateChildrenMutation(TNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 81
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.Mutate(SyntaxNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 122
   at Stryker.Core.Mutants.MutationContext.Mutate(SyntaxNode node, SemanticModel model) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\MutationContext.cs:line 83
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.<>c__DisplayClass7_0.<OrchestrateChildrenMutation>b__0(SyntaxNode original, SyntaxNode _) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 82
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitListElement[TNode](TNode node)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitList[TNode](SyntaxList`1 list)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitCompilationUnit(CompilationUnitSyntax node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.CompilationUnitSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
   at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replace[TNode](SyntaxNode root, IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.ReplaceCore[TNode](IEnumerable`1 nodes, Func`3 computeReplacementNode, IEnumerable`1 tokens, Func`3 computeReplacementToken, IEnumerable`1 trivia, Func`3 computeReplacementTrivia)
   at Microsoft.CodeAnalysis.SyntaxNodeExtensions.ReplaceNodes[TRoot,TNode](TRoot root, IEnumerable`1 nodes, Func`3 computeReplacementNode)
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.OrchestrateChildrenMutation(TNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 81
   at Stryker.Core.Mutants.CsharpNodeOrchestrators.NodeSpecificOrchestrator`2.Mutate(SyntaxNode node, SemanticModel semanticModel, MutationContext context) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpNodeOrchestrators\NodeSpecificOrchestrator.cs:line 122
   at Stryker.Core.Mutants.CsharpMutantOrchestrator.Mutate(SyntaxTree input, SemanticModel semanticModel) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Mutants\CsharpMutantOrchestrator.cs:line 128
   at Stryker.Core.MutationTest.CsharpMutationProcess.Mutate(MutationTestInput input) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\MutationTest\CsharpMutationProcess.cs:line 66
   at Stryker.Core.MutationTest.MutationTestProcess.Mutate() in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\MutationTest\MutationTestProcess.cs:line 88
   at Stryker.Core.Initialisation.ProjectMutator.MutateProject(StrykerOptions options, MutationTestInput input, IReporter reporters) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Initialisation\ProjectMutator.cs:line 38
   at Stryker.Core.Initialisation.ProjectOrchestrator.<>c__DisplayClass7_0.<MutateProjects>b__0(MutationTestInput mutationTestInput) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Initialisation\ProjectOrchestrator.cs:line 71
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
   at System.Threading.Tasks.TaskReplicator.Replica.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure)
   at System.Threading.Tasks.Parallel.ForWorker[TLocal,TInt](TInt fromInclusive, TInt toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.ForWorker[TLocal,TInt](TInt fromInclusive, TInt toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Action`1 body)
   at Stryker.Core.Initialisation.ProjectOrchestrator.MutateProjects(StrykerOptions options, IReporter reporters, ITestRunner runner) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\Initialisation\ProjectOrchestrator.cs:line 69
   at Stryker.Core.StrykerRunner.RunMutationTest(IStrykerInputs inputs, ILoggerFactory loggerFactory, IProjectOrchestrator projectOrchestrator) in C:\Dev\Repos\stryker-net\src\Stryker.Core\Stryker.Core\StrykerRunner.cs:line 63
   at Stryker.CLI.StrykerCli.RunStryker(IStrykerInputs inputs) in C:\Dev\Repos\stryker-net\src\Stryker.CLI\Stryker.CLI\StrykerCLI.cs:line 102
   at Stryker.CLI.StrykerCli.<>c__DisplayClass11_0.<Run>b__0() in C:\Dev\Repos\stryker-net\src\Stryker.CLI\Stryker.CLI\StrykerCLI.cs:line 74
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass143_0.<OnExecute>b__0(CancellationToken _)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at Stryker.CLI.StrykerCli.Run(String[] args) in C:\Dev\Repos\stryker-net\src\Stryker.CLI\Stryker.CLI\StrykerCLI.cs:line 80
   at Stryker.CLI.Program.Main(String[] args) in C:\Dev\Repos\stryker-net\src\Stryker.CLI\Stryker.CLI\Program.cs:line 14

C:\Dev\Repos\stryker-net\src\Stryker.CLI\Stryker.CLI\bin\Debug\net8.0\Stryker.CLI.exe (process 43616) exited with code -532462766.

Expected behavior This should be mutated correctly

Additional context For now I've commented these constructs out in the integration test project, but these should be uncommented once this is fixed.

dupdob commented 2 months ago

yep, thanks for reporting this. PR #2926 fixes that

(trying to break a speed record here 🤣 )