This is a migrated thread and some comments may be shown as answers.

ArgumentNullException showing PaneGroup without Panes

9 Answers 138 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 28 Nov 2012, 10:41 AM
On some machines showing a window with a RadPaneGroup that does not contain any Panes throws a ArgumentNullException.

On my dev workstation the window shows fine. The same windows crashes on my dev notebook.
No version differences: I can reproduce the crash by copying the bin directory to the notebook and starting the exe.

As a workaround I created a dummy pane in XAML and remove it in the _Loaded event.
EDIT: This workaround does not help. IsHidden for the dummyPane does not work too.

<telerik:RadDocking x:Name="dock" Grid.Row="1" PreviewClose="dock_PreviewClose" Close="dock_Close">
    <telerik:RadDocking.DocumentHost>
        <telerik:RadSplitContainer>
            <telerik:RadPaneGroup x:Name="paneGroup"  >
              <!-- Workaround for System.ArgumentNullException on Notebook -->
                <telerik:RadPane x:Name="dummyPane" Header="aaa" CanUserPin="True" >
                </telerik:RadPane>
            </telerik:RadPaneGroup>
        </telerik:RadSplitContainer>
    </telerik:RadDocking.DocumentHost>
</telerik:RadDocking>

System.ArgumentNullException was unhandled by user code
  HResult=-2147467261
  Message=Value cannot be null.
Parameter name: collection
  ParamName=collection
  Source=mscorlib
  StackTrace:
       at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
       at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
       at Telerik.Windows.Controls.RadTabControlAutomationPeer.GetChildrenCore() in c:\TB\135\WPF_Scrum\Release_WPF\Sources

\Development\Controls\Navigation\TabControl\RadTabControlAutomationPeer.cs:line 194
       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.UIElement.UpdateLayout()
       at System.Windows.Interop.HwndSource.Process_WM_SIZE(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr

wParam, IntPtr lParam)
       at System.Windows.Interop.HwndSource.LayoutFilterMessage(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs,

Delegate catchHandler)
  InnerException:

9 Answers, 1 is accepted

Sort by
0
Accepted
Georgi
Telerik team
answered on 03 Dec 2012, 12:39 PM
Hello Peter,

The issue is caused by RadTabControl bug and it is already fixed. The fix is available in Q3 2012 SP1, it would be great if you can give it a try and let us know if everything works as expected.
If you have any other question, please don't hesitate to contact us.

Regards,
Georgi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Peter
Top achievements
Rank 1
answered on 06 Dec 2012, 11:39 AM
Yes, the fix works.

Thanks!
Peter
0
Ammar
Top achievements
Rank 1
answered on 20 Jun 2013, 03:24 PM


Hi Georgi,


I am having sort of the same issue as explained by Peter. This problem only exists for some systems. It happens when the app is loading and the focus is on one of the RadPanes. The app crashed with the following stack trace.

ERROR 1  2013-06-19 16:52:40.3846 - An unexpected error occured in the HandleException() method  System.ArgumentNullException: Value cannot be null.
Parameter name: collection
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at Telerik.Windows.Controls.RadTabControlAutomationPeer.GetChildrenCore()
   at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
   at System.Windows.Automation.Peers.AutomationPeer.GetChildren()
   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)
   at System.Windows.Automation.Peers.AutomationPeer.ValidateConnected(AutomationPeer connectedPeer)
   at MS.Internal.Automation.ElementProxy.StaticWrap(AutomationPeer peer, AutomationPeer referencePeer)
   at System.Windows.Automation.Peers.AutomationPeer.RaiseAutomationEvent(AutomationEvents eventId)
   at System.Windows.Automation.Peers.SelectorAutomationPeer.RaiseSelectionEvents(SelectionChangedEventArgs e)


This does not take place if I don't have my focus on the RadPane. Is there any work around or do I have to consider and upgrade. Also the error repeatedly keeps getting thrown. Please let me know if you need anything else.

Thank you,
0
Georgi
Telerik team
answered on 25 Jun 2013, 10:01 AM
Hi Ammar,

It does look like the same issue, unfortunately we are not aware of any workaround.
Also can you confirm that you are using version prior than Q3 2012 SP1?
If that is the case, I think it would be best if you can try the Q3 2012 SP1 assemblies from here and check if the issue still exists. If you are using controls version after the Q3 2012 SP1 or you are still experiencing the issue we will need more information on how to reproduce it. So in that case it would be great if you can send us a simple project where the issue can be reproduced.
So if using Q3 2012 SP1 assemblies fixes the issue and as there is no workaround you may need to consider upgrading to Q3 2012 SP1 or newer version.

Regards,
Georgi
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Chick Leiby
Top achievements
Rank 1
answered on 27 Jan 2015, 02:11 PM
We've started running into the same problem with one specific Windows 8.1 machine, but haven't seen it on any others (yet).  However, we are leery to update to the newest version of the Rad Controls because of so many changes to the object model and the default visuals that have been made in the past two years.  I was curious if you were able to identify the environmental factor that would cause this problem to occur.
0
Georgi
Telerik team
answered on 28 Jan 2015, 02:13 PM
Hi Chick,

As the source of the issue is in the AutomationPeers of the RadTabControl it can be caused by any software using them like for example  the Microsoft Narrator, JAWS or some testing tools.
Also the automation peers are used by any touch devices, touch monitors and screen readers.

Hope this would be helpful.

Regards,
Georgi
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Chick Leiby
Top achievements
Rank 1
answered on 28 Jan 2015, 06:43 PM
Thank you so much, Georgi!  That was exactly the information I needed.  Turns out the problem machine is a laptop with a touchscreen.  Once they disabled the touchscreen capabilities, everything worked just fine again.
0
Minh
Top achievements
Rank 1
answered on 01 Mar 2016, 03:21 PM
Hi, is there any fix around this yet? What if they try to access the app through a surface, we can't simply turn off touchscreen processes.
0
Georgi
Telerik team
answered on 02 Mar 2016, 11:11 AM
Hi,

Please note, that we are not aware of any current issues with RadDocking and AutomationPeers(the issue form this thread was fixed in Q3 2012 SP1). So if you are still facing the issue with the latest release, don't hesitate to write us with more information on the matter.

Nevertheless you can disable the automation peers as shown below:

public App()
    {
        AutomationManager.AutomationMode = AutomationMode.Disabled;
        this.InitializeComponent();
    }


Also more information on the AutomaitonModes (available since Q2 2014 SP) you can find here.

Hope this would help.

Regards,
Georgi
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Docking
Asked by
Peter
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Peter
Top achievements
Rank 1
Ammar
Top achievements
Rank 1
Chick Leiby
Top achievements
Rank 1
Minh
Top achievements
Rank 1
Share this question
or