Hello,
I'm working on an application where reports (fast reports) are generated in a thread. This all works fine, but when I put some (TeeCharts) charts in the reports, the memory usage keeps
on growing after every run of the thread. I've contatcted FastReports, and they say it's because Teecharts isn't thread safe. I'm not doing anything special, in the thread I load the report,
fill it with data, and then export it to pdf and free the report and thread. The application doesn't report any errors, and the reports look fine, it just the memory usage. Does anyone know
how to solve this, or is this solved in a newer version of TeeChart. I'm working on Delphi XE and use the standard TeeChart components.
Thankyou!
Michiel
Fast report in thread
Re: Fast report in thread
Hello Michiel,
TeeChart isn't thread safe, that right. But it only means that you have to be careful when manipulating a chart from different threads. For example, you should control manually (with semaphores or something) if you want the chart to be drawn in one thread and to add points to the same chart from another thread, to avoid interferences. But I don't think it should imply an increasing memory demand.
Could you please send us a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
TeeChart isn't thread safe, that right. But it only means that you have to be careful when manipulating a chart from different threads. For example, you should control manually (with semaphores or something) if you want the chart to be drawn in one thread and to add points to the same chart from another thread, to avoid interferences. But I don't think it should imply an increasing memory demand.
Could you please send us a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Fast report in thread
Hello Yeray,
I've included an example project, the unit uReportThread.pas is where the action happens. One other thing I noticed,
is that the charts are shown in the pdf on windows 32 bit, but don't show when run on windows 7 64 bit, although
no errors are shown. I thought the thread safety should not be an issue, the threads don't manipulate each other.
I hope you can help me.
Thanks in advance!
Best regards,
Michiel van Ingen
I've included an example project, the unit uReportThread.pas is where the action happens. One other thing I noticed,
is that the charts are shown in the pdf on windows 32 bit, but don't show when run on windows 7 64 bit, although
no errors are shown. I thought the thread safety should not be an issue, the threads don't manipulate each other.
I hope you can help me.
Thanks in advance!
Best regards,
Michiel van Ingen
- Attachments
-
- report.zip
- (281.4 KiB) Downloaded 549 times
Re: Fast report in thread
Hello Michiel,
I've ran your application and could reproduce the problem but not consistently. Sometimes the memory demand grows and descends to the same value it had and sometimes not. Isn't it the same for you?
If you think the threads aren't related, maybe you could simplify the testing application and make problem reproducible more consistently.
Thanks in advance.
I've ran your application and could reproduce the problem but not consistently. Sometimes the memory demand grows and descends to the same value it had and sometimes not. Isn't it the same for you?
If you think the threads aren't related, maybe you could simplify the testing application and make problem reproducible more consistently.
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |