I have a web page which has Bar Chart, the bar chart has almsot more than 600 bars.
This Web page is randomely throwing the "Parameter is not valid exception" in production server
The following is the Stack trace from our error log page
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: Parameter is not valid. at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format) at Infragistics.UltraChart.Render.ChartRender.CreateChartBitmap(Int32 width, Int32 height) at Infragistics.UltraChart.Render.ChartRender.RenderChart(SceneGraph scene, Size sceneSize, SizeF resolution) at Infragistics.UltraChart.Render.ChartRender.RenderChart(SceneGraph scene, Int32 sceneWidth, Int32 sceneHeight) at Infragistics.WebUI.UltraWebChart.UltraChart.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) at ASP.observationsbyperson_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at Com.Fpl.Pgen.Web.Framework20.PgdPage.Render(HtmlTextWriter writer) in d:\ccnet\staging\WebFramework\PgdPage.cs:line 563 at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.observationsbyperson_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Does any body can help me to find why the WebChart is throwing this error?
Some times this exception is "Exception of type 'System.OutOfMemoryException' was thrown."
Thanks in advance.
this is currently logged as bug # 78949, which was in a suspended state of "cannot reproduce." i put it back to an "in review" state so it will be checked out again. feel free to contact infragistics developer support at any time to inquire about this bug #.
i have a theory about a fix based on a similar problem that was recently handled in webgauge. so am hopeful about resolving the issue, although we still have not managed to reproduce it in-house. but at the very least, we can put the call to the Bitmap constructor in a try/catch block.
This is currently happening in 11.1, running current service packs of .Net Framework 4.0.
i'm not really sure about this one, but i can tell you with certainty that we are disposing of that bitmap. can you make sure that you have applied the latest Service Pack for the .NET Framework on your production server?