Page 1 of 1

ArgumentException: Invalid Parameter in StiChartGdiPainter.G

Posted: Tue Dec 11, 2012 2:23 pm
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

Re: ArgumentException: Invalid Parameter in StiChartGdiPaint

Posted: Wed Dec 12, 2012 6:07 am
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.

Re: ArgumentException: Invalid Parameter in StiChartGdiPaint

Posted: Wed Dec 12, 2012 1:56 pm
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

Re: ArgumentException: Invalid Parameter in StiChartGdiPaint

Posted: Thu Dec 13, 2012 7:21 am
by Alex K.
Hello,

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

Thank you.