I have a Windows Phone 8.1 Application.
I have an intermittent crash in my application due to an exception with the following stack trace
Object reference not set to an instance of an object.
at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
at Intuit.Mint.Behaviors.BindableBase.NotifyPropertyChanged(String propertyName)
at Intuit.Mint.ViewModels.MyViewModel.set_MyResultsCollection(CollectionViewSource value)
at Intuit.Mint.ViewModels.MyViewModel.<GetMyDataOnQuery>d__35.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Intuit.Mint.ViewModels.MyViewModel.<<set_QueryString>b__8_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__3(Object state)
at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()
I have the following code.
MyResultsCollection = new CollectionViewSource();
MyResultsCollection.Source = response.ToGroups(x => x, x => x.MyProperty);
MyResultsCollection.IsSourceGrouped = true;
I verified the exception is not due to response being null. I'm unable to understand why the exception is being thrown in PropertyChangedEvenHandler of the setter of my property.
I would be very glad if someone can point me in the right direction. Thanks in advance.