Page 3 of 4
memory leaks
Posted: Tue Mar 22, 2011 9:26 pm
by Radek Cerny
Andrew wrote:Hello,
Please send to
support@stimulsoft.com the "freshest" test project with all changes, for investigation.
We are glad to help you.
Thank you.
I have emailed the reproducible test program. We have also discvered a new bug in compiled reports - images on the mrt cause excepptions when loading from the dll - this is also included in the test application.
Cheers
Radek
memory leaks
Posted: Wed Mar 23, 2011 7:11 am
by Alex K.
Hello,
Thank you for your files. We need some time to analyze it.
memory leaks
Posted: Thu Nov 24, 2011 3:31 am
by ikirck
How is the status on this problem? We have similar difficulties with memory allocation and would very much appreciate a solution.
memory leaks
Posted: Thu Nov 24, 2011 6:02 am
by Andrew
Hello,
I am sorry but I cannot recall what was the finish of the issue. 6 months passed and replies were given via ticket system so the forum thread was ended with such an obscure reply.
We can help you. Could you, please describe your issue in detail.
Thank you.
memory leaks
Posted: Thu Nov 24, 2011 10:30 am
by ikirck
Our problem is basically that memory that is allocated when a report is opened in our product stays allocated, even when the report is closed again. If several reports are opened and closed in succession, the memory in use rises rapidly, to the point where a SystemOutOfMemory-exception is raised and our product no longer functions. The issue is definitely with the reports, since the amount of memory that is used up varies with different reports.
We store our reports directly in our database, as memo fields. If a report is opened, it is created like this:
StiReport actRpt = new StiReport();
byte[] buffer = rptTable.Rows[0][Fld.RPTSOURCE] as byte[];
actRpt.Load(buffer);
Later on, the report gets its data more or less like this:
QueryInfos infos = new QueryInfos();
foreach (StiDataSource dataSource in actRpt.Dictionary.DataSources)
{
StiSqlSource source = dataSource as StiSqlSource;
string sql = source.SqlCommand;
infos.Add(dataSource.Name, sql, parameter);
}
DataSet ds = globalParameter.DataProvider.LoadQueries(infos);
foreach (StiDataSource dataSource in actRpt.Dictionary.DataSources)
{
string tableName = dataSource.Name;
QueryData dataS = new QueryData();
dataS.name = tableName;
dataS.dt = ds.Tables[tableName];
dataSources.Add(dataS);
}
StiDataRelationsCollection relationsCollection = new StiDataRelationsCollection(actRpt.Dictionary);
foreach (StiDataRelation rel in actRpt.Dictionary.Relations)
{
relationsCollection.Add(rel);
}
actRpt.DataSources.Clear();
actRpt.Dictionary.Databases.Clear();
foreach (QueryData dataS in dataSources)
{
actRpt.RegData(dataS.name, dataS.dt);
}
actRpt.Dictionary.Synchronize();
for (int i = 0; i < actRpt.DataSources.Count; i++)
{
actRpt.Dictionary.DataSources.Name = dataSources.name;
}
foreach (StiDataRelation rel in relationsCollection)
{
rel.NameInSource = rel.Name;
actRpt.Dictionary.Relations.Add(rel);
}
Then the report is rendered:
actRpt.Render(globalParameter.ShowProgressWindow);
It is then handed over to a ReportViewer:
rptViewer.Report = actRpt;
The viewer is then displayed in our product. On closing the viewer, no specific action is taken.
We did inspect memory use before and after closing the ReportViewer using a memory profiler. As far as we can see, there are no surviving instances of StiReport after closing the Viewer. But still, the memory is not freed up.
We would very much appreciate any help you can give us with this problem.
memory leaks
Posted: Fri Nov 25, 2011 2:55 am
by HighAley
Hello.
ikirck wrote:Our problem is basically that memory that is allocated when a report is opened in our product stays allocated, even when the report is closed again. If several reports are opened and closed in succession, the memory in use rises rapidly, to the point where a SystemOutOfMemory-exception is raised and our product no longer functions. The issue is definitely with the reports, since the amount of memory that is used up varies with different reports.
We store our reports directly in our database, as memo fields.
Please check the following topic on our forum:
http://forum.stimulsoft.com/Default.aspx?g=posts&t=142
Thank you.
memory leaks
Posted: Mon Nov 28, 2011 3:07 am
by ikirck
If I understand the solution proposed in the thread you linked correctly, it would help in the case of multiple callings of the same report, but not in the case of multiple different reports being called successively. So, this would still be a big problem for us, as we offer over a hundred different reports to our customers. If one were simply to try all of them out, they would run out of memory quite rapidly.
Is there a solution for this problem, or is it simply impossible to remove a report from memory without closing the application?
memory leaks
Posted: Thu Dec 01, 2011 8:52 am
by HighAley
Hello.
Sorry, for the delay with answer.
What Report Viewer do you use?
Thank you.
memory leaks
Posted: Fri Dec 02, 2011 2:20 am
by ikirck
We use Stimulsoft Reports.Net 2011.2.
memory leaks
Posted: Fri Dec 02, 2011 8:37 am
by HighAley
Hello.
ikirck wrote:It is then handed over to a ReportViewer:
The viewer is then displayed in our product.
What type of the rptViewer object?
Maybe you could send us a sample project to reproduce your issue.
Thank you.