RadDiagnostics does not pop up E-mail dialog

5 posts, 0 answers
  1. Robert
    Robert avatar
    5 posts
    Member since:
    Jan 2014

    Posted 12 Jan 2014 Link to this post

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

  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 16 Jan 2014 Link to this post

    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.
  3. DevCraft banner
  4. Robert
    Robert avatar
    5 posts
    Member since:
    Jan 2014

    Posted 16 Jan 2014 Link to this post

    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.
  5. Todor
    Admin
    Todor avatar
    778 posts

    Posted 22 Jan 2014 Link to this post

    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.
  6. Robert
    Robert avatar
    5 posts
    Member since:
    Jan 2014

    Posted 22 Jan 2014 Link to this post

    Thanks Todor.
Back to Top
DevCraft banner