Bug Tracker

Opened 14 years ago

Closed 14 years ago

#5122 closed bug (invalid)

The IE memory leak prevention at 'unload' event occurs strange effects

Reported by: raszi Owned by: brandon
Priority: major Milestone: 1.4
Component: event Version: 1.3.2
Keywords: explorer ie unload window.open open window callee Cc:
Blocked by: Blocking:

Description

Dear jQuery team!

I've tried to create a test case where the bug occurs but unfortunately I could not. The problem is the following.

There is a complicated environment in which a plugin does multiple things. Creates nodes, does AJAX requests, binds anonymous functions on multiple events and opens new windows with "window.open" on click event too. It creates multiple nodes in the new window too.

In IE 6, 7, 8 when the user closes these opened window(s) and reloads the original page, the following error window appears:

"A Runtime Error has occurred.

Error: The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute."

If the user leaves the opened window(s) open and reloads the original page the error window won't appear.

I've tried to debug it with Internet Explorer Script Debugger and it shows that the error is somewhere in the 'unload' event handler. I think the problem is that jQuery caches a reference to one or multiple objects which were in the closed window(s).

If i surrond the memory leak prevention code with a try, catch block everything works fine.

Attachments (1)

jquery-callee-fix.patch (638 bytes) - added by raszi 14 years ago.
The problematic code surrounded with try catch block

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by raszi

Attachment: jquery-callee-fix.patch added

The problematic code surrounded with try catch block

comment:1 Changed 14 years ago by raszi

I think because it's only a cleanup code the patch can be applied without any problem. Please consider it!

comment:2 Changed 14 years ago by brandon

Resolution: invalid
Status: newclosed

Unfortunately we can't fix what we can't test. Please try to get a test case together.

Note: See TracTickets for help on using tickets.