{"action":"created","issue":{"url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3475","repository_url":"https://api.github.com/repos/Starcounter/Starcounter","labels_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3475/labels{/name}","comments_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3475/comments","events_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3475/events","html_url":"https://github.com/Starcounter/Starcounter/issues/3475","id":146538519,"number":3475,"title":"Object reference not set to an instance of an object.","user":{"login":"atifsheikh","id":4388707,"avatar_url":"https://avatars.githubusercontent.com/u/4388707?v=3","gravatar_id":"","url":"https://api.github.com/users/atifsheikh","html_url":"https://github.com/atifsheikh","followers_url":"https://api.github.com/users/atifsheikh/followers","following_url":"https://api.github.com/users/atifsheikh/following{/other_user}","gists_url":"https://api.github.com/users/atifsheikh/gists{/gist_id}","starred_url":"https://api.github.com/users/atifsheikh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atifsheikh/subscriptions","organizations_url":"https://api.github.com/users/atifsheikh/orgs","repos_url":"https://api.github.com/users/atifsheikh/repos","events_url":"https://api.github.com/users/atifsheikh/events{/privacy}","received_events_url":"https://api.github.com/users/atifsheikh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/P/High","name":"P/High","color":"eb6420"},{"url":"https://api.github.com/repos/Starcounter/Starcounter/labels/Typed%20JSON","name":"Typed JSON","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"chrhol","id":1658979,"avatar_url":"https://avatars.githubusercontent.com/u/1658979?v=3","gravatar_id":"","url":"https://api.github.com/users/chrhol","html_url":"https://github.com/chrhol","followers_url":"https://api.github.com/users/chrhol/followers","following_url":"https://api.github.com/users/chrhol/following{/other_user}","gists_url":"https://api.github.com/users/chrhol/gists{/gist_id}","starred_url":"https://api.github.com/users/chrhol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrhol/subscriptions","organizations_url":"https://api.github.com/users/chrhol/orgs","repos_url":"https://api.github.com/users/chrhol/repos","events_url":"https://api.github.com/users/chrhol/events{/privacy}","received_events_url":"https://api.github.com/users/chrhol/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2016-04-07T07:54:38Z","updated_at":"2016-04-07T13:38:59Z","closed_at":null,"body":"I keep getting the following error in my code : \r\n\r\n> \"System.NullReferenceException: Object reference not set to an instance of an object.\r\n   at lambda_method(Closure , Json )\r\n   at Starcounter.Templates.TObject.BoundOrUnboundGet(Json parent) in C:\\TeamCity\\TeamCity9\\buildAgent\\work\\sc-develop-nightly-245\\Level1\\src\\Starcounter.XSON\\Templates\\TObject.cs:line 130\r\n   at Starcounter.Advanced.XSON.StandardJsonSerializer.PopulateObject(Json json, Template template, JsonReader reader) in C:\\TeamCity\\TeamCity9\\buildAgent\\work\\sc-develop-nightly-245\\Level1\\src\\Starcounter.XSON\\Serializer\\Json\\StandardJsonSerializer.cs:line 707\r\n   at Starcounter.Advanced.XSON.StandardJsonSerializer.Populate(Json json, IntPtr source, Int32 sourceSize) in C:\\TeamCity\\TeamCity9\\buildAgent\\work\\sc-develop-nightly-245\\Level1\\src\\Starcounter.XSON\\Serializer\\Json\\StandardJsonSerializer.cs:line 761\r\n   at Starcounter.Advanced.XSON.StandardJsonSerializer.PopulateObject(Json json, Template template, JsonReader reader) in C:\\TeamCity\\TeamCity9\\buildAgent\\work\\sc-develop-nightly-245\\Level1\\src\\Starcounter.XSON\\Serializer\\Json\\StandardJsonSerializer.cs:line 707\r\n   at Starcounter.Advanced.XSON.StandardJsonSerializer.Populate(Json json, IntPtr source, Int32 sourceSize) in C:\\TeamCity\\TeamCity9\\buildAgent\\work\\sc-develop-nightly-245\\Level1\\src\\Starcounter.XSON\\Serializer\\Json\\StandardJsonSerializer.cs:line 761\r\n   at Starcounter.Json.PopulateFromJson(Byte[] source, Int32 sourceSize) in C:\\TeamCity\\TeamCity9\\buildAgent\\work\\sc-develop-nightly-245\\Level1\\src\\Starcounter.XSON\\Class Json\\Json.Serializing.cs:line 131\r\n   at Starcounter.Rest.UriManagedHandlersCodegen.ReadMessageParam(Request req) in C:\\TeamCity\\TeamCity9\\buildAgent\\work\\sc-develop-nightly-245\\Level1\\src\\Starcounter.Rest\\UriManagedHandlersCodegen.cs:line 211\r\n   at lambda_method(Closure , Request , IntPtr , IntPtr )\r\n   at Starcounter.Rest.UserHandlerInfo.RunUserDelegate(Request req, IntPtr methodSpaceUriSpaceOnStack, IntPtr parametersInfoOnStack) in C:\\TeamCity\\TeamCity9\\buildAgent\\work\\sc-develop-nightly-245\\Level1\\src\\Starcounter.Rest\\UriHandlersManager.cs:line 221\r\n   at Starcounter.Internal.Web.AppRestServer.RunDelegateAndProcessResponse(IntPtr methodSpaceUriSpaceOnStack, IntPtr parametersInfoOnStack, Request req) in C:\\TeamCity\\TeamCity9\\buildAgent\\work\\sc-develop-nightly-245\\Level1\\src\\Starcounter.Apps.JsonPatch\\AppRestServer.cs:line 98\r\n   at Starcounter.Internal.AppsBootstrapper.ProcessExternalRequest(Request req) in C:\\TeamCity\\TeamCity9\\buildAgent\\work\\sc-develop-nightly-245\\Level1\\src\\Starcounter.Apps.JsonPatch\\AppsBootstrapper.cs:line 562\r\nHResult=-2147467261\r\n\"\r\n\r\n\r\nI investigated the issue, and my code paused on a line of code as shown in the following image : \r\n![sc error](https://cloud.githubusercontent.com/assets/4388707/14344168/4c45d5b8-fca6-11e5-959b-0d1c173f273c.jpg)\r\n\r\n\r\nBut the strange thing is, if i replay the  same line of code, everything works fine. By replay i mean, i drag the control (Green pointer in VS on left) and drop the control in 1 line above the error line. the control gets yellow, and if i hit F5 the code works perfectly fine."},"comment":{"url":"https://api.github.com/repos/Starcounter/Starcounter/issues/comments/206908603","html_url":"https://github.com/Starcounter/Starcounter/issues/3475#issuecomment-206908603","issue_url":"https://api.github.com/repos/Starcounter/Starcounter/issues/3475","id":206908603,"user":{"login":"Ripipip","id":7534151,"avatar_url":"https://avatars.githubusercontent.com/u/7534151?v=3","gravatar_id":"","url":"https://api.github.com/users/Ripipip","html_url":"https://github.com/Ripipip","followers_url":"https://api.github.com/users/Ripipip/followers","following_url":"https://api.github.com/users/Ripipip/following{/other_user}","gists_url":"https://api.github.com/users/Ripipip/gists{/gist_id}","starred_url":"https://api.github.com/users/Ripipip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ripipip/subscriptions","organizations_url":"https://api.github.com/users/Ripipip/orgs","repos_url":"https://api.github.com/users/Ripipip/repos","events_url":"https://api.github.com/users/Ripipip/events{/privacy}","received_events_url":"https://api.github.com/users/Ripipip/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T13:38:59Z","updated_at":"2016-04-07T13:38:59Z","body":"@chrhol    at AdFenix.ApiMirror.FacebookApi.v2_5.AdSet.UpdateAdset(String adSetId, String attributes, String action, Campaign campaign, String AdsetName, FacebookAdCampaign facebookAdCampaign) in c:\\adfenix-backend\\src\\ApiMirror\\FacebookApi\\v2_5\\AdSet.cs:line 231\r\n   at AdFenix.ApiMirror.FacebookApi.v2_5.AdSet.CreateAdset(Campaign campaign, String adAccountId, String AdsetName, DateTime StartTime, String CampaignID, Int32 BidAmount, BudgetTemplate budgetTemplate, String adSetId, String action) in c:\\adfenix-backend\\src\\ApiMirror\\FacebookApi\\v2_5\\AdSet.cs:line 134\r\n   at AdFenix.ApiMirror.FacebookApi.v2_5.AdReachEstimate.CheckReachs(Campaign campaign) in c:\\adfenix-backend\\src\\ApiMirror\\FacebookApi\\v2_5\\AdReachEstimate.cs:line 41\r\n   at AdFenix.ApiMirror.FacebookApi.ManageCampaign.CheckStats(Campaign campaign) in c:\\adfenix-backend\\src\\ApiMirror\\FacebookApi\\ManageCampaign.cs:line 189\r\n   at AdFenix.Server.Handlers.TimedFeatures.<Register>b__2b(String status, Request r) in c:\\adfenix-backend\\src\\Server\\Handlers\\TimedFeatures.cs:line 447"}}