[Bugs] #3814 sugar UNSP: SpreadLayout: error when removing child from container before allocation has happened

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Sun Aug 19 08:49:48 EDT 2012


#3814: SpreadLayout: error when removing child from container before allocation
has happened
------------------------------------------+---------------------------------
    Reporter:  erikos                     |          Owner:  erikos  
        Type:  defect                     |         Status:  new     
    Priority:  Unspecified by Maintainer  |      Milestone:  0.98    
   Component:  sugar                      |        Version:  0.97.x  
    Severity:  Major                      |       Keywords:          
Distribution:  OLPC                       |   Status_field:  Assigned
------------------------------------------+---------------------------------
 Traceback:
 {{{
 1345376299.434484 DEBUG root: Activity._name_owner_changed_cb: activity
 org.laptop.Activity5ba339bf874b65d8023c07051c5dc2d64a032bf9 started up
 1345376299.770774 DEBUG root: window registered for
 5ba339bf874b65d8023c07051c5dc2d64a032bf9
 1345376299.771919 DEBUG root: 5ba339bf874b65d8023c07051c5dc2d64a032bf9
 launched in 0.715939 seconds.
 Traceback (most recent call last):
   File "/home/erikos/sugar-build/install/lib/python2.7/site-
 packages/jarabe/desktop/viewcontainer.py", line 59, in do_remove
     self._layout.remove(child)
   File "/home/erikos/sugar-build/install/lib/python2.7/site-
 packages/jarabe/desktop/favoriteslayout.py", line 153, in remove
     if self._grid.is_in_grid(child):
 AttributeError: 'NoneType' object has no attribute 'is_in_grid'
 1345376351.018891 DEBUG root: autoconnect Sugar Ad-hoc: already connected
 }}}

 Steps to reproduce:

 - start Sugar

 - open Log

 - wait until one of the items on the Neighborhood View disappears (e.g. an
 Access Point is not in reach anymore), the important part is that you have
 not shown the Neighborhood View yet before the item is removed


 A
 [http://git.sugarlabs.org/sugar/mainline/blobs/master/src/jarabe/desktop/favoriteslayout.py#line58
 grid is added] to the ViewContainer when the
 [http://git.sugarlabs.org/sugar/mainline/blobs/master/src/jarabe/desktop/viewcontainer.py#line63
 children are allocated]. The allocation happens when the children needs to
 be shown. Therefore if the container and it's children have not been shown
 yet,
 [http://git.sugarlabs.org/sugar/mainline/blobs/master/src/jarabe/desktop/favoriteslayout.py#line152
 removing the child from the grid] will fail.

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/3814>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list