Closed Bug 216091 Opened 18 years ago Closed 15 years ago

hang if window closed with javascript self.close() when the page has a java applet

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
critical

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: cenice, Unassigned)

Details

(Keywords: hang)

Attachments

(2 files)

3.82 KB, application/octet-stream
Details
4.55 KB, text/html
Details
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624

When a window uses javascript to close, and it contains a java applet, it usually hangs the browser.  Clicking on links doesn't work.  Javascript will still open new browser windows, but the pages never load.  Typing an address into the location bar causes the browser to start the page loading cycle, but the throbber freezes and nothing ever loads.  When closing the browser, the application remains in memory and must be killed.  I replicated this with Firebird 0.6, Mozilla 1.4, and Netscape 7.1

Reproducible: Always

Steps to Reproduce:
1. Open the included test.html page.
3. Click the link to open java.html.
4. Soon after the java.html starts displaying click the close button.

Actual Results:  
If you click the close button the right ammount of time (about 1 sec on my machine) after java.html displays, the browser will be in the state described above where navigation doesn't work and the browser must be killed.
Attached file Test case
Reassigning to DOM Level 0, but this could also be OJI, I don't know.
But it is unlikely to be due to a bug in JavaScript Engine.

cenise: what happens if you open Tools > Web Development > Java Console
before you try your testcase. Do you see it fill with lots of messages
while the browser is hanging?

If not, do you see any errors in the JavaScript Console?
Assignee: rogerl → dom_bugs
Component: JavaScript Engine → DOM Level 0
Keywords: hang
QA Contact: pschwartau → ashishbhatt
Sorry I assigned it to the wrong component; this is my first bug report.

It doesn't show any errors in the java console or the javascript debugger.
<INPUT onClick="javascript:window.close()" TYPE="BUTTON" VALUE="Close"
TITLE="Click here to close window" NAME="CloseWindow" >

The error is produced at this point
It's a thread issue. Workaround: use a separate javascript thread to close window
ie. 
timeout = setTimeout(closeme,100)
function closeme() {
  clearTimeout(timeout);
  window.close();
}
This bug has not seen any attention in over a year. Is it still reproducable? If not, please resolve this bug as WORKSFORME. Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
Following steps to reproduce the bug yields no problems whatsoever.  Since this bug has not been updated since 2005-07-27, this bug has been set to RESOLVED WORKSFORME.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.