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

System.OutOfMemoryException in RadScriptManager.OnLoad

3 Answers 70 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Dev
Top achievements
Rank 1
Dev asked on 30 Mar 2011, 11:38 AM
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
 

3 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 05 Apr 2011, 02:19 PM
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
0
Dev
Top achievements
Rank 1
answered on 05 Apr 2011, 02:36 PM
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
0
Simon
Telerik team
answered on 08 Apr 2011, 12:08 PM
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
Tags
ScriptManager and StyleSheetManager
Asked by
Dev
Top achievements
Rank 1
Answers by
Simon
Telerik team
Dev
Top achievements
Rank 1
Share this question
or