We are using the Telerik build 2010.2.929.40 and occasionally on our app served from a new Server 2008 we receive this error when viewing a RadChart, "A generic error occurred in GDI+." We can recycle our app pool on the server and the charts go back to normal with no errors. Then after a few hours or days the error comes right back and occurs for anyone trying to view the RadChart. Were there any known issues with memory leaks or image file locking issues in this build? Has anyone else experienced a similar issue?
Thanks.
5 Answers, 1 is accepted
We have not had similar reports before.
Can you supply some additional information on your application - does the exception occur during a specific operation? Also, does the application run with full trust security permissions?
All the best,
Yavor
the Telerik team

The error occurs when loading a RadChart and can be fixed by recycling the application pool.
Where are the files being stored by the ChartImage.axd when using Session State is true? Is it possible that the Identity or App Pool is running out of space?
Here is the full error:
Message: HandlingInstanceID: 8bb435da-6190-40b4-aa53-096875706b07
An exception of type 'System.Runtime.InteropServices.ExternalException' occurred and was caught.
------------------------------------------------------------------------------------------------
02/16/2012 08:26:57
Type : System.Runtime.InteropServices.ExternalException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : A generic error occurred in GDI+.
Source : System.Drawing
Help link :
ErrorCode : -2147467259
Data : System.Collections.ListDictionaryInternal
TargetSite : Void Save(System.IO.Stream, System.Drawing.Imaging.ImageCodecInfo, System.Drawing.Imaging.EncoderParameters)
Stack Trace : at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
at Telerik.Web.UI.ChartHttpHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
We are unsure whether this could be a problem with the App Pool -- when RadChart.UseSession property is true the generated chart image is directly placed into the Session itself on creation, and then when the page is rendered and the browser reaches the <img> tag it begins a new HTTP request to the chart http handler. The handler reads the image from the Session, deletes it from there, and moves it to the Http Cache object where it is stored for 5 mins.
For testing purposes and if you have a development server at your disposal, you might try whether the chart would behave differently if you disable the session state (RadChart.UseSession = false) and store the image instead at a temp location (specified via RadChart.TempImagesFolder).
Kind regards,
Giuseppe
the Telerik team

Thanks for bringing some clarity to how the UseSession property works. We do have development servers and so far we've been unable to trigger the error in one of these environments. I believe our approach will be to create a config key that allows the RadChart' UseSession to be disabled and another config key for the TempImagesFolder value. Can you confirm that we will be able to set these RadChart properties in the page load event?
Yes, you will be able to set the UseSession / TempImagesFolder properties of RadChart in the page load event handler.
Greetings,
Giuseppe
the Telerik team