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

TabControl.Item unhandled exception error

3 Answers 25 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
MikeTest
Top achievements
Rank 1
MikeTest asked on 05 Feb 2013, 03:18 PM

Hello,

The application I am working on is throwing the following unhandled exception whenever I attempt to identify a TabControl WPF object using my automation tool. This issue started occurring when we upgraded our Telerik libraries from Library v2012.3.1129.40 to v2012.1.326.402. We are using HP QTP to automate our testing.

When I try to access the TabControl I get the following unhandled exception:

System.Reflection.TargetInvocationException was unhandled
  Message=Exception has been thrown by the target of an invocation.
  Source=mscorlib
  StackTrace:
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       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)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext 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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(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.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at PM.Live.Client.App.Main() in C:\pl\Source\PM\PM.Live.Client\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.MissingMethodException
       Message=Method 'PM.Live.Client.Common.Controls.TertiaryTabControl.Item' not found.
       Source=mscorlib
       StackTrace:
            at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
            at Mercury.WpfAgent.DispWrapper.DispThreadInvoke(String name, BindingFlags invokeAttr, Binder binder, Object obj, Object[] UnWrappedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters)
       InnerException:

I have had a similar issue with an Telerik.Windows.Automation.Peers.GridViewGroupPanelAutomationPeer.GetChildrenCore()  which was resolved in internal build version 2012.3.1314. Is this too related to the Automation class change from the last quarterly build? Will there be a fix provided for this issue as well?

 

Regards,

Mike

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 06 Feb 2013, 12:41 PM
Hi Mike,

Can you confirm the RadControls version where this exception occurs? Also, can you test your application referencing the assemblies from our latest internal build as we implemented fixes related to the RadTabControl automation support in it.

If the exception keeps coming up even with the latest internal build, please try to isolate it in a sample project. This will allow us to test and investigate the cause for the exception on our side. Also, it would greatly help us if you can elaborate on your scenario and the steps you take to reproduce this exception.

Thank you in advance for your cooperation.

All the best,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Anthony
Top achievements
Rank 1
answered on 26 Jan 2021, 10:19 PM

In the latest WPF UI update 1.19.2021, I get this error when opening a new data context in my application, and no breakpoint is hit in my code. It happens out of the blue when everything seems idle-

Unhandled Exception: Telerik.Windows.Automation.Peers.GridViewGroupPanelAutomationPeer.GetChildrenCore()

I went back to the last 2020 version, and this does not occur. I have never seen this error before the latest build. Any ideas?

0
Dinko | Tech Support Engineer
Telerik team
answered on 27 Jan 2021, 03:10 PM

Hi Anthony,

Without reproducing it on my side, I can't say what is the exact reason behind this in order to provide you a solution. If you can isolate this exception in a standalone project, that will be great. This way I could directly investigate it on my side. 

In the meantime, what you could try on your side is to change the AutomationMode property to Basic. You can read more about this property and how to set it in the UI Automation Support help article in our documentation. Hope this approach won't break the test cases.

Regards,
Dinko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
TabControl
Asked by
MikeTest
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Anthony
Top achievements
Rank 1
Dinko | Tech Support Engineer
Telerik team
Share this question
or