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

Null Reference Exception

3 Answers 158 Views
BusyIndicator
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 17 Aug 2015, 07:48 PM

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!

 

 

3 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 18 Aug 2015, 06:48 AM
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
0
Amr
Top achievements
Rank 1
answered on 01 Sep 2015, 02:21 PM

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?

0
Georgi
Telerik team
answered on 02 Sep 2015, 07:34 AM
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
Tags
BusyIndicator
Asked by
Randy
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Amr
Top achievements
Rank 1
Georgi
Telerik team
Share this question
or