This is a migrated thread and some comments may be shown as answers.

RadDiagnostics does not pop up E-mail dialog

4 Answers 40 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert
Top achievements
Rank 1
Robert asked on 12 Jan 2014, 02:24 PM
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:

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();

4 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 16 Jan 2014, 02:25 PM
Hello Robert,

Thank you for writing.

One possibility is that this type of exception contains characters which are not supported by the EmailComposeTask that we use in order to send the email. However, in order to confirm this, it would be best if you could send us a sample project that we can use to reproduce the issue and tell you exactly what happens and suggest you how to use the diagnostics component in this case.

You can open a new support ticket in order to be able to attach your project.

Regards,
Todor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Robert
Top achievements
Rank 1
answered on 16 Jan 2014, 02:36 PM
Hello Todor,

Will do.  It will take me some time to excerpt the necessary bits from the larger project so it will be a while.

Is there any way to activate the RadDiagnostics module from code?  That way I could get around whatever is trapping the unhandled Exception and at least report Exceptions that occur in the context of my code.
0
Todor
Telerik team
answered on 22 Jan 2014, 07:52 AM
Hello Robert,

The only way to start the email report procedure is to throw an exception. There is a public ReportHandledException method, which allows manual reports, but it still requires an actual exception object with Type, Message, StackTrace, etc. as a parameter.

Regards,
Todor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Robert
Top achievements
Rank 1
answered on 22 Jan 2014, 10:03 AM
Thanks Todor.
Tags
General Discussions
Asked by
Robert
Top achievements
Rank 1
Answers by
Todor
Telerik team
Robert
Top achievements
Rank 1
Share this question
or