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

Memory leak?

16 Answers 146 Views
BusyIndicator
This is a migrated thread and some comments may be shown as answers.
Deepak Shakya
Top achievements
Rank 1
Deepak Shakya asked on 13 Nov 2012, 01:44 AM
Hi,
I am not sure if this is happening just to me but after I upgraded to Q3 2012 Release, I have been getting memory leak with my viewmodels.
  • Even after the view/viewmodel went out of scope, my viewmodel was kept in the memory
  • Running JustTrace showed that Dictionary<intPrt,Object> was holding the viewmodel (see attached)
  • Further investigating, I found that if I remove the theme (telerik:StyleManager.Theme="Metro") from RadProgressBar inside the Style for RadBusyIndicator, the reference to my viewmodel was released and hence no memory leak.

Could you please let me know if anyone has experience this?

 

 

 

 

16 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 15 Nov 2012, 01:35 PM
Hi Deepak,

We are not aware of any memory leak issues concerning ViewModels in the control.

Could you try to reproduce the issue in a sample project and send it to us in order for us to observe the issue at our side?

All the best,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Deepak Shakya
Top achievements
Rank 1
answered on 19 Nov 2012, 07:32 AM
Hi Vladi,

I was trying to isolate the issue so here is what I did.
  1. Create a new Silverlight application project (Version 5)
  2. Using MS Blend Preview for Silverlight 5, searched for RadBusyIndicator in Assets
  3. Dragged the control to the Grid (Mainpage.xaml)
  4. GOT AN ERROR! (See Attached)

Now, if I replace Telerik.Windows.Controls.dll (Version 2012.3.1017.1050) in the references with the one I created using the procedure to protecting the assembly (Version 2012.3.1106.1050), it works fine and I can create a new template as well.

Why would this be?

0
Miroslav Nedyalkov
Telerik team
answered on 23 Nov 2012, 12:17 PM
Hello Deepak,

I tried to reproduce the problem you reported, but I couldn't observe any exceptions thrown. Which version of RadControls for Silverlight do you use Trial or Dev (you already mentioned you are using version 2012.3.1017.1050 which I also used for my test)? What version of Blend do you use? Do you have RadControls for Silverlight installed on your machine?

This information will help us find the source of the problem.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Kevin Finke
Top achievements
Rank 1
answered on 05 Feb 2013, 02:42 PM
Has there been any update on this issue?  I happened to be nosing around our app, sort of demoing to someone how to use the memory profiler to detect memory leaks.  I went to a spot where I expected there not to be one, and instead was treated to the same sort of thing mentioned in the original post.

I haven't been back to investigate further, but the switch to the RadBusyIndiator was recent.  We had been using the Toolkit version, but we're reskinning the app to use the Telerik Metro/Windows8 theme, and I was swapping out busy indicators as I found them.  I believe we're on 2012.3.1314.1050.

0
Deepak Shakya
Top achievements
Rank 1
answered on 05 Feb 2013, 03:09 PM
Hi Kevin,
I don't think there has been any update with solving the issue. I am still using the RadBusyIndicator without the Metro styling. I think this was due to be fix in the next release. Hence, waiting for it. (Feb/March?)
0
Miroslav Nedyalkov
Telerik team
answered on 07 Feb 2013, 09:16 AM
Hi,

We investigated this issue further and found out that the source of the problem is one of the animations in the Windows8 theme. We believe this is a memory leak in the Silverlight animation framework caused by the EasingFunction property of the EasingDoubleKeyFrame.

In the attached project we removed the easings and the leak doesn't seem to appear and it looks good as well. You could use this custom template to work the memory leak around.

Hope this helps.

All the best,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Deepak Shakya
Top achievements
Rank 1
answered on 28 Mar 2013, 07:01 AM
Hi Miroslav,

Thanks for providing the solution. I have yet to implement this in my solution. But could you let us know if this issue has been resolved with the release of Q1 2013 release? I would like to use the standard control and not work around the issue.

Cheers!
0
Miroslav Nedyalkov
Telerik team
answered on 28 Mar 2013, 08:22 AM
Hello Deepak,

As the bug is in the Silverlight animation framework, it is out of our control to fix it. We might work-it-around in the Windows8 theme, but currently we decided to not do this as it will break the design of the control.

We are currently considering a change in the design to allow us to remove the easing from the theme. We will do our best to take this decision and apply the change (if any) prior to the 2013 Q2 release.

Hope this information is helpful.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Brian Sayatovic
Top achievements
Rank 1
answered on 01 Aug 2013, 01:27 PM
We find the same thing with Q1 2013 (2013.1.415.1050) using the Windows8 theme (which is almost identical to Metro), even after applying the style with the commented out easing functions.

Any other ideas?
0
George
Telerik team
answered on 06 Aug 2013, 02:15 PM
Hi Brian,

We are not aware of memory leak problem with removed easing functions. Can you give us more information in order to reproduce the issue on our side? Do you reproduce the problem with the attached FlippingPages sample? If you could send us steps for reproduce or a runnable project will be of great help.

I am glad to assist you further.

Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Brian Sayatovic
Top achievements
Rank 1
answered on 06 Aug 2013, 04:56 PM
Our overridden Busy Indicator style has commented out the easing functions within the EasingDoubleKeyFrames, but not those keyframes themselves.  Is this correct?

<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="ellipse4">
  <EasingDoubleKeyFrame KeyTime="0" Value="0">
      <!--<EasingDoubleKeyFrame.EasingFunction>
          <BackEase EasingMode="EaseIn" Amplitude="2"/>
      </EasingDoubleKeyFrame.EasingFunction>-->
  </EasingDoubleKeyFrame>
  <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="100"/>
  <EasingDoubleKeyFrame KeyTime="0:0:1" Value="102">
      <!--<EasingDoubleKeyFrame.EasingFunction>
          <BackEase EasingMode="EaseIn" Amplitude="2"/>
      </EasingDoubleKeyFrame.EasingFunction>-->
  </EasingDoubleKeyFrame>
  <EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="174"/>
</DoubleAnimationUsingKeyFrames>

My steps to reproducing the problem are as follows:
  1. Log in to our application
  2. Use the primary functions of out application
  3. Observe memory grow
  4. Detect lingering objects using ANTS Memory Profiler
  5. See that they come from the animations

I wish I could be more specific than that, but if i knew more specifically what was causing it, I'd have a better chance of tracking it down.

And I understand how difficult it can be to diagnose a problem you yourselves can't reproduce.  That's why I'm willing to accept any and all forms of help you may be able to offer.  Advice on narrowing it down... special diagnostic builds... etc.  It could very well be us misusing something, but we have thus far -- after many months -- been able to track it down.

I can do whatever it takes.  I can give you ANTS Memory Profiling Sessions from our application.  I can see about having a Telerik engineer remotely examine our code and debug it.

Our application is used for extended sessions and loads some very large chunks of data to work on, and then discard before working on another.  But when these leaks happen, the machine's memory fills up very quickly and the user experience grinds to a halt as virtual memory paging kicks in.  But from the user's experience, all they observe is "your app is slow".
0
George
Telerik team
answered on 09 Aug 2013, 01:05 PM
Hello Brian,

 
The given xaml looks fine. Can you send us a shot from the memory profile? I would suggest removing all animations for the RadBusyIndicator and testing the application for any leaks. In this scenario you could detect if the problem is still in the animation and in which one.

Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Brian Sayatovic
Top achievements
Rank 1
answered on 09 Aug 2013, 01:07 PM
I can certainly send you a "shot".  Do you mean a screenshot, or the whole memory profile output (I'm OK with either).  If the latter, are you guys able to open ANTS Memory Profiler 7 output?  And is there a private channel I could deliver it to you through?
0
Vladi
Telerik team
answered on 14 Aug 2013, 11:14 AM
Hello,

We are not familiar with the ANTS Memory Profiler 7 program.

It would be best if you could use our JustTrace product and send us a couple of snapshots of the memory leak in this scenario.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Brian Sayatovic
Top achievements
Rank 1
answered on 14 Aug 2013, 01:13 PM
That will be considerably more difficult.

I have had a difficult time reproducing this.  Our successful captures have all come from having our QA testers run with a memory profiler in the background, monitoring usage during their normal use case testing.  At the end of a session, we showed them how to get snapshots for analysis.  And even then, it's only reproduced some of the time.

We do not own dotTrace, but ANTS Memory Profiler.  We've trained our QA testers how to use it.  If we are to provide you dotTrace snapshots, we will....

  1. Need to acquire trial copies
  2. Learn how to use it (I don't expect it to be difficult)
  3. Train the testers how to use it
  4. Hope we can reproduce it in the trial time frame

I can't promise this will happen right away since I have competing priorities, but I'll see what I can do.
0
George
Telerik team
answered on 19 Aug 2013, 10:43 AM
Hi Brian,

 
This thread is in our forums which makes it public. Could you submit new support ticket (which is private one) and attach all the data you can collect from the Ants Memory profiler, including output, screenshots of the roots paths, etc ? This data could shed some light on the problem.

Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
BusyIndicator
Asked by
Deepak Shakya
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Deepak Shakya
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Kevin Finke
Top achievements
Rank 1
Brian Sayatovic
Top achievements
Rank 1
George
Telerik team
Share this question
or