Null Reference Exception

4 posts, 0 answers
  1. Randy
    Randy avatar
    6 posts
    Member since:
    Mar 2012

    Posted 17 Aug 2015 Link to this post

    Hi,

     I'm regularly getting the following exception whenever I move around my Window with a RadBusyIndicator in it. There are multiple windows, each with their own busy indicator. (The Window is a template, and is filled dynamically at runtime.

    01.No Title
    02.System.NullReferenceException was unhandled
    03.  HResult=-2147467261
    04.  Message=Object reference not set to an instance of an object.
    05.  Source=Telerik.Windows.Controls
    06.  StackTrace:
    07.       at Telerik.Windows.Automation.Peers.RadBusyIndicatorAutomationPeer.GetCustomPropertyValuesCore()
    08.       at Telerik.Windows.Automation.Peers.RadBusyIndicatorAutomationPeer.GetItemStatusCore()
    09.       at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
    10.       at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
    11.       at System.Windows.Automation.Peers.AutomationPeer.UpdatePeer(Object arg)
    12.       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
    13.       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
    14.       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
    15.       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
    16.       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    17.       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    18.       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    19.       at System.Windows.Threading.DispatcherOperation.Invoke()
    20.       at System.Windows.Threading.Dispatcher.ProcessQueue()
    21.       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    22.       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    23.       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
    24.       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
    25.       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
    26.       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
    27.       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    28.  InnerException: 

     

    Any ideas?

    Thanks!

     

     

  2. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 18 Aug 2015 Link to this post

    Hi Randy,

    We aware of explained issue and it has been already fixed in the latest internal build - please download it and give it a try. However the issue is related with the AutomationPeers of RadBusyIndicator and Coded UI, so if you are not using Coded UI for testing you can use an easy workaround by setting the AutomationMode property to Basic:

    AutomationManager.AutomationMode = AutomationMode.Basic;
    InitializeComponent();

    I apologize for any inconvenience caused.

    Regards,
    Kalin
    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Amr
    Amr avatar
    1 posts
    Member since:
    May 2015

    Posted 01 Sep 2015 in reply to Kalin Link to this post

    HI,

    We are having the same issue with the UI Automation. Is the fix included in the latest version? could you specify the version number?

    Also, We are seeing the same issue out side of UI Automation and I found an article that says it is because of the AutomationID and the workaround is to remove it but that did not solve the issue. Are these related to the same problem and is the workaround you mentioned will fix them?

  5. Georgi
    Admin
    Georgi avatar
    350 posts

    Posted 02 Sep 2015 Link to this post

    Hi Amr,

    The issue is fixed and it is available in the latest internal build (2015.2.831) as it was first included in the internal build with version 2015.2.810(more information you can find in its feedback item).
    Also it can be reproduced when the BusyContent is set to null and the issue comes from the AutomationPeers of the BusyIndicator. Therefore it can be reproduced with UI Automation, but  it can be as well оbserved with any screen reader or with software or device (like touch monitor) that reads AutomationPeers.
     
    So it is not related to the other issue where removing the AutomationId solves the problem and if you are still experiencing the issue with the latest internal build, please don't hesitate to write us with more details on the matter.

    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