I upgraded to the Q2 release for WPF and I'm now getting intermittent NullReferenceExceptions coming from the following exception below.
This seems to be due to the fact that CoverRectangle is backed by a WeakReference.
What seems to be happening is CoverRectangle is being GCed during the drag operation. This may be due to the fact that in .NET 4 the GC is much more aggressive.
Thanks,
Kavan
Stack Trace
-----------
1) Type: NullReferenceException (System.NullReferenceException)
1) Message: Object reference not set to an instance of an object.
1) Data: YES (1 Entries Below)
1) Key: 'System.Object' Value: ''
1) ** Stack Trace:
1) at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.PositionArrow() in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2\Sources\Development\Core\Controls\DragDrop\RadDragAndDropManager.cs:line 1573
1) at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.OnRealDrag(IMouseEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2\Sources\Development\Core\Controls\DragDrop\RadDragAndDropManager.cs:line 1318
1) at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.OnCoverRectangleMouseMove(Object sender, MouseEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2\Sources\Development\Core\Controls\DragDrop\RadDragAndDropManager.cs:line 856
1) at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
1) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
1) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
1) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
1) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
1) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
1) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
1) at System.Windows.Input.InputManager.ProcessStagingArea()
1) at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
1) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
1) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
1) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
1) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
1) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
1) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
1) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
1) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
1) ** No Inner Exception