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

Memory leak with AutomationPeer ??

2 Answers 371 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Raphael
Top achievements
Rank 1
Raphael asked on 14 Sep 2011, 01:37 PM
Hi Telerik,

I work on memory leaks into my application which takes a lot of memory.Working with WinDbg, I found curious references with keep my objects into memory.
Do you have an idea ?

Here, I list my object into the namespace to found my window which is not freed whereas it is closed :

0:026> !dumpheap -stat -type [Company].Light.Views.Standards
Statistics:
      MT    Count    TotalSize Class Name
0ee03630        1           16 [Company].Light.Views.Standards.ScorecardEditTemplateSelector
0ee03558        1           20 [Company].Light.Views.Standards.ScorecardDataTemplateSelector
0ee047e0        1           32 [Company].Light.Views.Standards.ApplicabilityDataTemplateSelector
0ee01c34        1          104 [Company]..Views.Standards.StandardTab
0ee0289c        1          124 [Company].Light.Views.Standards.StandardApplicabilities
0e0eb734        1          124 [Company].Light.Views.Standards.StandardsGridView
0ee0214c        1          152 [Company].Light.Views.Standards.StandardDetails
0ee02590        1          168 [Company].Light.Views.Standards.StandardChaptersAndRequirements
0ee01748        1          216 [Company].Light.Views.Standards.StandardEditChildWindow
Total 9 objects
Fragmented blocks larger than 0.5 MB:
    Addr     Size      Followed by
1400577c    2.8MB         142d4408 System.Nullable`1[[System.Boolean, mscorlib]]


Then, I list the method table of the StandardEditChildWindow :

0:026> !dumpheap -MT 0ee01748
 Address       MT     Size
08dcaefc 0ee01748      216    
 
Statistics:
      MT    Count    TotalSize Class Name
0ee01748        1          216 [Company].Light.Views.Standards.StandardEditChildWindow
Total 1 objects
Fragmented blocks larger than 0.5 MB:
    Addr     Size      Followed by
1400577c    2.8MB         142d4408 System.Nullable`1[[System.Boolean, mscorlib]]

and finally get the root details for the instance :

0:026> !gcroot 08dcaefc
Note: Roots found on stacks may be false positives. Run "!help gcroot" for
more info.
Scan Thread 0 OSTHread 1cbc
Scan Thread 11 OSTHread 1eac
Scan Thread 12 OSTHread 18e4
Scan Thread 19 OSTHread 18bc
DOMAIN(0516DB08):HANDLE(Pinned):3e312f8:Root:  09ae4220(System.Object[])->
  08afaefc(System.Collections.Generic.Dictionary`2[[System.IntPtr, mscorlib],[System.Object, mscorlib]])->
  09b10600(System.Collections.Generic.Dictionary`2+Entry[[System.IntPtr, mscorlib],[System.Object, mscorlib]][])->
  08f4eec8(MS.Internal.ManagedObjectReference)->
  08f435a4(Telerik.Windows.Controls.RadTabControlAutomationPeer)->
  08f43cc4(System.Collections.Generic.List`1[[System.Collections.Generic.KeyValuePair`2[[System.Object, mscorlib],[System.Windows.Automation.Peers.ItemAutomationPeer, System.Windows]], mscorlib]])->
  08f43cdc(System.Collections.Generic.KeyValuePair`2[[System.Object, mscorlib],[System.Windows.Automation.Peers.ItemAutomationPeer, System.Windows]][])->
  08dd64a4(Telerik.Windows.Controls.RadTabItem)->
  08dd768c([Company].Light.Views.Standards.StandardDetails)->
  08de6e24(System.Windows.Controls.TextBlock)->
  08de6f9c(System.Windows.DataContextChangedEventHandler)->
  08de6f34(System.Windows.Data.BindingExpression)->
  08e1b10c([Company].ModelView.ViewModel.Standards.StandardEditViewModel)->
  08e4d0ec(System.EventHandler`1[[System.EventArgs, mscorlib]])->
  08dcaefc([Company].Light.Views.Standards.StandardEditChildWindow)


The instance seems to be alive due to the automation peer .
Can you help me ?

Raphael





2 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 20 Sep 2011, 08:00 AM
Hi Raphael,

Please accept my apology for the delayed response. We tested the RadTabControl memory consumption in a basic scenario, where the control is placed in a ChildWindow but we couldn't detect any memory leaks.

This is why I want to ask you if you can give us more details about your application, the RadControls you're using in it and the scenario that they are implementing. If you can send us a sample solution where the issue is isolated, we will be able to test it on our side and further investigate the cause.

Thank you in advance for your cooperation.

All the best,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Shaun
Top achievements
Rank 1
answered on 23 Jun 2012, 09:46 PM
Raphael / Tina,

I believe I have pinpointed this issue and provided a workaround here:

http://www.telerik.com/community/forums/silverlight/datepicker/datepicker-under-ie-9-and-sl-5-crashes.aspx

-Shaun
Tags
General Discussions
Asked by
Raphael
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Shaun
Top achievements
Rank 1
Share this question
or