{"action":"opened","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4739","repository_url":"https://api.github.com/repos/aspnet/EntityFramework","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4739/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4739/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4739/events","html_url":"https://github.com/aspnet/EntityFramework/issues/4739","id":139657996,"number":4739,"title":"UseRowNumberPaging causes NRE in complex queries","user":{"login":"natemcmaster","id":2696087,"avatar_url":"https://avatars.githubusercontent.com/u/2696087?v=3","gravatar_id":"","url":"https://api.github.com/users/natemcmaster","html_url":"https://github.com/natemcmaster","followers_url":"https://api.github.com/users/natemcmaster/followers","following_url":"https://api.github.com/users/natemcmaster/following{/other_user}","gists_url":"https://api.github.com/users/natemcmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/natemcmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natemcmaster/subscriptions","organizations_url":"https://api.github.com/users/natemcmaster/orgs","repos_url":"https://api.github.com/users/natemcmaster/repos","events_url":"https://api.github.com/users/natemcmaster/events{/privacy}","received_events_url":"https://api.github.com/users/natemcmaster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-09T18:14:34Z","updated_at":"2016-03-09T18:14:34Z","closed_at":null,"body":"Repro:\r\nComplexNavigationsQuerySqlServerTest.Include_with_groupjoin_skip_and_take\r\n\r\nChange ComplexNavigationsQuerySqlServerFixture to use row number paging.\r\n\r\nExpected:\r\nInstead of offset/fetch, the query generated should use row number paging.\r\n\r\nResult:\r\n```\r\n\tSystem.NullReferenceException : Object reference not set to an instance of an object.\r\n\tat lambda_method(Closure , ValueBuffer )\r\n\tQuery\\EntityLoadInfo.cs(27,0): at Microsoft.EntityFrameworkCore.Query.EntityLoadInfo.Materialize()\r\n\tQuery\\Internal\\QueryBuffer.cs(70,0): at Microsoft.EntityFrameworkCore.Query.Internal.QueryBuffer.GetEntity(IKey key, EntityLoadInfo entityLoadInfo, Boolean queryStateManager, Boolean throwOnNullKey)\r\n\tQuery\\ExpressionVisitors\\Internal\\BufferedEntityShaper`.cs(32,0): at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.BufferedEntityShaper`1.Shape(QueryContext queryContext, ValueBuffer valueBuffer)\r\n\tQuery\\ExpressionVisitors\\Internal\\BufferedOffsetEntityShaper.cs(26,0): at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.BufferedOffsetEntityShaper`1.Shape(QueryContext queryContext, ValueBuffer valueBuffer)\r\n\tQuery\\QueryMethodProvider.cs(255,0): at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_GroupJoin>d__26`4.MoveNext()\r\n\tat System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n\tQuery\\Internal\\LinqOperatorProvider.cs(125,0): at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()\r\n\tat System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n\tat System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n\tComplexNavigationsQueryTestBase.cs(1938,0): at Microsoft.EntityFrameworkCore.FunctionalTests.ComplexNavigationsQueryTestBase`2.Include_with_groupjoin_skip_and_take()\r\n\tComplexNavigationsQuerySqlServerTest.cs(887,0): at Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests.ComplexNavigationsQuerySqlServerTest.Include_with_groupjoin_skip_and_take()\r\n```"}}