ArgumentNullException showing PaneGroup without Panes

10 posts, 1 answers
  1. Peter
    Peter avatar
    7 posts
    Member since:
    Sep 2011

    Posted 28 Nov 2012 Link to this post

    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:

  2. Answer
    Georgi
    Admin
    Georgi avatar
    348 posts

    Posted 03 Dec 2012 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Peter
    Peter avatar
    7 posts
    Member since:
    Sep 2011

    Posted 06 Dec 2012 Link to this post

    Yes, the fix works.

    Thanks!
    Peter
  5. Ammar
    Ammar avatar
    3 posts
    Member since:
    Sep 2012

    Posted 20 Jun 2013 Link to this post



    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,
  6. Georgi
    Admin
    Georgi avatar
    348 posts

    Posted 25 Jun 2013 Link to this post

    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.

  7. Chick Leiby
    Chick Leiby avatar
    3 posts
    Member since:
    Feb 2010

    Posted 27 Jan 2015 in reply to Georgi Link to this post

    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.
  8. Georgi
    Admin
    Georgi avatar
    348 posts

    Posted 28 Jan 2015 Link to this post

    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.

     
  9. Chick Leiby
    Chick Leiby avatar
    3 posts
    Member since:
    Feb 2010

    Posted 28 Jan 2015 in reply to Georgi Link to this post

    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.
  10. Minh
    Minh avatar
    43 posts
    Member since:
    May 2014

    Posted 01 Mar Link to this post

    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.
  11. Georgi
    Admin
    Georgi avatar
    348 posts

    Posted 02 Mar Link to this post

    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
Back to Top
UI for WPF is Visual Studio 2017 Ready