• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Occasional IE Lock-Ups

 
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm working on a J2EE application and, for some reason, Internet Explorer (7) occasionally locks up on me (it will freeze, go into "Not Responding", and has to be killed manually through the task manager). I have not tested this extensively with other browsers as my user-base is primarily IE-only. I have one page, in particular, that uses a lot of Java Script for the UI controls - this is the page that is giving me trouble. I am using both JQuery and Scriptaculous on the page.

I'm having a very difficult time debugging this for a couple reasons.

1. It only happens intermittently and almost never on my system.
2. When it does lock, it doesn't lock up "in my code". Rather, the browser will lock up when a user clicks on a control. Most often, the user will click on a span with an onclick and the browser will lock up prior to invoking the onclick method. Just yesterday, though, the browser locked up when a user tried opening a drop-down list, which has no onclick associated with it.

My best guess, at this point, is that I have a memory leak going on. Unfortunately, I've been unable to identify it with certainty and, most certainly, I haven't been able to fix it. I believe the issue lies in this code (although I'm not certain):



This code is invoked any time someone wants to add an "indicator" to the page. It's not essential to know what an indicator is, but it is represented with a single line of text. Beside that line of text is a little graphic "Minus.gif" that allows the user to click on the element and remove it from the page.

Is there anything here that looks like it could cause problems? I realize this is a rather vague question, but I'm very unsure of exactly where this problem lies. This is my best guess.

Thanks.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it reproducible on multiple systems?
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Is it reproducible on multiple systems?



Yes. Unfortunately, it rarely happens on mine and, on those systems where it does happen, it is intermittent. This is making it extremely difficult to debug.

I have verified that this issue occurs on multiple systems and to multiple users (and even the same user on multiple systems).
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't see anything horrendous in your code that would drive IE batty. but then, it takes so little.

But, of course, the problem could lie elsewhere.

By the way, if you're using jQuery 1.3, you can simplify your code by adding the click handler to the new span using live(), rather than needing a separate function to bind it after the fact.
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:By the way, if you're using jQuery 1.3, you can simplify your code by adding the click handler to the new span using live(), rather than needing a separate function to bind it after the fact.



Originally, I was doing that (or something very similar) but I was concerned that the handler might be getting references to all the method parameters and therefore causing a memory leak. So I moved it to a method on its own, hoping to minimize the issue. It seems to have made it somewhat better (it doesn't lock up as often), but it obviously hasn't solved the issue.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you watched the task manager to see if the page climbs in memory. Also it is wise to have people clear their cache Sometimes a full cache can cause havoc on a machine.

 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Eric Pascarello wrote:Have you watched the task manager to see if the page climbs in memory. Also it is wise to have people clear their cache Sometimes a full cache can cause havoc on a machine.



I've done all sorts of stuff to try to monitor the memory usage of this code. The test I was really trying to get something out of was to put this code into a large loop (executing 10,000 times, or so) and then watch a memory monitor to see what was happening. It did appear to use up a little more memory, but it wasn't much. That said, I have users that are running Windows XP with 512 MB of memory - they don't have a lot of room to spare.

I did make some changes and reran those tests and it appears that the page is now a little easier on the memory usage, but it's still crashing.

I can certainly try the cache clearing to see if that makes a difference.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might find this useful : http://home.wanadoo.nl/jsrosman/

Eric
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Eric Pascarello wrote:You might find this useful : http://home.wanadoo.nl/jsrosman/



Thanks. I had been previously using Drip, which is looks like this is based on, but I haven't used this. Perhaps that will get me a little further.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I came across the sudden slow down or even lock-up in IE 6 (IE 7 and IE 8 are OKay). Firstly, we thought the problem came from the javascript code, we try to remove all the javascript and still cannot find the answer. Finally, after dividing code "piece-by-piece", it came out that the source of the problem came from a conditional style sheet which applied to a class of text boxes (and on that page, the number of the text box is more than 30).
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic