#8423 NORM Not Tri: The freeform view leaks an icon on every move

Zarro Boogs per Child bugtracker at laptop.org
Thu Sep 11 02:07:58 EDT 2008


#8423: The freeform view leaks an icon on every move
--------------------+-------------------------------------------------------
 Reporter:  bemasc  |         Owner:  marco        
     Type:  defect  |        Status:  new          
 Priority:  normal  |     Milestone:  Not Triaged  
Component:  sugar   |       Version:  not specified
 Keywords:          |   Next_action:  communicate  
 Verified:  0       |     Blockedby:               
 Blocking:          |  
--------------------+-------------------------------------------------------
 I have written a simpler, faster replacement for grid.py.  In the process
 of doing so, I have discovered a bug somewhere else in the stack.  Every
 time the user drags+drops an icon in the freeform view, the view registers
 a Move of an existing icon, followed by an Add of a new (invisible!) icon
 at the same location... and more strange stuff from there.

 I don't know where the code is that handles drag and drop, but it's
 clearly messed up, and it's probably part of the reason why the spread
 view doesn't work so well.  It's also a memory leak, since a new icon is
 created and stored in memory every time the user moves an existing icon on
 the home view.

 Sample log (from my hacked-up grid.py) showing a correct Move, followed
 immediately by an Add to the same location.
 {{{
 1221112905.758911 ERROR root: move <ActivityIcon object at 0x9b23cd4
 (SugarFavoriteActivityIcon at 0x9d06358)> to (x,y)=(136,13)
 1221112905.762867 ERROR root: energy 0 for <ActivityIcon object at
 0x9b23cd4 (SugarFavoriteActivityIcon at 0x9d06358)>
 1221112905.764855 ERROR root: energy of <ActivityIcon object at 0x9b23cd4
 (SugarFavoriteActivityIcon at 0x9d06358)> on drop is 0
 1221112905.818773 ERROR root: add <ActivityIcon object at 0x9b466e4
 (SugarFavoriteActivityIcon at 0x9d87f60)> at (x,y)=(136,13)
 1221112905.822634 ERROR root: energy 169 for None
 1221112905.847948 ERROR root: move <_MyIcon object at 0x9ba41e4
 (CanvasIcon at 0x9be8ad0)> to (x,y)=(131,74)
 1221112905.851802 ERROR root: energy 0 for <_MyIcon object at 0x9ba41e4
 (CanvasIcon at 0x9be8ad0)>
 1221112905.853788 ERROR root: energy of <_MyIcon object at 0x9ba41e4
 (CanvasIcon at 0x9be8ad0)> on drop is 0
 1221112905.856174 ERROR root: move <CurrentActivityIcon object at
 0x9ba42fc (CanvasIcon at 0x9be8b48)> to (x,y)=(143,114)
 1221112905.859533 ERROR root: energy 0 for <CurrentActivityIcon object at
 0x9ba42fc (CanvasIcon at 0x9be8b48)>
 1221112905.862273 ERROR root: energy of <CurrentActivityIcon object at
 0x9ba42fc (CanvasIcon at 0x9be8b48)> on drop is 0
 1221112906.038640 ERROR root: energy 169 for <ActivityIcon object at
 0x9b23cd4 (SugarFavoriteActivityIcon at 0x9d06358)>
 1221112906.044504 ERROR root: energy 169 for <ActivityIcon object at
 0x9b466e4 (SugarFavoriteActivityIcon at 0x9d87f60)>
 }}}

 My question is: where's the code that tells the spreadlayout to add, move,
 etc.?

-- 
Ticket URL: <http://dev.laptop.org/ticket/8423>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list