File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes IE Randomly just closes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "IE Randomly just closes" Watch "IE Randomly just closes" New topic

IE Randomly just closes


Joined: Feb 15, 2006
Posts: 3
During execution of a servlet written in Jbuilder 2005, running on Tomcat 5.5 and using Struts and JDataStore 7. With the newest XP SP2 and IE patched up to date, the IE will at some random time just close. No errors are reported and never at the same place in the servlet. Given enough time, IE will always close somewhere. It sometimes closes on initialization, sometimes during a record retrieve, sometimes while just sitting waiting for user input. This is making it very hard to detect.

Has anyone else experienced this? Anyone have any ideas on how to debug?


Bruno Boehr

Joined: Feb 15, 2006
Posts: 17
Just off the top of my head:

- Are you using any client-side JavaScript?

- Any animated GIF/Flash on the page?

- Does IE's status bar ever say the page and all of its resources have been loaded?

- If so, try saving the page and then reopen it locally; see if can you recreate the behavior. If you can, the issue is probably not server-related.

If I was in your shoes, I'd try these and go from there.

<a href="" target="_blank" rel="nofollow">Your first website in Java: easier than you think</a>
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Does it ever close while visiting other sites, or just yours? If it happens on other sites I'd say it has nothing to do with your site and is either an unstable installation or a virus.

Check all of your included JavaScript for calls to window.close(), in general these should be caught by the browser but there are ways around it. You could also try disabling JavaScript for a while, but if your site makes heavy use of it this pointer may not be very helpful
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

There is no server side code that is capable of closing someone's browser.

I think you'll get better help with this one in the HTML/Javascript forum so I'm going to move it there.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf

Joined: Feb 15, 2006
Posts: 3
Ben: I think it needs to be moved back . . . here's why:

_ I'm not using any JavaScript. This is a stand-a-lone Servelet.
_ There are no GIFs or Flash
_ The status bar indicates page fully loaded
_ A similar servelet does not ever (well, I've cycled through it for 1/2 hour) cause IE to close
_ IE always closes within 3-5 minutes, but never at the same spot in the servelet.
_ if no user interaction with the servelet occurs, IE will close in 3 - 5 minutes.
_ Both servlets spawn a new IE session, but the problem servelet causes all IE windows to close - including ones pointed to other sites and not related
_ There is a single call to close(), but I've trapped on it and it does not get called.
_ I've got debug access to both the server - a seperate box, and the client, and have found no common place where the close occurs.
_ The close will occur during stepping while debugging the servelet, at random places in the code, and with no reported errors or mishaps - the session just finished.
_ This did not occur until the December Tuesday Microsoft Patch day. Before then, no problems.

[ February 16, 2006: Message edited by: tony HJELMSTAD ]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
It really sounds like you have a problem with IE or your code is causing a major memory issue.

Can you cause this to happen on other machines?


Joined: Feb 15, 2006
Posts: 3
The problem occurs on three machines all running code patched in the Dec. MS patch. I have one machine running XP SP1 without the Dec. -patches, and the code operates correctly.
I agree. Here's the link:
subject: IE Randomly just closes
It's not a secret anymore!