A generic error occurred in GDI+

Thread is closed for posting
6 posts, 0 answers
  1. Rory
    Rory avatar
    159 posts
    Member since:
    Jul 2007

    Posted 03 Jan 2012 Link to this post

    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.
  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 06 Jan 2012 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rory
    Rory avatar
    159 posts
    Member since:
    Jul 2007

    Posted 21 Feb 2012 Link to this post

    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)

  5. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 24 Feb 2012 Link to this post

    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.
  6. Rory
    Rory avatar
    159 posts
    Member since:
    Jul 2007

    Posted 27 Feb 2012 Link to this post

    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?
  7. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 01 Mar 2012 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017