Last Comment Bug 748296 - we-care reminder addon creates zombie compartments
: we-care reminder addon creates zombie compartments
Status: RESOLVED FIXED
[MemShrink:P3]
:
Product: Tech Evangelism
Classification: Other
Component: Add-ons (show other bugs)
: unspecified
: x86_64 Windows 7
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
https://addons.mozilla.org/en-US/fire...
Depends on:
Blocks: LeakyAddons ZombieCompartments
  Show dependency treegraph
 
Reported: 2012-04-24 04:19 PDT by Andrew Williamson [:eviljeff]
Modified: 2012-09-10 14:56 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Andrew Williamson [:eviljeff] 2012-04-24 04:19:58 PDT
we-care reminder addon creates multiple zombie compartments

steps to reproduce:
1) open tab and search for something in google, e.g. 'test'
2) wait till loading finishes, close tab
3) open tab and search in google for a series/movie you can buy, e.g. 'fringe'
4) wait till loading finishes, click imbb link
5) click buy from Amazon link (right hand side)
6) wait till loading finishes, close Amazon and imdb tabs.
7) go to about:memory?verbose and press 'minimize memory usage' a few times.

There are compartments for the initial search tab 'test' and for imdb tab.
Comment 1 Andrew Williamson [:eviljeff] 2012-05-23 10:40:59 PDT
Developer chased via AMO.
Comment 2 Stanton 2012-06-11 08:15:36 PDT
Hi. I'm the current developer in charge of fixing the zombie compartment issues in this Add-on.  Currently, jquery functions such as 'keypress', 'keydown', 'change', and 'click' are causing the zombie compartment.  This deductions is made through commenting out the code and finding no zombie compartments anymore.  

Has there ever been a jquery connection with zombie compartments?  The zombie compartment has the url of the first search done on google and then it stays that way the whole time without changing, even after multiple queries.
Comment 3 Jorge Villalobos [:jorgev] 2012-06-13 18:03:44 PDT
Bug 752904 and this bug suggest that there are zombie compartments originating from certain jQuery calls. If you are using jquery with web content, would it be possible to insert the script into the page instead of using a window-level script?
Comment 4 Jorge Villalobos [:jorgev] 2012-06-28 13:10:40 PDT
Stanton, do you have any updates on this?
Comment 5 Stanton 2012-06-29 07:29:35 PDT
I've been working on it on and off depending on priority of our other projects.  We used jquery quite extensively throughout the code, so it's taking a little longer to  deal with.

Right now, we are down to a maximum of two zombie compartments, both caused by jquery.
Comment 6 Stanton 2012-07-05 12:05:29 PDT
I recently found the following: http://stackoverflow.com/questions/10749237/jquery-tabs-creating-memory-leak-in-firefox-extension

It mentions using messageManager to load the jquery script locally to the specific browser/tab.

I've been trying to implement it and I cannot understand why I can't get the contentScript.js to load using the messageManager the way it was used in the example.  Actually, I couldn't get any part of messageManager working, even the examples from the site.  

Any advice would be greatly appreciated.  Thanks!
Comment 7 Jorge Villalobos [:jorgev] 2012-08-10 10:39:57 PDT
If you still haven't resolved this issue, you can ask in the Add-ons Forum (https://forums.mozilla.org/addons/) or the #extdev IRC channel (http://irc.mozilla.org/).
Comment 8 Nicholas Nethercote [:njn] (on vacation until July 11) 2012-08-29 20:38:55 PDT
I can't reproduce using the steps in comment 0.  I'll be optimistic and assume Firefox 15 fixed this.
Comment 9 swong 2012-09-10 14:56:53 PDT
I had all the zombie compartments cleaned out in Firefox 14 be removing all Jquery functions that required any sort of iteration, but was left with a bunch of ghost windows.

Firefox 15 removed all the ghost windows.

Note You need to log in before you can comment on or make changes to this bug.