Bar Series Bottom AxisLabels > Rectangle Memory Creep
Bar Series Bottom AxisLabels > Rectangle Memory Creep
I am experiecing significant memory creep when updating bar values on a bar series. Running memory profile shows large amounts of Rectangles been created from the bottom AxisLabels. Reproducible on TeeChart .Net v2 and latest TeeChart .Net 2012
I know there was a similar issue before:
http://www.teechart.net/support/viewtop ... 88&start=0
Attached is sample project with the issue and screenshots of the memory profiler.
Can you help?
Regards,
Diego Acuna
I know there was a similar issue before:
http://www.teechart.net/support/viewtop ... 88&start=0
Attached is sample project with the issue and screenshots of the memory profiler.
Can you help?
Regards,
Diego Acuna
- Attachments
-
- WindowsFormsApplication2.zip
- (51.72 KiB) Downloaded 437 times
Re: Bar Series Bottom AxisLabels > Rectangle Memory Creep
Any feedback?
I have a client waiting for a resolution for this problem as the SCADA application is creeping 26-30 MB over night due to this memory leak in TeeChart.
Using:
TeeChart .Net v2 2.0.3033.18431
Lasted TeeChart .Net 2012
I have a client waiting for a resolution for this problem as the SCADA application is creeping 26-30 MB over night due to this memory leak in TeeChart.
Using:
TeeChart .Net v2 2.0.3033.18431
Lasted TeeChart .Net 2012
Last edited by Diegoa on Wed Aug 22, 2012 7:41 am, edited 1 time in total.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Bar Series Bottom AxisLabels > Rectangle Memory Creep
Hi Diego,
The issue could be reproduce and is currently being investigated. We will post more information here ASAP.
The issue could be reproduce and is currently being investigated. We will post more information here ASAP.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Bar Series Bottom AxisLabels > Rectangle Memory Creep
Hi Diego,
What about implementing the project like this?
It looks like the garbage collector keeps memory consumption in a constant range. Can you please check if that's the same at your end?
Thanks in advance.
What about implementing the project like this?
Code: Select all
private Random __random = new Random();
public Form1()
{
InitializeComponent();
tChart1.Series[0].Clear();
tChart2.Series[0].Clear();
tChart3.Series[0].Clear();
tChart4.Series[0].Clear();
for (int a = 0; a < 5; a++)
{
tChart1[0].Add(0, "Value" + a, Color.AliceBlue);
tChart2[0].Add(0, "Value" + a, Color.AliceBlue);
tChart3[0].Add(0, "Value" + a, Color.AliceBlue);
tChart4[0].Add(0, "Value" + a, Color.AliceBlue);
}
}
private void timer1_Tick(object sender, EventArgs e)
{
for (int a = 0; a < 5; a++)
{
tChart1[0].YValues[a] = __random.Next(0, 100);
tChart2[0].YValues[a] = __random.Next(0, 100);
tChart3[0].YValues[a] = __random.Next(0, 100);
tChart4[0].YValues[a] = __random.Next(0, 100);
}
tChart1[0].Repaint();
tChart2[0].Repaint();
tChart3[0].Repaint();
tChart4[0].Repaint();
}
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Bar Series Bottom AxisLabels > Rectangle Memory Creep
Ok will test it out.
Re: Bar Series Bottom AxisLabels > Rectangle Memory Creep
Sill same issue. System.Drawing.Rectangle is still climbing as before which is the main issue. It doesnt seem to be cleaned up or cleared at all from AxisLabels.labelpos (which I assume is an ArrayList) when they application is left open, which our client does.
Only workaround we got to avoid this leak it to turn off AxisLabel for Bottom Axis. Unfortunatly the client want to see the Bottom Axis labels.
Only workaround we got to avoid this leak it to turn off AxisLabel for Bottom Axis. Unfortunatly the client want to see the Bottom Axis labels.
Re: Bar Series Bottom AxisLabels > Rectangle Memory Creep
Clearing the labels like below before updating seems to cleanup the rectangles and they stop creeping:
But this is still a dirty workaround for this memory leak.
Code: Select all
private void timer1_Tick(object sender, EventArgs e)
{
(tChart1.Series[0].GetHorizAxis.Labels.Items.Clear();
(tChart2.Series[0].GetHorizAxis.Labels.Items.Clear();
(tChart3.Series[0].GetHorizAxis.Labels.Items.Clear();
(tChart4.Series[0].GetHorizAxis.Labels.Items.Clear();
for (int a = 0; a < 5; a++)
{
tChart1.Series[0][a].Y = __random.Next(0, 100);
tChart2.Series[0][a].Y = __random.Next(0, 100);
tChart3.Series[0][a].Y = __random.Next(0, 100);
tChart4.Series[0][a].Y = __random.Next(0, 100);
}
}
Re: Bar Series Bottom AxisLabels > Rectangle Memory Creep
Is there any fix for this memory leak issue with axis labels besides my workaround?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Bar Series Bottom AxisLabels > Rectangle Memory Creep
Hi Diegoa,
We have a fix suggestion implemented. However,the project you attached doesn't use custom labels at all and Labels.Items is only used with custom labels. Therefore we find strange that calling Labels.Items.Clear() solves the issue at your end.
I see in our records that you have a TeeChart v2 license so I assume you are using an evaluation version of the latest TeeChart, is that correct? If that's the case we would compile an evaluation assembly for you. Could you please indicate the Visual Studio version you are using?
Thanks in advance.
We have a fix suggestion implemented. However,the project you attached doesn't use custom labels at all and Labels.Items is only used with custom labels. Therefore we find strange that calling Labels.Items.Clear() solves the issue at your end.
I see in our records that you have a TeeChart v2 license so I assume you are using an evaluation version of the latest TeeChart, is that correct? If that's the case we would compile an evaluation assembly for you. Could you please indicate the Visual Studio version you are using?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Bar Series Bottom AxisLabels > Rectangle Memory Creep
Yeah we are licensed for TeeChart v2 (unlocked version) and we are evaluating the latest version as we plan to upgrade soon.
We currently using Visual Studio 2010 and our application is running on .Net 4.0.
We currently using Visual Studio 2010 and our application is running on .Net 4.0.
Last edited by Diegoa on Thu Aug 23, 2012 12:30 pm, edited 1 time in total.
Re: Bar Series Bottom AxisLabels > Rectangle Memory Creep
Quick question with regards to backwards compatiblity.
We currently serialize our wrapped TeeChart v2 control using
MemoryStream memstream = new MemoryStream();
_chart.Export.Template.IncludeData = true;
_chart.Export.Template.Save(memstream);
return memstream.ToArray();
can this be deseralized into a .Net 4 TeeChart 2012 control using
_chart.Import.Template.Load(new MemoryStream(value));
i.e. is it backwards compatible?
I also been trying to get hold of Marc via email about upgrading soon, not sure if his around?
We currently serialize our wrapped TeeChart v2 control using
MemoryStream memstream = new MemoryStream();
_chart.Export.Template.IncludeData = true;
_chart.Export.Template.Save(memstream);
return memstream.ToArray();
can this be deseralized into a .Net 4 TeeChart 2012 control using
_chart.Import.Template.Load(new MemoryStream(value));
i.e. is it backwards compatible?
I also been trying to get hold of Marc via email about upgrading soon, not sure if his around?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Bar Series Bottom AxisLabels > Rectangle Memory Creep
Hi Diego,
Thanks in advance.
Ok, you can download a VS2010 evaluation assembly here. Please let us know if it fixes the issue for you.Yeah we are licensed for TeeChart v2 (unlocked version) and we are evaluating the latest version as we plan to upgrade soon.
We currently using Visual Studio 2010 and our application is running on .Net 4.0.
Yes, you can export TeeChart template files in v2 and load them in v2012 (aka v4).We currently serialize our wrapped TeeChart v2 control using
MemoryStream memstream = new MemoryStream();
_chart.Export.Template.IncludeData = true;
_chart.Export.Template.Save(memstream);
return memstream.ToArray();
can this be deseralized into a .Net 4 TeeChart 2012 control using
_chart.Import.Template.Load(new MemoryStream(value));
i.e. is it backwards compatible?
He is on holidays this week, he will be back next week. For sales inquiries you can contact the Sales Dept. at sales at steema dot com.I also been trying to get hold of Marc via email about upgrading soon, not sure if his around?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Bar Series Bottom AxisLabels > Rectangle Memory Creep
Its creeping less now but still creeping about 2mb every 1 1/2 hours.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Bar Series Bottom AxisLabels > Rectangle Memory Creep
Hi Diego,
Thanks for the feedback. We will continue investigating the issue and will keep you posted here.
Thanks for the feedback. We will continue investigating the issue and will keep you posted here.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Bar Series Bottom AxisLabels > Rectangle Memory Creep
Hi Diego,
After further investigation we think the issue is finally fixed. I update the TeeChart evaluation assembly at the previous location. Can you please download and test it at your end?
Thanks in advance.
After further investigation we think the issue is finally fixed. I update the TeeChart evaluation assembly at the previous location. Can you please download and test it at your end?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |