Hello,
I ran into a crash when updating the Docking.for.Xaml nuget to the latest stable 2021.1.119 version. This doesn't crash in the previous stable 2020.3.1020 version.
Steps to reproduce: create a .NET Core (did not try with .NET Framework because my actual program uses Core) WPF solution in Visual Studio, copy the PaneGroupExtensions class from https://github.com/telerik/xaml-sdk/blob/master/Docking/PaneGroupItemsSource/PaneGroupExtensions.cs and fix the namespace, and also around lines 48-55 don't bother with content or datacontext for the pane. The important thing just is to create a pane and added to the Group.Items collection. Add the Docking nuget package to the project. Then create a simple ViewModel class for your MainWindow with an collection property named "ForExtension" and set it as the DataContext for the MainWindow.
public class MainWindowViewModel {
public List<
string
> ForExtension { get; set; } = new List<
string
>() { "Hello" };
}
Then add the following simple RadDocking inside your MainWindow.xamls Grid:
<
telerik:RadDocking HasDocumentHost="False"
>
<
telerik:RadSplitContainer
>
<
telerik:RadPaneGroup
>
<
telerik:RadPane
Header
=
"Pane"
IsPinned
=
"False"
CanUserClose
=
"False"
CanFloat
=
"False"
>
<
Grid
>
</
Grid
>
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
<
telerik:RadPaneGroup
local:PaneGroupExtensions.ItemsSource
=
"{Binding ForExtension}"
/>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking
>
When running this program under either version, it starts fine and displays the UI. When clicking on the pane in the left, the newer version of the nuget crashes the program with a System.NullReferenceException, with a call stack of
Exception Info: System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
at System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit)
at System.Windows.Automation.Peers.ItemsControlAutomationPeer.UpdateChildren()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.ContextLayoutManager.fireAutomationEvents()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run()
at RadGrid2021.App.Main()