Bug 59661 - Lambda expression compile fails with NullReferenceException
Summary: Lambda expression compile fails with NullReferenceException
Status: CONFIRMED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Core (show other bugs)
Version: master
Hardware: PC All
: --- normal
Target Milestone: Future Release
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-21 17:40 UTC by Alexander Köplinger [MSFT]
Modified: 2018-02-13 06:17 UTC (History)
4 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
repro code (1021 bytes, text/plain)
2017-09-21 17:40 UTC, Alexander Köplinger [MSFT]
Details
Lambda expression Contains fails (13.51 KB, text/plain)
2017-11-03 16:18 UTC, Anton Maisak
Details

Description Alexander Köplinger [MSFT] 2017-09-21 17:40:20 UTC
Created attachment 24857 [details]
repro code

Compile attached repro code with "csc Program.cs" and run:


> Unhandled Exception:
> System.NullReferenceException: Object reference not set to an instance of an object
>   at System.Linq.Expressions.Compiler.LambdaCompiler.EmitMethodCall (System.Linq.Expressions.Expression obj, System.Reflection.MethodInfo method, System.Linq.Expressions.IArgumentProvider methodCallExpr, System.Linq.Expressions.Compiler.LambdaCompiler+CompilationFlags flags) [0x00002] in /Users/builder/data/lanes/5263/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs:367
>   at System.Linq.Expressions.Compiler.LambdaCompiler.EmitInvocationExpression (System.Linq.Expressions.Expression expr, System.Linq.Expressions.Compiler.LambdaCompiler+CompilationFlags flags) [0x00020] in /Users/builder/data/lanes/5263/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs:185
>   at System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpression (System.Linq.Expressions.Expression node, System.Linq.Expressions.Compiler.LambdaCompiler+CompilationFlags flags) [0x00263] in /Users/builder/data/lanes/5263/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Generated.cs:107
>   at System.Linq.Expressions.Compiler.LambdaCompiler.EmitLambdaBody (System.Linq.Expressions.Compiler.CompilerScope parent, System.Boolean inlined, System.Linq.Expressions.Compiler.LambdaCompiler+CompilationFlags flags) [0x00079] in /Users/builder/data/lanes/5263/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Lambda.cs:233
>   at System.Linq.Expressions.Compiler.LambdaCompiler.EmitLambdaBody () [0x0001a] in /Users/builder/data/lanes/5263/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Lambda.cs:196
>   at System.Linq.Expressions.Compiler.LambdaCompiler.Compile (System.Linq.Expressions.LambdaExpression lambda) [0x0000d] in /Users/builder/data/lanes/5263/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.cs:182
>   at System.Linq.Expressions.Expression`1[TDelegate].Compile (System.Boolean preferInterpretation) [0x00000] in /Users/builder/data/lanes/5263/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs:209
>   at System.Linq.Expressions.Expression`1[TDelegate].Compile () [0x00000] in /Users/builder/data/lanes/5263/mono-mac-sdk/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs:192
>   at Program+TestClass.Test () [0x00075] in /Users/alexander/dev/test/Program.cs:21
>   at Program.Main () [0x00001] in /Users/alexander/dev/test/Program.cs:9

I noticed this in a test from ms-test-suite. It seems to be an issue in CoreFx, they actually have the same test there but it's disabled currently: https://github.com/dotnet/corefx/blob/dd48b05151c56fcf92cacc071f80fd39c099cadc/src/System.Linq.Expressions/tests/Lambda/LambdaTests.cs#L58-L71
Comment 1 Anton Maisak 2017-11-03 16:15:25 UTC
I have the same issue, when executing the folowing:


> if (!string.IsNullOrWhiteSpace(searchPhrase)) {
>      items = items.Where(c => c.Description.Contains(searchPhrase));
> }


Mono JIT compiler version 5.4.0.201 (tarball Fri Oct 13 21:51:45 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen (concurrent by default)


Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial

Version Information: 5.4.0.201 (tarball Fri Oct 13 21:51:45 UTC 2017); ASP.NET Version: 4.0.30319.42000


System.NullReferenceException
Object reference not set to an instance of an object

Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Core.
Exception stack trace:
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitMethodCall (System.Linq.Expressions.Expression obj, System.Reflection.MethodInfo method, System.Linq.Expressions.IArgumentProvider methodCallExpr, System.Linq.Expressions.Compiler.LambdaCompiler+CompilationFlags flags) [0x00002] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitInvocationExpression (System.Linq.Expressions.Expression expr, System.Linq.Expressions.Compiler.LambdaCompiler+CompilationFlags flags) [0x0002d] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpression (System.Linq.Expressions.Expression node, System.Linq.Expressions.Compiler.LambdaCompiler+CompilationFlags flags) [0x00263] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpression (System.Linq.Expressions.Expression node) [0x00000] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitInstance (System.Linq.Expressions.Expression instance, System.Type& type) [0x00035] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitMemberExpression (System.Linq.Expressions.Expression expr) [0x00018] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpression (System.Linq.Expressions.Expression node, System.Linq.Expressions.Compiler.LambdaCompiler+CompilationFlags flags) [0x00288] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitLambdaBody (System.Linq.Expressions.Compiler.CompilerScope parent, System.Boolean inlined, System.Linq.Expressions.Compiler.LambdaCompiler+CompilationFlags flags) [0x00085] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitLambdaBody () [0x0001a] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.Compile (System.Linq.Expressions.LambdaExpression lambda) [0x0000d] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.LambdaExpression.Compile (System.Boolean preferInterpretation) [0x00000] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.LambdaExpression.Compile () [0x00000] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Data.Entity.Core.Objects.ELinq.QueryParameterExpression.EvaluateParameter (System.Object[] arguments) [0x0008d] in <b7b192e5a05f4f14a14aa0d5b14aeeeb>:0 
  at System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan (System.Nullable`1[T] forMergeOption) [0x002e5] in <b7b192e5a05f4f14a14aa0d5b14aeeeb>:0 
  at System.Data.Entity.Core.Objects.ObjectQuery`1+<>c__DisplayClass7[T].<GetResults>b__6 () [0x0000b] in <b7b192e5a05f4f14a14aa0d5b14aeeeb>:0 
  at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T] (System.Func`1[TResult] func, System.Data.Entity.Infrastructure.IDbExecutionStrategy executionStrategy, System.Boolean startLocalTransaction, System.Boolean releaseConnectionOnSuccess) [0x0008a] in <b7b192e5a05f4f14a14aa0d5b14aeeeb>:0 
  at System.Data.Entity.Core.Objects.ObjectQuery`1+<>c__DisplayClass7[T].<GetResults>b__5 () [0x00033] in <b7b192e5a05f4f14a14aa0d5b14aeeeb>:0 
  at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult] (System.Func`1[TResult] operation) [0x00000] in <b7b192e5a05f4f14a14aa0d5b14aeeeb>:0 
  at System.Data.Entity.Core.Objects.ObjectQuery`1[T].GetResults (System.Nullable`1[T] forMergeOption) [0x00093] in <b7b192e5a05f4f14a14aa0d5b14aeeeb>:0 
  at System.Data.Entity.Core.Objects.ObjectQuery`1[T].<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0 () [0x00000] in <b7b192e5a05f4f14a14aa0d5b14aeeeb>:0 
  at System.Data.Entity.Internal.LazyEnumerator`1[T].MoveNext () [0x00008] in <b7b192e5a05f4f14a14aa0d5b14aeeeb>:0 
  at System.Linq.Enumerable.Single[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0003d] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__3[TResult] (System.Collections.Generic.IEnumerable`1[T] sequence) [0x00000] in <b7b192e5a05f4f14a14aa0d5b14aeeeb>:0 
  at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult] (System.Collections.Generic.IEnumerable`1[T] query, System.Linq.Expressions.Expression queryRoot) [0x00006] in <b7b192e5a05f4f14a14aa0d5b14aeeeb>:0 
  at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult] (System.Linq.Expressions.Expression expression) [0x00014] in <b7b192e5a05f4f14a14aa0d5b14aeeeb>:0 
  at System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult] (System.Linq.Expressions.Expression expression) [0x00022] in <b7b192e5a05f4f14a14aa0d5b14aeeeb>:0 
  at System.Linq.Queryable.Count[TSource] (System.Linq.IQueryable`1[T] source) [0x0002f] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at Sirius.Web.Controllers.ClaimController.GetClaim (Sirius.Core.Entity.ViewModel.Claim.ClaimFilterViewModel f) [0x0075b] in <bdbeac0fdffe4e68b650b1c33dd578c7>:0 
  at (wrapper dynamic-method) System.Object:lambda_method (System.Runtime.CompilerServices.Closure,System.Web.Mvc.ControllerBase,object[])
  at System.Web.Mvc.ActionMethodDispatcher.Execute (System.Web.Mvc.ControllerBase controller, System.Object[] parameters) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.ReflectedActionDescriptor.Execute (System.Web.Mvc.ControllerContext controllerContext, System.Collections.Generic.IDictionary`2[TKey,TValue] parameters) [0x00072] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionDescriptor actionDescriptor, System.Collections.Generic.IDictionary`2[TKey,TValue] parameters) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncControllerActionInvoker+ActionInvocation.InvokeSynchronousActionMethod () [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39 (System.IAsyncResult asyncResult, System.Web.Mvc.Async.AsyncControllerActionInvoker+ActionInvocation innerInvokeState) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at (wrapper delegate-invoke) System.Web.Mvc.Async.EndInvokeDelegate`2[System.Web.Mvc.Async.AsyncControllerActionInvoker+ActionInvocation,System.Web.Mvc.ActionResult]:invoke_TResult_IAsyncResult_TState (System.IAsyncResult,System.Web.Mvc.Async.AsyncControllerActionInvoker/ActionInvocation)
  at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`2[TResult,TState].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1[TResult].End () [0x00029] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d () [0x00014] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters+<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f () [0x00086] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters+<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f () [0x00086] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32 (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`1[TResult].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1[TResult].End () [0x00029] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass21+<>c__DisplayClass2b.<BeginInvokeAction>b__1c () [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass21.<BeginInvokeAction>b__1e (System.IAsyncResult asyncResult) [0x00041] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`1[TResult].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1[TResult].End () [0x00029] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d (System.IAsyncResult asyncResult, System.Web.Mvc.Controller+ExecuteCoreState innerState) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at (wrapper delegate-invoke) System.Web.Mvc.Async.EndInvokeVoidDelegate`1[System.Web.Mvc.Controller+ExecuteCoreState]:invoke_void_IAsyncResult_TState (System.IAsyncResult,System.Web.Mvc.Controller/ExecuteCoreState)
  at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid`1[TState].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1[TResult].End () [0x00029] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper.End (System.IAsyncResult asyncResult, System.Object tag) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Controller.EndExecuteCore (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Controller.<BeginExecute>b__15 (System.IAsyncResult asyncResult, System.Web.Mvc.Controller controller) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid`1[TState].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1[TResult].End () [0x00029] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper.End (System.IAsyncResult asyncResult, System.Object tag) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Controller.EndExecute (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5 (System.IAsyncResult asyncResult, System.Web.Mvc.MvcHandler+ProcessRequestState innerState) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at (wrapper delegate-invoke) System.Web.Mvc.Async.EndInvokeVoidDelegate`1[System.Web.Mvc.MvcHandler+ProcessRequestState]:invoke_void_IAsyncResult_TState (System.IAsyncResult,System.Web.Mvc.MvcHandler/ProcessRequestState)
  at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid`1[TState].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1[TResult].End () [0x00029] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.Async.AsyncResultWrapper.End (System.IAsyncResult asyncResult, System.Object tag) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.MvcHandler.EndProcessRequest (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest (System.IAsyncResult result) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0 
  at System.Web.HttpApplication.async_handler_complete_cb (System.IAsyncResult ar) [0x00015] in <347f335902b24586a53361aa1278a360>:0
Comment 2 Anton Maisak 2017-11-03 16:18:55 UTC
Created attachment 25554 [details]
Lambda expression Contains  fails



Mono JIT compiler version 5.4.0.201 (tarball Fri Oct 13 21:51:45 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen (concurrent by default)


Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial


> if (!string.IsNullOrWhiteSpace(searchPhrase)) {
>      items = items.Where(c => c.Description.Contains(searchPhrase));
> }




System.NullReferenceException
Object reference not set to an instance of an object

Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Core.
Exception stack trace:
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitMethodCall (System.Linq.Expressions.Expression obj, System.Reflection.MethodInfo method, System.Linq.Expressions.IArgumentProvider methodCallExpr, System.Linq.Expressions.Compiler.LambdaCompiler+CompilationFlags flags) [0x00002] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitInvocationExpression (System.Linq.Expressions.Expression expr, System.Linq.Expressions.Compiler.LambdaCompiler+CompilationFlags flags) [0x0002d] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpression (System.Linq.Expressions.Expression node, System.Linq.Expressions.Compiler.LambdaCompiler+CompilationFlags flags) [0x00263] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpression (System.Linq.Expressions.Expression node) [0x00000] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitInstance (System.Linq.Expressions.Expression instance, System.Type& type) [0x00035] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitMemberExpression (System.Linq.Expressions.Expression expr) [0x00018] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitExpression (System.Linq.Expressions.Expression node, System.Linq.Expressions.Compiler.LambdaCompiler+CompilationFlags flags) [0x00288] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitLambdaBody (System.Linq.Expressions.Compiler.CompilerScope parent, System.Boolean inlined, System.Linq.Expressions.Compiler.LambdaCompiler+CompilationFlags flags) [0x00085] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.EmitLambdaBody () [0x0001a] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.Compiler.LambdaCompiler.Compile (System.Linq.Expressions.LambdaExpression lambda) [0x0000d] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.LambdaExpression.Compile (System.Boolean preferInterpretation) [0x00000] in <7c7d16af841f44d5a362340966c7fd69>:0 
  at System.Linq.Expressions.LambdaExpression.Compile () [0x00000] in <7c7d16af841f44d5a362340966c7fd69>:0 


Version Information: 5.4.0.201 (tarball Fri Oct 13 21:51:45 UTC 2017); ASP.NET Version: 4.0.30319.42000
Comment 3 Andrey Berezniker 2018-02-13 06:17:48 UTC
Any progress on this issue?

Note You need to log in before you can comment on or make changes to this bug.