This question is locked. New answers and comments are not allowed.
I have a C# Windows Phone 8 app that uses the RadDiagnostics control. If I test the control by putting an Exception in response to a button click on the About form, it works fine. I get the option to E-mail the stack trace to the developer (me). However, if I throw an Exception in a View Model method that is called by the property changed handler for a user control DependencyProperty when that property changes, I see the stack trace in the output window but the E-mail dialog never pops up. This means that when I run the app outside the debugger, all Exceptions that occur in this context are swallowed by the app with no feedback given to the user.
How can I fix this and why is it happening in this one context when it works fine outside this context?
Here is the stack trace:
Here is the code that initializes the RadDiagnostics control found in the App() constructor in app.xaml.cs:
How can I fix this and why is it happening in this one context when it works fine outside this context?
Here is the stack trace:
System.Windows.Data Error: Cannot save value from target back to source. BindingExpression: Path='SelectedFlyingRobots_VideosListControlCollection' DataItem='WPAppStudio.ViewModel.Robots_VideosViewModel' (HashCode=4687385); target element is 'WPAppStudio.Controls.LongListSelector' (Name='FlyingRobots_VideosListControl'); target property is 'SelectedItem' (type 'System.Object').. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Testing RadDiagnostics control.
at CustomAds.CustomAdsFramework.NextCustomAd(CustomAdsControl customAdControl)
at CustomAds.CustomAdsControl.NextCustomAd()
at CustomAds.CustomAdsControl.VideoShownCountPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.RefreshExpression(DependencyProperty dp)
at System.Windows.Data.BindingExpression.SendDataToTarget()
at System.Windows.Data.BindingExpression.SourcePropertyChanged(PropertyPathListener sender, PropertyPathChangedEventArgs args)
at System.Windows.PropertyPathListener.RaisePropertyPathStepChanged(PropertyPathStep source)
at System.Windows.PropertyAccessPathStep.RaisePropertyPathStepChanged(PropertyListener source)
at System.Windows.CLRPropertyListener.SourcePropertyChanged(Object sender, PropertyChangedEventArgs args)
at System.Windows.Data.WeakPropertyChangedListener.PropertyChangedCallback(Object sender, PropertyChangedEventArgs args)
at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
at WPAppStudio.Entities.Base.BindableBase.OnPropertyChanged(String propertyName)
at WPAppStudio.Entities.Base.BindableBase.SetProperty[T](T& storage, T value, String propertyName)
at WPAppStudio.ViewModel.Robots_VideosViewModel.set_ShowVideoCount(Int32 value)
at WPAppStudio.ViewModel.Robots_VideosViewModel.ShowVideoDetailsGrid(YouTubeVideo selectedYouTubeVideo)
at WPAppStudio.ViewModel.Robots_VideosViewModel.set_SelectedFlyingRobots_VideosListControlCollection(YouTubeVideo value)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
at System.Windows.CLRPropertyListener.set_Value(Object value)
at System.Windows.PropertyAccessPathStep.set_Value(Object value)
at System.Windows.Data.BindingExpression.UpdateValue().
Here is the code that initializes the RadDiagnostics control found in the App() constructor in app.xaml.cs:
// Initialize the RadDiagnostics component.
Diagnostics = new RadDiagnostics();
Diagnostics.EmailTo = "someemail@somedomain.com";
Diagnostics.EmailSubject = String.Format("Exception details during {0} operation.", WPAppStudio.Resources.AppTemplateConfig.AppName);
Diagnostics.HandleUnhandledException = true;
Diagnostics.Init();