0

I have got one weird issue. I am working on an asp .net mvc application. I have a refresh button that build some data and view models in the controller code, and returns the partial view back. Well this refresh does work good the very first time. But when i try to click my refresh button again, a javascript alert comes saying

"out of memory at line 56"

I checked my task manager to see on whats happening. I have a 3GB memory and when this error alert shows up the used memory is 1.41 GB. Its normal usage as it looks like. But I don't know why it shows the javascript error alert.

This problem happens in my local workstation where I am doing development of this application.

Any thoughts or comments to trouble shoot or solve this issue is appreciated. I ma using IE7.

3
  • 1
    The 1.41GB, is that used by the web server process or by the browser? Can you tell us what code is at line 56? Commented Mar 16, 2010 at 19:32
  • It says error at line 606 and I took the view source there is no code in that location its end of file. I have master page concept incorporated in my views. Commented Mar 16, 2010 at 20:04
  • I managed to debug the underlying javascript and the following piece of code is where the out of memory exception is thrown. // Recurse if we're merging object values if ( deep && copy && typeof copy === "object" && !copy.nodeType ) target[ name ] = jQuery.extend( deep, // Never move original objects, clone them src || ( copy.length != null ? [ ] : { } ) , copy ); When executing JQUERY.EXTEND in the above script, the out of memory javascript exception is thrown. I don't know why. The above script is from my JQUERY-1.3.2.js Commented Mar 16, 2010 at 20:51

1 Answer 1

1

Any infinite loops in there? Javascript doesn't like those.

Another possibility - is there any Flash on the page? Apparently there have been issues related to that in the past where updating your version of Flash fixes the problem.

Sign up to request clarification or add additional context in comments.

4 Comments

Well. There are no flash contents. However there are loops but I dont get any issues in running them. But I have two JQGrids in my view that runs and dispalys the results.
I have my fiddler tool turned on. When I hit the refresh button the second time it doesnot even hit the server(controller) code,it just pops up the javascript out of memory error alert error alert
Hi, You said about infinite loops. That's correct. But I was trying to render a view in a DIV which is in the same view causing a recursive loop. I realised it only when you said infite loops and the Jquery to loop through html elements entered in to an infinite loop which caused the issue. Thanks for your comments.
Glad you were able to find the problem. :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.