RadWindow.Alert Exception

4 posts, 0 answers
  1. rui
    rui avatar
    54 posts
    Member since:
    May 2014

    Posted 11 Jan Link to this post

    There is a small probability issue:

    when in a child thread  call the RadWindow.Alert method  to show a message window 

    i use Application.Current.Dispatcher.BeginInvoke to call main thread

     Application.Current.Dispatcher.BeginInvoke((Action)delegate
                    {
                        RadWindow.Alert(new DialogParameters { Header = StringResources.GetCodeMessage("TiShi"), Content = "error", Owner = Application.Current.MainWindow });
                    });

    then there is a NullReferenceException  occur

    the exception stack is as following

    在 Telerik.Windows.Controls.Primitives.TabStripPanel.<>c__DisplayClass14.<MeasureOverride>b__7(UIElement item)
       在 System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
       在 System.Linq.Enumerable.Max(IEnumerable`1 source)
       在 System.Linq.Enumerable.Max[TSource](IEnumerable`1 source, Func`2 selector)
       在 Telerik.Windows.Controls.Primitives.TabStripPanel.<>c__DisplayClass14.<MeasureOverride>b__6(Double total, List`1 next)
       在 System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
       在 Telerik.Windows.Controls.Primitives.TabStripPanel.MeasureOverride(Size availableSize)
       在 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       在 System.Windows.UIElement.Measure(Size availableSize)
       在 System.Windows.ContextLayoutManager.UpdateLayout()
       在 System.Windows.UIElement.UpdateLayout()
       在 System.Windows.Interop.HwndSource.SetLayoutSize()
       在 System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
       在 System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
       在 System.Windows.Window.SetRootVisual()
       在 System.Windows.Window.SetRootVisualAndUpdateSTC()
       在 System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
       在 System.Windows.Window.CreateSourceWindow(Boolean duringShow)
       在 System.Windows.Window.CreateSourceWindowDuringShow()
       在 System.Windows.Window.SafeCreateWindowDuringShow()
       在 System.Windows.Window.ShowHelper(Object booleanBox)
       在 System.Windows.Window.Show()
       在 System.Windows.Window.ShowDialog()
       在 Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Open(Boolean isModal)
       在 Telerik.Windows.Controls.WindowBase.ShowWindow(Boolean isModal)
       在 Telerik.Windows.Controls.RadWindow.ShowDialog()
       在 Telerik.Windows.Controls.RadWindow.ConfigureModal(RadAlert content, DialogParameters dialogParams)
       在 Telerik.Windows.Controls.RadWindow.Alert(DialogParameters dialogParameters)
       在 Eurlanda.DataShire.DataShireIDE.MainUserControl.<MainUserControl_Loaded>b__13() 位置 g:\datashire_cloud_IDE\Eurlanda.DataShire.DataShireIDE\MainUserControl.xaml.cs:行号 528
       在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

    I have no idea about this  issue  

    Is any solution to avoid?

     

  2. Polya
    Admin
    Polya avatar
    239 posts

    Posted 13 Jan Link to this post

    Hi Rui,

    We've tried to reproduce the issue at our side but to no avail.
    I suggest you open a support thread and attach your project so we can investigate further.

    Regards,
    Polya
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. rui
    rui avatar
    54 posts
    Member since:
    May 2014

    Posted 16 Jan in reply to Polya Link to this post

    This issue is under A very small probability, It is difficult to appear again,

    if the exception message  is  no help ,it seems there is no way to solve

  4. Polya
    Admin
    Polya avatar
    239 posts

    Posted 17 Jan Link to this post

    Hello Rui,

    If you manage to reproduce it in a sample project please write back with more details so we can investigate further.

    Regards,
    Polya
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top