System.OutOfMemoryException in RadScriptManager.OnLoad

4 posts, 0 answers
  1. Rob
    Rob avatar
    43 posts
    Member since:
    Aug 2010

    Posted 30 Mar 2011 Link to this post

    I'm using a RadAjaxManagerProxy along with a ScriptManagerProxy in a page with four RadGrids, the RadScriptManager and RadAjaxManager are in the master page, and our testers keep generating errors like this every few hours or so:

    Thread information:
        Thread ID: 14
        Thread account name: NT AUTHORITY\NETWORK SERVICE
        Is impersonating: False
        Stack trace:    at System.String.ToCharArray()
       at System.Text.Encoding.GetBytes(String s)
       at Telerik.Web.UI.ScriptEntry.GetHashCode(String value)
       at Telerik.Web.UI.ScriptEntry.GetResourceNameHashes(String assemblyName)
       at Telerik.Web.UI.ScriptEntry.Deserialize(String serializedScriptEntries)
       at Telerik.Web.UI.RadScriptManager.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     
    Obviously it's hard to capture any specific event which triggers this, I suspect I'm leaking memory somewhere over time - are there any use patterns which might lead to this?

    One thing I notice when looking at the code is I have some script references in the head instead of being sent through the script manager, would the Ajax manager keep re-adding them to the page on every request and eventually lead to the out of memory issue?

    Rob
     
  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 05 Apr 2011 Link to this post

    Hello Rob,

    The stack trace looks normal - this is the normal execution flow of RadScriptManager. On the other hand we have not encountered such memory problems before so we cannot look for a specific pattern that could possibly cause the exception. 

    As a side note, neither RadAjaxManager nor RadScriptManager are manipulating the <script> elements in the <head> of the page.

    One thing that *might* be causing this is the name of the script resource, which hash is being calculated.

    Do you have some embedded script references that you add to the RSM on the page, which are in an external assembly (not in Telerik.Web.UI)?

    All the best,
    Simon
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rob
    Rob avatar
    43 posts
    Member since:
    Aug 2010

    Posted 05 Apr 2011 Link to this post

    No, all I had were static script references (three of them), and an embedded <style> section.  I moved things around so that the script references were made from the ScriptManagerProxy and the <style> section was moved to an external stylesheet which was then linked from the document body, the testers have not since reported the out of memory issue.  Therefore I believe it was something to do with having all that stuff sitting in the head element, but I haven't bothered to investigate exactly what.

    Rob
  5. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 08 Apr 2011 Link to this post

    Hi Rob,

    Please let us know if you detect the structure of the markup that causes this issue. If there is a bug in RadScriptManager and we reproduce it, we will fix it.

    Greetings,
    Simon
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top