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
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.
I was trying to isolate the issue so here is what I did.
- Create a new Silverlight application project (Version 5)
- Using MS Blend Preview for Silverlight 5, searched for RadBusyIndicator in Assets
- Dragged the control to the Grid (Mainpage.xaml)
- 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?
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.
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.
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?)
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.
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!
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.
Any other ideas?
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
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 >>
<
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
>
- Log in to our application
- Use the primary functions of out application
- Observe memory grow
- Detect lingering objects using ANTS Memory Profiler
- 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".
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.
George
Telerik
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 >>
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
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 >>
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....
- Need to acquire trial copies
- Learn how to use it (I don't expect it to be difficult)
- Train the testers how to use it
- 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.
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.
George
Telerik
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 >>