Ext


Go Back   Ext JS Forums > Ext JS Community Forums (3.0) > Ext: Bugs

Reply
 
Thread Tools
  #1  
Old 11-06-2009, 10:03 PM
mikecar mikecar is offline
Ext User
 
Join Date: Jun 2009
Posts: 9
mikecar is on a distinguished road
Default [FIXED-336]Drag and Drop in Tree causes element leak

I am using a treePanel, and enabling drag and drop (enableDD). I noticed that each time the treePanel is created/destroyed, three new hidden DOM DIV elements are created in the hosting document, which are not removed when the treePanel is destroyed. Looking at the class names, I believe that these elements are related to the drag/drop functionality. I confirmed that if I dont enable drag/drop, this leak does not happen.

Since my application is a single-page that creates/destroys panels and forms continuously, this could lead to serious accumulation of "dead" DIV's. could somebody please look into this?

PS Posting an example is not easy, I would need to post the entire app.
Reply With Quote
  #2  
Old 11-07-2009, 01:55 AM
Jamie Avins's Avatar
Jamie Avins Jamie Avins is offline
Ext JS - Development Team
 
Join Date: Mar 2007
Posts: 125
Jamie Avins is on a distinguished road
Default

We will look into it. Any way it might be possible to use one of our examples or some simplified code to create us a test case.
Reply With Quote
  #3  
Old 11-09-2009, 11:32 AM
mikecar mikecar is offline
Ext User
 
Join Date: Jun 2009
Posts: 9
mikecar is on a distinguished road
Default

ok, I will try
Reply With Quote
  #4  
Old 11-09-2009, 12:54 PM
mikecar mikecar is offline
Ext User
 
Join Date: Jun 2009
Posts: 9
mikecar is on a distinguished road
Default

ok, here is an example that will show the issue.
The attached file is meant to be saved in the root of the Ext structure, and my test was
done using vanilla Ext 3.0.0. if you want to save it elsewhere, adjust the paths at
the top accordingly. Just make sure you use the same Ext version, please.

To see the problem, follow these steps exactly as described:

1. open the file in your browser (I tested IE and Firefox, no diff)
you don't need to open the file via Server, local open is fine

2. Press the button 'Save State'. you should see the current count for
Elements in the DOM, and Components in componentManager. In my machine,
I see 180 Elements, and 17 Components.


3. Press 'Create tree'. wait for the tree to be displayed (a single item)
4. Press 'Destroy tree'. wait for the tree to disappear.
5. Press 'Compare State'. The current counts for Elements and Components should
display, and they should be the same as the initial. The 'Diff' fields should
show zero.

In other words, at this point, a TreePanel was created, rendered, and destroyed,
and no orphan Elements or Components seem to have been left behind.

Repeat steps 3-5 as many time as you need. The result will be consistent,
no leaks.

Now, enable the drag/drop functionality by checking the Toolbar checkbox.

Repeat steps 3-5. Each time you do that, notice that the Element count increases
by 3. This is the leak.

The original code that I used to detect this is much more complicated, as
it keeps a list of Elements, and does a merge/sort/diff to actually find the
orphans. In this way, I was able to find that the three orphans are the ones
created by the drag/drop mechanism. I did not post the whole code here,
because it is too complicated, and we would end debugging the debugger...
Still, the issue is clearly seen with this simple example, you just can't see
WHICH elements are orphaned.

Mike
Attached Files
File Type: zip mk_tree_bug_1.zip (934 Bytes, 1 views)
Reply With Quote
  #5  
Old 11-09-2009, 11:26 PM
evant's Avatar
evant evant is offline
Ext JS - Development Team
 
Join Date: Apr 2007
Location: Sydney, Australia
Posts: 8,188
evant is on a distinguished road
Default

Fix applied to svn in rev #5596 for patch release 3.1.
__________________
Evan Trimboli
Ext JS - Core Development Team
evan@extjs.com
Reply With Quote
  #6  
Old 11-10-2009, 01:11 AM
mikecar mikecar is offline
Ext User
 
Join Date: Jun 2009
Posts: 9
mikecar is on a distinguished road
Default

Thanks for the quick response. Do I have access to SVN as a regular user,or do I need to purchase something ?
Reply With Quote
  #7  
Old 11-10-2009, 01:22 AM
evant's Avatar
evant evant is offline
Ext JS - Development Team
 
Join Date: Apr 2007
Location: Sydney, Australia
Posts: 8,188
evant is on a distinguished road
Default

SVN access is for support subscribers, however 3.1 will be out shortly.
__________________
Evan Trimboli
Ext JS - Core Development Team
evan@extjs.com
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 05:33 AM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.