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

Possible bug in null propagation visitor on .NET Framework #1461

Closed
acizmarik opened this issue Sep 1, 2022 · 1 comment
Closed

Possible bug in null propagation visitor on .NET Framework #1461

acizmarik opened this issue Sep 1, 2022 · 1 comment
Assignees
Milestone

Comments

@acizmarik
Copy link
Member

The following issue has been manifesting quite a lot recently:

Test method DotVVM.Framework.Tests.Binding.NullPropagationTests.BindingNullPropagation_1 threw exception: 
System.NotSupportedException: TryExpression is not supported as a child expression when accessing a member on type 'System.TimeSpan' because it is a value type. Construct the tree so the TryExpression is not nested inside of this expression.
   at System.Linq.Expressions.Compiler.StackSpiller.RequireNotRefInstance(Expression instance)
   at System.Linq.Expressions.Compiler.StackSpiller.RewriteMemberExpression(Expression expr, Stack stack)
   at System.Linq.Expressions.Compiler.StackSpiller.RewriteExpression(Expression node, Stack stack)
   at System.Linq.Expressions.Compiler.StackSpiller.RewriteUnaryExpression(Expression expr, Stack stack)
   at System.Linq.Expressions.Compiler.StackSpiller.RewriteExpression(Expression node, Stack stack)
   at System.Linq.Expressions.Compiler.StackSpiller.RewriteExpressionFreeTemps(Expression expression, Stack stack)
   at System.Linq.Expressions.Compiler.StackSpiller.Rewrite[T](Expression`1 lambda)
   at System.Linq.Expressions.Expression`1.Accept(StackSpiller spiller)
   at System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression lambda, DebugInfoGenerator debugInfoGenerator)
   at DotVVM.Framework.Tests.Binding.NullPropagationTests.<>c__DisplayClass7_0.<TestExpression>g__compile|2(Expression e) in D:\a\dotvvm\dotvvm\src\Tests\Binding\NullPropagationTests.cs:line 149
   at DotVVM.Framework.Tests.Binding.NullPropagationTests.TestExpression(Random rnd, Expression expression, ParameterExpression originalParameter) in D:\a\dotvvm\dotvvm\src\Tests\Binding\NullPropagationTests.cs:line 146
   at DotVVM.Framework.Tests.Binding.NullPropagationTests.BindingNullPropagation_1() in D:\a\dotvvm\dotvvm\src\Tests\Binding\NullPropagationTests.cs:line 272

It is not deterministic - but I think it is failing during at least 1 in 4 runs. Moreover, I think it is only failing for Windows (.NET Framework) unit tests project. I am not sure whether it is a buggy test or a bug in the visitor itself.

@acizmarik acizmarik added this to the Version 4.1 milestone Sep 1, 2022
@acizmarik acizmarik self-assigned this Sep 1, 2022
@acizmarik
Copy link
Member Author

The test is ignored on .NET Framework but still runs on other platforms without any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant