System.OutOfMemoryException in Telerik.Windows.Controls.AutomationExtensions.GetBaseControlItemStatus

1 Answer 30 Views
GridView
Goran
Top achievements
Rank 1
Goran asked on 22 Jun 2022, 09:16 AM

Application simple crush when try to load this component. 
This can occur only on poor computers. 
What can be a problem ?  Any suggestion.

Event time    6/20/2022, 9:21:02.512 AM (Local time)    
Message    System.OutOfMemoryException: Eine Ausnahme vom Typ "System.OutOfMemoryException" wurde ausgelöst.    
Exception type    System.OutOfMemoryException    
Failed method    Telerik.Windows.Controls.AutomationExtensions.GetBaseControlItemStatus    
Problem Id    System.OutOfMemoryException at Telerik.Windows.Controls.AutomationExtensions.GetBaseControlItemStatus    
Assembly    Telerik.Windows.Controls, Version=2019.1.220.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7    
Severity level    Critical    
Telemetry type    exception    
Device type    PC    
Client IP address    0.0.0.0    
Country or region    United Kingdom    
Role instance    DEM5CG9125VHX.int.cpaglobal.net    
SDK version    nlog:2.17.0-146    
Sample rate    1    
Custom Properties
LoggerName    error    
threadid    1    
Message    A fatal error has occured. The application will be terminated.    

System.OutOfMemoryException:
   at System.Text.StringBuilder..ctor (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
   at System.Windows.ThicknessConverter.ToString (PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Thickness.ToString (PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at Telerik.Windows.Controls.AutomationExtensions.GetBaseControlItemStatus (Telerik.Windows.Controls, Version=2019.1.220.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7)
   at Telerik.Windows.Automation.Peers.GridViewDataControlAutomationPeer.GetItemStatusCore (Telerik.Windows.Controls.GridView, Version=2019.1.220.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7)
   at Telerik.Windows.Automation.Peers.RadGridViewAutomationPeer.GetItemStatusCore (Telerik.Windows.Controls.GridView, Version=2019.1.220.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.ContextLayoutManager.fireAutomationEvents (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.ContextLayoutManager.UpdateLayout (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.UIElement.UpdateLayout (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Interop.HwndSource.Process_WM_SIZE (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Interop.HwndSource.LayoutFilterMessage (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at MS.Win32.HwndWrapper.WndProc (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 27 Jun 2022, 08:08 AM

Hello Goran,

Using the default Advanced AutomationMode can result in overhead in some controls, especially when there is a big number of elements on screen.

You do not, however, require this mode unless you're writing CodedUI tests which require support for levels 2,3, and 4. As mentioned in the referenced article, most Coded UI Test features could be used just by implementing Level 1.

With this said, you can still benefit from the accessibility and basic CodedUI support by setting the AutomationMode to Basic.

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

You can also set the mode to Disabled if you do not need the generation of peers in general.

Please give both these modes a try and let me know if any of them resolves the issue.

Regards,
Dilyan Traykov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
GridView
Asked by
Goran
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or