RadWindow Exception on closing

5 posts, 0 answers
  1. Christian
    Christian avatar
    12 posts
    Member since:
    Aug 2010

    Posted 18 Apr 2011 Link to this post

    Hi there,

    I did add the RadWindow class to my project and I found an exception occuring somehow in a random fashion.

    There are serveral RadWindows in my application and they do work fine. But when I do add the ShowDialog of one of the RadWindows to the SelectionChanged event of a RadTreeView on my form, I do receive the exception shown below when closing the window again. This exception does not always show up, it only occures in a somehow random way. As you can see, there seems to be a problem in the OnThumbDragStarted event handler or one of the methods it is using.

    I'm using the Q1 2011 version of the telerik libraries as I did update the version when I was working on this issue, but the update did not solve the problem.

    Do you guys have an idea why I do receive this exception?

    <P>Parameter name: otherVisual</P>
    <P>at System.Windows.Media.Visual.FindCommonVisualAncestor(DependencyObject 
    otherVisual)</P>
    <P>at System.Windows.Media.Visual.TransformToVisual(Visual visual)</P>
    <P>at Telerik.Windows.Controls.RadWindow.OnThumbDragStarted(Object sender, 
    DragStartedEventArgs e) in 
    c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\RadWindow.cs:line 
    2125</P>
    <P>at 
    System.Windows.Controls.Primitives.DragStartedEventArgs.InvokeEventHandler(Delegate 
    genericHandler, Object genericTarget)</P>
    <P>at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object 
    target)</P>
    <P>at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, 
    RoutedEventArgs routedEventArgs)</P>
    <P>at System.Windows.EventRoute.InvokeHandlersImpl(Object source, 
    RoutedEventArgs args, Boolean reRaised)</P>
    <P>at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, 
    RoutedEventArgs args)</P>
    <P>at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)</P>
    <P>at 
    System.Windows.Controls.Primitives.Thumb.OnMouseLeftButtonDown(MouseButtonEventArgs 
    e)</P>
    <P>at System.Windows.UIElement.OnMouseLeftButtonDownThunk(Object sender, 
    MouseButtonEventArgs e)</P>
    <P>at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate 
    genericHandler, Object genericTarget)</P>
    <P>at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object 
    target)</P>
    <P>at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, 
    RoutedEventArgs routedEventArgs)</P>
    <P>at System.Windows.EventRoute.InvokeHandlersImpl(Object source, 
    RoutedEventArgs args, Boolean reRaised)</P>
    <P>at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, 
    RoutedEventArgs args, RoutedEvent newEvent)</P>
    <P>at System.Windows.UIElement.OnMouseDownThunk(Object sender, 
    MouseButtonEventArgs e)</P>
    <P>at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate 
    genericHandler, Object genericTarget)</P>
    <P>at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object 
    target)</P>
    <P>at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, 
    RoutedEventArgs routedEventArgs)</P>
    <P>at System.Windows.EventRoute.InvokeHandlersImpl(Object source, 
    RoutedEventArgs args, Boolean reRaised)</P>
    <P>at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, 
    RoutedEventArgs args)</P>
    <P>at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)</P>
    <P>at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean 
    trusted)</P>
    <P>at System.Windows.Input.InputManager.ProcessStagingArea()</P>
    <P>at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)</P>
    <P>at System.Windows.Input.InputProviderSite.ReportInput(InputReport 
    inputReport)</P>
    <P>at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, 
    InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, 
    Int32 wheel)</P>
    <P>at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, 
    WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)</P>
    <P>at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 
    msg, IntPtr wParam, IntPtr lParam, Boolean& handled)</P>
    <P>at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr 
    lParam, Boolean& handled)</P>
    <P>at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)</P>
    <P>at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate 
    callback, Object args, Int32 numArgs)</P>
    <P>at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, 
    Delegate method, Object args, Int32 numArgs, Delegate catchHandler)</P>
    <P>at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority 
    priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)</P>
    <P>at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr 
    wParam, IntPtr lParam)</P>
    <P>at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)</P>
    <P>at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame 
    frame)</P>
    <P>at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)</P>
    <P>at System.Windows.Threading.Dispatcher.Run()</P>

    at

  2. George
    Admin
    George avatar
    1332 posts

    Posted 21 Apr 2011 Link to this post

    Hello Christian,

    Thank you for contacting us.

    Could you please call the RadWindow.ShowDialog method within a Dispatcher? This could resolve the problem. Please, let me know if this helps, I am glad to assist you further.


    Regards,
    George
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Christian
    Christian avatar
    12 posts
    Member since:
    Aug 2010

    Posted 21 Apr 2011 Link to this post

    Hi George,

    I'm calling the ShowDialog method now this way:

    Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => dlg.ShowDialog()));

    and I did not receive the exception anymore but i certainly need to investigate it further....

    Why is the ShowDialog method causing these troubles?
  5. George
    Admin
    George avatar
    1332 posts

    Posted 27 Apr 2011 Link to this post

    Hello Christian,

    We are not sure what causes this exception. We will greatly appreciate a sample project that reproduces the problem, so we can make some tests and pinpoint the problem locally. Can you attach the project to this thread? 


    Regards,
    George
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Christian
    Christian avatar
    12 posts
    Member since:
    Aug 2010

    Posted 27 Apr 2011 Link to this post

    Hi George,

    I can not attach the real project as it is way too big to add it here but i will create a demo project where this problem occures. I will post it here the next few days when I find time to create the project...

    Regards
    Chris
Back to Top
UI for WPF is Visual Studio 2017 Ready