System.OutOfMemoryException
Posted: Tue Aug 16, 2016 11:33 am
Hello,
sometimes we get an OutOfMemoryException, if we print a report, open in the preview, or export as PDF.
The error only occurs if the report contains a large image (A4 watermark in overlay band).
But only in one of 50 calls.
The computer's memory is not full and the application is around 200 MB.
Does anyone have a good idea?
I tested the follow options:
- Smoothing on / off
- Report Cache Mode on / off / auto
- Insert Image in report and insert image URL in report
Here the detail exception:
System.OutOfMemoryException: Nicht genĂ¼gend Arbeitsspeicher.
bei System.Drawing.Graphics.CheckErrorStatus(Int32 status)
bei System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y, Int32 width, Int32 height)
bei System.Drawing.Bitmap..ctor(Image original, Int32 width, Int32 height)
bei System.Drawing.Bitmap..ctor(Image original)
bei Stimulsoft.Report.StiFileImageCache.LoadImage(String path)
bei Stimulsoft.Report.Components.StiView.get_ImageToDraw()
bei Stimulsoft.Report.Painters.StiImageGdiPainter.Paint(StiComponent component, StiPaintEventArgs e)
bei Stimulsoft.Report.Components.StiComponent.Paint(StiPaintEventArgs e)
bei Stimulsoft.Report.Painters.StiContainerGdiPainter.PaintComponents(StiContainer container, StiPaintEventArgs e)
bei Stimulsoft.Report.Painters.StiPageGdiPainter.Paint(StiComponent comp, StiPaintEventArgs e)
bei Stimulsoft.Report.Components.StiComponent.Paint(StiPaintEventArgs e)
bei Stimulsoft.Report.Components.StiPage.Paint(Graphics g)
bei Stimulsoft.Report.Viewer.StiThumbsControl.OnPaint(PaintEventArgs e)
bei System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
bei System.Windows.Forms.Control.WmPaint(Message& m)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
sometimes we get an OutOfMemoryException, if we print a report, open in the preview, or export as PDF.
The error only occurs if the report contains a large image (A4 watermark in overlay band).
But only in one of 50 calls.
The computer's memory is not full and the application is around 200 MB.
Does anyone have a good idea?
I tested the follow options:
- Smoothing on / off
- Report Cache Mode on / off / auto
- Insert Image in report and insert image URL in report
Here the detail exception:
System.OutOfMemoryException: Nicht genĂ¼gend Arbeitsspeicher.
bei System.Drawing.Graphics.CheckErrorStatus(Int32 status)
bei System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y, Int32 width, Int32 height)
bei System.Drawing.Bitmap..ctor(Image original, Int32 width, Int32 height)
bei System.Drawing.Bitmap..ctor(Image original)
bei Stimulsoft.Report.StiFileImageCache.LoadImage(String path)
bei Stimulsoft.Report.Components.StiView.get_ImageToDraw()
bei Stimulsoft.Report.Painters.StiImageGdiPainter.Paint(StiComponent component, StiPaintEventArgs e)
bei Stimulsoft.Report.Components.StiComponent.Paint(StiPaintEventArgs e)
bei Stimulsoft.Report.Painters.StiContainerGdiPainter.PaintComponents(StiContainer container, StiPaintEventArgs e)
bei Stimulsoft.Report.Painters.StiPageGdiPainter.Paint(StiComponent comp, StiPaintEventArgs e)
bei Stimulsoft.Report.Components.StiComponent.Paint(StiPaintEventArgs e)
bei Stimulsoft.Report.Components.StiPage.Paint(Graphics g)
bei Stimulsoft.Report.Viewer.StiThumbsControl.OnPaint(PaintEventArgs e)
bei System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
bei System.Windows.Forms.Control.WmPaint(Message& m)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)