This is a migrated thread and some comments may be shown as answers.

A generic error occurred in GDI+

5 Answers 408 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Rory
Top achievements
Rank 1
Rory asked on 03 Jan 2012, 07:23 PM
Hello,
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

Sort by
0
Yavor
Telerik team
answered on 06 Jan 2012, 08:19 AM
Hello,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Rory
Top achievements
Rank 1
answered on 21 Feb 2012, 06:54 PM
Sorry I don't have direct access to the erroring server so I will be limited on seeing what exact permissions the user has. I believe the application pool is running as a domain user that has admin permissions on the machine.

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)

0
Giuseppe
Telerik team
answered on 24 Feb 2012, 06:03 PM
Hello Rory,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Rory
Top achievements
Rank 1
answered on 27 Feb 2012, 06:27 PM
Hi Giuseppe,
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?
0
Giuseppe
Telerik team
answered on 01 Mar 2012, 02:00 PM
Hello Rory,

Yes, you will be able to set the UseSession / TempImagesFolder properties of RadChart in the page load event handler.


Greetings,
Giuseppe
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Chart (Obsolete)
Asked by
Rory
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Rory
Top achievements
Rank 1
Giuseppe
Telerik team
Share this question
or