Out of memory exceptions
Re: Out of memory exceptions
Hello,
Since we cannot test the fix until the build is done, can you confirm that it does solve the out of memory exceptions on the small application I created when browsing each page in the preview window and also when exporting to PDF, Powerpoint and Microsoft Word ?
Thank you once again for taking the time to help us
Since we cannot test the fix until the build is done, can you confirm that it does solve the out of memory exceptions on the small application I created when browsing each page in the preview window and also when exporting to PDF, Powerpoint and Microsoft Word ?
Thank you once again for taking the time to help us
Re: Out of memory exceptions
Hello.
Yes, we have made an improvement.
Please, let us know if you need any additional help.
Thank you.
Yes, we have made an improvement.
Please, let us know if you need any additional help.
Thank you.
Re: Out of memory exceptions
Hi, I still have out of memory exceptions using the latest prerelease build Stimulsoft Reports.Ultimate 2015.01.09.
I followed your advices to move the Render() method before passing the report to the viewer and to add the following code just after loading the report:
Please, try to run the updated project StimulsoftImagesTest2.zip. After enabling the cache mode as you told me, It used to at least display correctly in the preview control with the previous version but now it crashes during the Render method. Is there something I am doing wrong? Please see the stack trace:
System.OutOfMemoryException: Out of memory.
at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
at Stimulsoft.Base.Drawing.StiImageConverter.BytesToImage(Byte[] bytes)
at Stimulsoft.Base.Drawing.StiImageConverter.StringToImage(String str)
at Stimulsoft.Report.StiReportObjectStringConverter.StringToObject2(String str, Type type)
at Stimulsoft.Report.StiReportObjectStringConverter.StringToObject(String str, Type type)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props)
at Stimulsoft.Base.Serializing.StiSerializing.Deserialize(Object obj, Stream stream, String application)
at Stimulsoft.Report.Components.StiPagesCollection.DeserializePage(Stream stream, StiSerializing sr, StiPage page)
at Stimulsoft.Report.Components.StiPagesCollection.LoadPage(StiPage page)
at Stimulsoft.Report.Components.StiPagesCollection.GetPage(StiPage page)
at Stimulsoft.Report.Components.StiPagesCollection.get_Item(Int32 index)
at Stimulsoft.Report.Components.StiSimpleText.SetText(Object getValue, String value)
at Reports.Report.ReportWordsToEnd__EndRender(Object sender, EventArgs e)
at Stimulsoft.Report.StiReport.InvokeEndRender()
at Stimulsoft.Report.Engine.StiRenderProviderV2.Render(StiReport report, StiRenderState state)
at Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState)
at Stimulsoft.Report.StiReport.RenderReport(StiRenderState renderState)
at Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode)
at Stimulsoft.Report.StiReport.Render()
at StimulsoftImagesTest.Form1.Form1_Load(Object sender, EventArgs e) in c:\Users\jlaberge\Documents\Visual Studio 2013\Projects\sent to Stimulsoft\StimulsoftImagesTest2\StimulsoftImagesTest\Form1.cs:line 41
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Best regards
I followed your advices to move the Render() method before passing the report to the viewer and to add the following code just after loading the report:
Code: Select all
report.ReportCacheMode = StiReportCacheMode.On;
StiOptions.Engine.ReportCache.AmountOfProcessedPagesForStartGCCollect = 2; // default - 20
StiOptions.Engine.ReportCache.AmountOfQuickAccessPages = 5; // default – 50
System.OutOfMemoryException: Out of memory.
at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
at Stimulsoft.Base.Drawing.StiImageConverter.BytesToImage(Byte[] bytes)
at Stimulsoft.Base.Drawing.StiImageConverter.StringToImage(String str)
at Stimulsoft.Report.StiReportObjectStringConverter.StringToObject2(String str, Type type)
at Stimulsoft.Report.StiReportObjectStringConverter.StringToObject(String str, Type type)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(Object obj, StiPropertyInfoCollection props)
at Stimulsoft.Base.Serializing.StiSerializing.Deserialize(Object obj, Stream stream, String application)
at Stimulsoft.Report.Components.StiPagesCollection.DeserializePage(Stream stream, StiSerializing sr, StiPage page)
at Stimulsoft.Report.Components.StiPagesCollection.LoadPage(StiPage page)
at Stimulsoft.Report.Components.StiPagesCollection.GetPage(StiPage page)
at Stimulsoft.Report.Components.StiPagesCollection.get_Item(Int32 index)
at Stimulsoft.Report.Components.StiSimpleText.SetText(Object getValue, String value)
at Reports.Report.ReportWordsToEnd__EndRender(Object sender, EventArgs e)
at Stimulsoft.Report.StiReport.InvokeEndRender()
at Stimulsoft.Report.Engine.StiRenderProviderV2.Render(StiReport report, StiRenderState state)
at Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState)
at Stimulsoft.Report.StiReport.RenderReport(StiRenderState renderState)
at Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode)
at Stimulsoft.Report.StiReport.Render()
at StimulsoftImagesTest.Form1.Form1_Load(Object sender, EventArgs e) in c:\Users\jlaberge\Documents\Visual Studio 2013\Projects\sent to Stimulsoft\StimulsoftImagesTest2\StimulsoftImagesTest\Form1.cs:line 41
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Best regards
Re: Out of memory exceptions
Hello,
We reproduce the issue, it's a bug after code refactoring.
The problem is solved.
The patch will be available in the next prerelease build.
Let us know, if you need this patch immediately.
Thank you.
We reproduce the issue, it's a bug after code refactoring.
The problem is solved.
The patch will be available in the next prerelease build.
Let us know, if you need this patch immediately.
Thank you.
Re: Out of memory exceptions
Yes,
We would like the build as soon as possible.
Thank you
We would like the build as soon as possible.
Thank you
Re: Out of memory exceptions
Hello,
Ok. Please send us the request to support@stimulsoft.com and refer to this forum thread.
Thank you.
Ok. Please send us the request to support@stimulsoft.com and refer to this forum thread.
Thank you.