ArgumentException: Invalid Parameter in StiChartGdiPainter.G

Stimulsoft Reports.NET discussion
Post Reply
User avatar
John
Posts: 132
Joined: Tue Feb 01, 2011 3:56 am
Location: England

ArgumentException: Invalid Parameter in StiChartGdiPainter.G

Post by John »

Hallo Support,
on our live system we are having an intermittent problem that reports with charts cannot be created. The reports are generated on-the-fly using templates stored in c# code. When we restart the application pool in IIS everything works again. Before I send you any MRTs or sample code (which would be somewhat difficult in this case) I'm adding here the stacktrace:

Code: Select all

System.ArgumentException: Invalid Parameter.
   bei System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
   bei System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
   bei Stimulsoft.Report.Painters.StiChartGdiPainter.GetImage(StiComponent component, Single& zoom, StiExportFormat format)
   bei Stimulsoft.Report.Chart.StiChart.GetImage(Single& zoom, StiExportFormat format)
   bei Stimulsoft.Report.Export.StiPdfExportService.ExportPdf1(StiReport report, Stream stream, StiPdfExportSettings settings)
   bei Stimulsoft.Report.Export.StiPdfExportService.ExportPdf(StiReport report, Stream stream, StiPdfExportSettings settings)
   bei Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, StiExportService exportService, Stream stream, StiExportSettings settings)
   bei Stimulsoft.Report.StiReport.ExportDocument(StiExportFormat exportFormat, Stream stream, StiExportSettings settings)
   bei MM.Office.Services.ReportGenerator.ReportEngine.WriteToByteArray(StiReport stiReport)
Maybe this is something you have seen before and have a quick idea what is going wrong. As I said, the problem does not always occur on the live system but once it starts, no more reports with charts are possible until we restart the app. pool.

Best regards and many thanks,

John Kitching
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: ArgumentException: Invalid Parameter in StiChartGdiPaint

Post by Jan »

Hello John,

Please show us code which you use for report generation. Also please send to us mdc file for rendered report to support@stimulsoft.com. You can get it with help of following code:

Code: Select all

report.Render(false);
report.SaveDocument("doc.mdc");
Thank you.
User avatar
John
Posts: 132
Joined: Tue Feb 01, 2011 3:56 am
Location: England

Re: ArgumentException: Invalid Parameter in StiChartGdiPaint

Post by John »

Hallo Jan,

it's difficult to send any code because of the complexity of the project. Also, it's difficult to reproduce the error because even when testing in the debugger with multi-threading and large reports, there is no guarantee that the error will happen.
In my opinion, it is nontheless connected to parallel calls from IIS to the reporting service on the live system. I've now restricted the WCF service to only allow processing in series and all tests in this mode have been positive up to now.

Therefore, I'll leave the issue for now.

Thanks for your help and best regards,

John Kitching
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: ArgumentException: Invalid Parameter in StiChartGdiPaint

Post by Alex K. »

Hello,

Ok.
Let us know if you have any additional information about this issue.

Thank you.
Post Reply