#11698 BLOC Not Tri: Rwanda OS5: Python segfault / error 4 in libglib-2.0.so

Zarro Boogs per Child bugtracker at laptop.org
Mon Mar 19 16:46:25 EDT 2012

#11698: Rwanda OS5: Python segfault / error 4 in libglib-2.0.so
           Reporter:  martin.langhoff        |       Owner:  martin.langhoff
               Type:  defect                 |      Status:  new            
           Priority:  blocker                |   Milestone:  Not Triaged    
          Component:  manufacturing process  |     Version:  not specified  
         Resolution:                         |    Keywords:                 
        Next_action:  diagnose               |    Verified:  0              
Deployment_affected:                         |   Blockedby:                 
           Blocking:                         |  

Comment(by erikos):

 Sugar is not doing well in dealing with non-utf8 data. If a ssid of an AP
 does not announce that correctly we fail in certain ways. For example for
 a ssid like 'Gruß Möglichkeiten Quiñones' currently Sugar does display an
 AP but it has no name in the Palette. If you try to connect to that AP
 Sugar does silently fail because it is trying to sent this string over
 D-Bus and that chokes on not being valid UTF-8 data. NM-applet is doing
 guessing here for the right ssid: http://developer.gnome.org/libnm-

 The error we see above is that glib.markup_escape_text core dumps with the
 string '\xc3\xdc\xc2\xeb13\xb8\xf61'. when trying to display the text.

 For a quick fix I think for both issues it is best to check early when the
 AP is announced by NM and verify we have a ssid with utf-8 data. If not,
 we don't display the AP, because if we do, we do get the non-working and
 confusing behavior described above and segfault in the even worse case.

 This patch does handle this and was tested against the bad AP ssid  'Gruß
 Möglichkeiten Quiñones'.

 diff --git a/src/jarabe/desktop/meshbox.py b/src/jarabe/desktop/meshbox.py
 index 6d5bb48..9c62ea3 100644
 --- a/src/jarabe/desktop/meshbox.py
 +++ b/src/jarabe/desktop/meshbox.py
 @@ -559,6 +559,13 @@ class MeshBox(gtk.VBox):

 +        try:
 +            unicode(ap.name, 'utf-8')
 +        except UnicodeDecodeError:
 +            logging.debug('ignoring an AP essid that is not utf-8
 +            ap.disconnect()
 +            return
          if self._adhoc_manager is not None and \
                  network.is_sugar_adhoc_network(ap.name) and \
                  ap.mode == network.NM_802_11_MODE_ADHOC:

Ticket URL: <http://dev.laptop.org/ticket/11698#comment:3>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system

More information about the Bugs mailing list