{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/3284","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/3284/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/3284/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/3284/events","html_url":"https://github.com/aspnet/Mvc/issues/3284","id":110305489,"number":3284,"title":"ArgumentNullException when returning empty ViewResult","user":{"login":"MartinJohns","id":5269069,"avatar_url":"https://avatars.githubusercontent.com/u/5269069?v=3","gravatar_id":"","url":"https://api.github.com/users/MartinJohns","html_url":"https://github.com/MartinJohns","followers_url":"https://api.github.com/users/MartinJohns/followers","following_url":"https://api.github.com/users/MartinJohns/following{/other_user}","gists_url":"https://api.github.com/users/MartinJohns/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinJohns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinJohns/subscriptions","organizations_url":"https://api.github.com/users/MartinJohns/orgs","repos_url":"https://api.github.com/users/MartinJohns/repos","events_url":"https://api.github.com/users/MartinJohns/events{/privacy}","received_events_url":"https://api.github.com/users/MartinJohns/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/Mvc/labels/1%20-%20Ready","name":"1 - Ready","color":"CCCCCC"},{"url":"https://api.github.com/repos/aspnet/Mvc/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/aspnet/Mvc/milestones/19","html_url":"https://github.com/aspnet/Mvc/milestones/6.0.0-rc1","labels_url":"https://api.github.com/repos/aspnet/Mvc/milestones/19/labels","id":1276905,"number":19,"title":"6.0.0-rc1","description":"","creator":{"login":"Eilon","id":202643,"avatar_url":"https://avatars.githubusercontent.com/u/202643?v=3","gravatar_id":"","url":"https://api.github.com/users/Eilon","html_url":"https://github.com/Eilon","followers_url":"https://api.github.com/users/Eilon/followers","following_url":"https://api.github.com/users/Eilon/following{/other_user}","gists_url":"https://api.github.com/users/Eilon/gists{/gist_id}","starred_url":"https://api.github.com/users/Eilon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eilon/subscriptions","organizations_url":"https://api.github.com/users/Eilon/orgs","repos_url":"https://api.github.com/users/Eilon/repos","events_url":"https://api.github.com/users/Eilon/events{/privacy}","received_events_url":"https://api.github.com/users/Eilon/received_events","type":"User","site_admin":false},"open_issues":65,"closed_issues":10,"state":"open","created_at":"2015-08-28T03:04:38Z","updated_at":"2015-10-08T16:44:09Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-10-07T20:04:38Z","updated_at":"2015-10-08T16:46:14Z","closed_at":null,"body":"Having the following code:\r\n\r\n    public class HomeController\r\n    {\r\n        public IActionResult Index()\r\n        {\r\n            return new ViewResult();\r\n        }\r\n    }\r\n\r\nResults in an `ArgumentNullException`:\r\n\r\n    ArgumentNullException: Value cannot be null. Parameter name: viewData\r\n    Microsoft.AspNet.Mvc.ViewFeatures.ViewExecutor.<ExecuteAsync>d__1.MoveNext()\r\n    --- End of stack trace from previous location where exception was thrown ---\r\n    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n    Microsoft.AspNet.Mvc.ViewResult.<ExecuteResultAsync>d__24.MoveNext()\r\n    --- End of stack trace from previous location where exception was thrown ---\r\n    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n    Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.<InvokeResultAsync>d__53.MoveNext()\r\n    --- End of stack trace from previous location where exception was thrown ---\r\n    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n    Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.<InvokeResultFilterAsync>d__52.MoveNext()\r\n    --- End of stack trace from previous location where exception was thrown ---\r\n    Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.<InvokeAllResultFiltersAsync>d__51.MoveNext()\r\n    --- End of stack trace from previous location where exception was thrown ---\r\n    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n    Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.<InvokeResourceFilterAsync>d__46.MoveNext()\r\n    --- End of stack trace from previous location where exception was thrown ---\r\n    Microsoft.AspNet.Mvc.Controllers.FilterActionInvoker.<InvokeAsync>d__41.MoveNext()\r\n    --- End of stack trace from previous location where exception was thrown ---\r\n    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n    Microsoft.AspNet.Mvc.Infrastructure.MvcRouteHandler.<RouteAsync>d__6.MoveNext()\r\n    --- End of stack trace from previous location where exception was thrown ---\r\n    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n    Microsoft.AspNet.Routing.Template.TemplateRoute.<RouteAsync>d__27.MoveNext()\r\n    --- End of stack trace from previous location where exception was thrown ---\r\n    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n    Microsoft.AspNet.Routing.RouteCollection.<RouteAsync>d__9.MoveNext()\r\n    --- End of stack trace from previous location where exception was thrown ---\r\n    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n    Microsoft.AspNet.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()\r\n    --- End of stack trace from previous location where exception was thrown ---\r\n    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n    Microsoft.AspNet.Diagnostics.DeveloperExceptionPageMiddleware.<Invoke>d__6.MoveNext()\r\n\r\nRunning on the latest version:\r\n- Microsoft.AspNet.vc.6.0.0-rc1-15954\r\n- dnx-coreclr-win-x64-1.0.0-rc1-15798\r\n\r\nIn an older version this still worked."},"comment":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/comments/146617704","html_url":"https://github.com/aspnet/Mvc/issues/3284#issuecomment-146617704","issue_url":"https://api.github.com/repos/aspnet/Mvc/issues/3284","id":146617704,"user":{"login":"Eilon","id":202643,"avatar_url":"https://avatars.githubusercontent.com/u/202643?v=3","gravatar_id":"","url":"https://api.github.com/users/Eilon","html_url":"https://github.com/Eilon","followers_url":"https://api.github.com/users/Eilon/followers","following_url":"https://api.github.com/users/Eilon/following{/other_user}","gists_url":"https://api.github.com/users/Eilon/gists{/gist_id}","starred_url":"https://api.github.com/users/Eilon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eilon/subscriptions","organizations_url":"https://api.github.com/users/Eilon/orgs","repos_url":"https://api.github.com/users/Eilon/repos","events_url":"https://api.github.com/users/Eilon/events{/privacy}","received_events_url":"https://api.github.com/users/Eilon/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T16:46:14Z","updated_at":"2015-10-08T16:46:14Z","body":"Ok so pass in a dummy ViewData if it isn't there?"}}