question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot inject mutation error since 0.21

See original GitHub issue

Describe the bug Since updating to 0.21.0 (and 21.1) from 0.20.0 Stryker fails on every run with an exception.

Logs

I’m working on the log files (the failures were on Jenkins), the exception / stack trace are:

System.InvalidOperationException: Cannot inject mutation '!(            Int64.TryParse(x.Val, out var val)
01:51:15  )' in 'new User(
01:51:15                  id: "48622c30-5900-4e49-a847-cacf922048c0",
01:51:15                  name: "User")' because we cannot find the original code.
01:51:15     at Stryker.Core.Helpers.RoslynHelper.InjectMutation[T](T original, Mutation mutation)
01:51:15     at Stryker.Core.Mutants.NodeOrchestrators.PropertyDeclarationOrchestrator.<>c__DisplayClass1_0.<InjectMutations>b__0(Mutant m)
01:51:15     at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
01:51:15     at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
01:51:15     at Stryker.Core.Mutants.MutantPlacer.PlaceStatementControlledMutations(StatementSyntax original, IEnumerable`1 mutations)
01:51:15     at Stryker.Core.Mutants.NodeOrchestrators.PropertyDeclarationOrchestrator.InjectMutations(PropertyDeclarationSyntax sourceNode, BasePropertyDeclarationSyntax targetNode, MutationContext context)
01:51:15     at Stryker.Core.Mutants.NodeOrchestrators.NodeSpecificOrchestrator`2.Mutate(SyntaxNode node, MutationContext context)
01:51:15     at Stryker.Core.Mutants.CsharpMutantOrchestrator.Mutate(SyntaxNode currentNode, MutationContext context)
01:51:15     at Stryker.Core.Mutants.NodeOrchestrators.NodeSpecificOrchestrator`2.<>c__DisplayClass11_0.<OrchestrateChildrenMutation>b__0(SyntaxNode original, SyntaxNode _)
01:51:15     at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
01:51:15     at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitListElement[TNode](TNode node)
01:51:15     at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitList[TNode](SyntaxList`1 list)
01:51:15     at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitClassDeclaration(ClassDeclarationSyntax node)
01:51:15     at Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
01:51:15     at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(SyntaxNode node)
01:51:15     at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
01:51:15     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)
01:51:15     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)
01:51:15     at Microsoft.CodeAnalysis.SyntaxNodeExtensions.ReplaceNodes[TRoot,TNode](TRoot root, IEnumerable`1 nodes, Func`3 computeReplacementNode)
01:51:15     at Stryker.Core.Mutants.NodeOrchestrators.NodeSpecificOrchestrator`2.OrchestrateChildrenMutation(TNode node, MutationContext context)
01:51:15     at Stryker.Core.Mutants.NodeOrchestrators.NodeSpecificOrchestrator`2.Mutate(SyntaxNode node, MutationContext context)
01:51:15     at Stryker.Core.Mutants.CsharpMutantOrchestrator.Mutate(SyntaxNode currentNode, MutationContext context)
01:51:15     at Stryker.Core.Mutants.NodeOrchestrators.NodeSpecificOrchestrator`2.<>c__DisplayClass11_0.<OrchestrateChildrenMutation>b__0(SyntaxNode original, SyntaxNode _)
01:51:15     at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
01:51:15     at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitListElement[TNode](TNode node)
01:51:15     at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitList[TNode](SyntaxList`1 list)
01:51:15     at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitNamespaceDeclaration(NamespaceDeclarationSyntax node)
01:51:15     at Microsoft.CodeAnalysis.CSharp.Syntax.NamespaceDeclarationSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
01:51:15     at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(SyntaxNode node)
01:51:15     at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
01:51:15     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)
01:51:15     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)
01:51:15     at Microsoft.CodeAnalysis.SyntaxNodeExtensions.ReplaceNodes[TRoot,TNode](TRoot root, IEnumerable`1 nodes, Func`3 computeReplacementNode)
01:51:15     at Stryker.Core.Mutants.NodeOrchestrators.NodeSpecificOrchestrator`2.OrchestrateChildrenMutation(TNode node, MutationContext context)
01:51:15     at Stryker.Core.Mutants.NodeOrchestrators.NodeSpecificOrchestrator`2.Mutate(SyntaxNode node, MutationContext context)
01:51:15     at Stryker.Core.Mutants.CsharpMutantOrchestrator.Mutate(SyntaxNode currentNode, MutationContext context)
01:51:15     at Stryker.Core.Mutants.NodeOrchestrators.NodeSpecificOrchestrator`2.<>c__DisplayClass11_0.<OrchestrateChildrenMutation>b__0(SyntaxNode original, SyntaxNode _)
01:51:15     at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
01:51:15     at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitListElement[TNode](TNode node)
01:51:15     at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitList[TNode](SyntaxList`1 list)
01:51:15     at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.VisitCompilationUnit(CompilationUnitSyntax node)
01:51:15     at Microsoft.CodeAnalysis.CSharp.Syntax.CompilationUnitSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
01:51:15     at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxRewriter.Visit(SyntaxNode node)
01:51:15     at Microsoft.CodeAnalysis.CSharp.Syntax.SyntaxReplacer.Replacer`1.Visit(SyntaxNode node)
01:51:15     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)
01:51:15     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)
01:51:15     at Microsoft.CodeAnalysis.SyntaxNodeExtensions.ReplaceNodes[TRoot,TNode](TRoot root, IEnumerable`1 nodes, Func`3 computeReplacementNode)
01:51:15     at Stryker.Core.Mutants.NodeOrchestrators.NodeSpecificOrchestrator`2.OrchestrateChildrenMutation(TNode node, MutationContext context)
01:51:15     at Stryker.Core.Mutants.NodeOrchestrators.NodeSpecificOrchestrator`2.Mutate(SyntaxNode node, MutationContext context)
01:51:15     at Stryker.Core.Mutants.CsharpMutantOrchestrator.Mutate(SyntaxNode currentNode, MutationContext context)
01:51:15     at Stryker.Core.Mutants.CsharpMutantOrchestrator.Mutate(SyntaxNode input)
01:51:15     at Stryker.Core.MutationTest.CsharpMutationProcess.Mutate()
01:51:15     at Stryker.Core.MutationTest.MutationTestProcess.Mutate()
01:51:15     at Stryker.Core.Initialisation.ProjectMutator.MutateProject(IStrykerOptions options, IReporter reporters)
01:51:15     at Stryker.Core.Initialisation.ProjectOrchestrator.MutateProjects(StrykerOptions options, IReporter reporters)+MoveNext()
01:51:15     at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
01:51:15     at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
01:51:15     at Stryker.Core.StrykerRunner.RunMutationTest(StrykerOptions options, IEnumerable`1 initialLogMessages)

Expected behavior Stryker does not fail

Desktop (please complete the following information):

  • OS: Debian buster
  • Type of project: netcore
  • Framework Version: target netcoreapp3.1, running on net5.0 sdk
  • Stryker Version 0.21.0 / 0.21.1

Additional context Let me know if there’s more information I can provide. This is a closed source application so I cannot share too much details.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dupdobcommented, Jan 25, 2021

Don’t worry: I am working on a fix.

1reaction
rouke-broersmacommented, Jan 25, 2021

@Dave-EMIS Thank you for the report! I think these logs are enough for us to investigate the issue. If not we’ll let you know!

Read more comments on GitHub >

github_iconTop Results From Across the Web

MDVA-43862: customer can't update cart items because of a ...
The MDVA-43862 patch solves the issue where the customer can't update cart items because of a GraphQL UpdateCartItems mutation error.
Read more >
Release 0.21.1 Alex Denisov <alex@lowlevelbits.org>, ...
To solve this problem, Mull splits execution and reporting into separate phases. What Mull does is apply mutation testing on a program, collect ......
Read more >
Systematic evaluation of error rates and causes in short ...
Mutation analysis after omission of shortened sequences. (a) Average mutation frequency of the four different nucleotides for the different C12- ...
Read more >
Cannot Get Apollo addItem Mutation to work on the client ...
All I want to do is add an item to the items array in my Cart object. What I am trying to do...
Read more >
Changelog
Fix error message for missing migration files #4937 ; Move deferrable to after on update/on delete #4976 ; Do not use sys.tables to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found