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

9.0.1 does not work on the simplest query #35475

Closed
masherak opened this issue Jan 14, 2025 · 8 comments
Closed

9.0.1 does not work on the simplest query #35475

masherak opened this issue Jan 14, 2025 · 8 comments

Comments

@masherak
Copy link

Bug description

Today I updated to 9.0.1, and a query like _context.Orders.AsNoTracking().ToListAsync() throws a null reference exception. This must be a system bug. After downgrading to 9.0.0, everything works fine.

Your code

_context.Orders.AsNoTracking().ToListAsync()

Stack traces

System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.EntityFrameworkCore.Query.Internal.ExpressionTreeFuncletizer.ProcessEvaluatableRoot(Expression evaluatableRoot, State& state, Boolean forceEvaluation)
   at Microsoft.EntityFrameworkCore.Query.Internal.ExpressionTreeFuncletizer.<VisitUnary>g__EvaluateOperand|51_0(UnaryExpression unary, Expression operand, State operandState)
   at Microsoft.EntityFrameworkCore.Query.Internal.ExpressionTreeFuncletizer.ProcessEvaluatableRoot(Expression evaluatableRoot, State& state, Boolean forceEvaluation)
   at Microsoft.EntityFrameworkCore.Query.Internal.ExpressionTreeFuncletizer.VisitBinary(BinaryExpression binary)
   at Microsoft.EntityFrameworkCore.Query.Internal.ExpressionTreeFuncletizer.VisitBinary(BinaryExpression binary)
   at Microsoft.EntityFrameworkCore.Query.Internal.ExpressionTreeFuncletizer.VisitLambda[T](Expression`1 lambda)
   at Microsoft.EntityFrameworkCore.Query.Internal.ExpressionTreeFuncletizer.VisitUnary(UnaryExpression unary)
   at Microsoft.EntityFrameworkCore.Query.Internal.ExpressionTreeFuncletizer.Visit[T](ReadOnlyCollection`1 expressions, Func`2 elementVisitor, StateType& aggregateStateType, State[]& expressionStates, Boolean poolExpressionStates)
   at Microsoft.EntityFrameworkCore.Query.Internal.ExpressionTreeFuncletizer.VisitMethodCall(MethodCallExpression methodCall)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteCore[TResult](Expression query, Boolean async, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ExecuteAsync[TSource,TResult](MethodInfo operatorMethodInfo, IQueryable`1 source, Expression expression, CancellationToken cancellationToken)

Verbose output


EF Core version

9.0.1

Database provider

No response

Target framework

No response

Operating system

Linux

IDE

No response

@AndriySvyryd
Copy link
Member

Make sure that you've updated all packages to 9.0.1
Can you provide your .csproj file for us to investigate?

@masherak
Copy link
Author

@AndriySvyryd

Image

@AndriySvyryd
Copy link
Member

I am still unable to repro this issue. Please provide a small runnable project that shows it.

@cincuranet
Copy link
Contributor

No repro was provided (yet). Closing. Will reopen if repro is provided.

@cincuranet cincuranet closed this as not planned Won't fix, can't repro, duplicate, stale Feb 3, 2025
@roji

This comment has been minimized.

@KenBrannigan

This comment has been minimized.

@masherak
Copy link
Author

Still problem on 9.0.2, the code that worked from .NET 5 to .NET 9 suddenly doesn’t work in version 9.0.1 or 9.0.2, which I find strange.

@roji
Copy link
Member

roji commented Feb 26, 2025

@masherak as we've posted above, we need a minimal repro.

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

No branches or pull requests

5 participants