wireless scanning freezes due to one essid

Bug #924913 reported by CarlosJC
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wicd
Fix Released
High
David Paleino

Bug Description

Im using Wicd 1.7.1~b3 on Debian Sid (with xfce 4.8).

After this morning, wicd can't find any wireless networks on my system. It freezes "scanning" (i.e., scanning never ends).

This is the log info:
---------------------
2012/02/01 11:26:53 :: Exception in thread Thread-1:
2012/02/01 11:26:53 :: Traceback (most recent call last):
2012/02/01 11:26:53 :: File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
2012/02/01 11:26:53 :: self.run()
2012/02/01 11:26:53 :: File "/usr/lib/python2.7/threading.py", line 505, in run
2012/02/01 11:26:53 :: self.__target(*self.__args, **self.__kwargs)
2012/02/01 11:26:53 :: File "/usr/share/wicd/daemon/wicd-daemon.py", line 990, in _async_scan
2012/02/01 11:26:53 :: self._sync_scan()
2012/02/01 11:26:53 :: File "/usr/share/wicd/daemon/wicd-daemon.py", line 994, in _sync_scan
2012/02/01 11:26:53 :: scan = self.wifi.Scan(str(self.hidden_essid))
2012/02/01 11:26:53 :: File "/usr/lib/python2.7/dist-packages/wicd/networking.py", line 620, in Scan
2012/02/01 11:26:53 :: aps = wiface.GetNetworks()
2012/02/01 11:26:53 :: File "/usr/lib/python2.7/dist-packages/wicd/wnettools.py", line 194, in newfunc
2012/02/01 11:26:53 :: return func(self, *args, **kwargs)
2012/02/01 11:26:53 :: File "/usr/lib/python2.7/dist-packages/wicd/wnettools.py", line 1224, in GetNetworks
2012/02/01 11:26:53 :: entry = self._ParseAccessPoint(cell, ralink_info)
2012/02/01 11:26:53 :: File "/usr/lib/python2.7/dist-packages/wicd/wnettools.py", line 1250, in _ParseAccessPoint
2012/02/01 11:26:53 :: ap['essid'] = misc.to_unicode(ap['essid'])
2012/02/01 11:26:53 :: File "/usr/lib/python2.7/dist-packages/wicd/misc.py", line 437, in to_unicode
2012/02/01 11:26:53 :: x = ''.join(begin + map(lambda c: chr(int(c, 16)), chars) + end)
2012/02/01 11:26:53 :: File "/usr/lib/python2.7/dist-packages/wicd/misc.py", line 437, in <lambda>
2012/02/01 11:26:53 :: x = ''.join(begin + map(lambda c: chr(int(c, 16)), chars) + end)
2012/02/01 11:26:53 :: ValueError: invalid literal for int() with base 16: 'A0el'

The involved section in misc.py file says:
--------------------------------------------
    # FIXME: this is a workaround to correctly parse utf-8
    # encoded ESSIDs returned by iwlist -- python replaces
    # \xNN with \\xNN, thus losing the characters :/.
    # It should really be handled in a better way. Maybe
    # using index()/find()?
    if '\\' in x:
        begin = x.split('\\x')[:1]
        chars = x.split('\\x')[1:]
        end = [chars[-1][2:]]
        chars[-1] = chars[-1][:2]
        x = ''.join(begin + map(lambda c: chr(int(c, 16)), chars) + end)

And the problem seems to be a wireless network with an essid that can not be handled. This is the (summary of the) output of iwlist:

wlan0 Scan completed :
          Cell 01 - Address: NEIGHBORSMACD
                    Channel:1
                    Frequency:2.412 GHz (Channel 1)
                    Quality=31/70 Signal level=-79 dBm
                    Encryption key:on
                    ESSID:"CARP,\xC2\xA0el\xC2\xA0mejor\xC2\xA0lejos..."
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 9 Mb/s
                              18 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 12 Mb/s; 24 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=000000103172614e
                    Extra: Last beacon: 2140ms ago
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
          Cell 03 - Address: MYMACD
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Quality=62/70 Signal level=-48 dBm
                    Encryption key:on
                    ESSID:"MY WIFI"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 9 Mb/s
                              18 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 12 Mb/s; 24 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra: Last beacon: 1804ms ago
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK

The problem seems to be that the essid "CARP,\xC2\xA0el\xC2\xA0mejor\xC2\xA0lejos..." can not be handled by wicd.

Sorry for my poor english.

David Paleino (dpaleino)
Changed in wicd:
status: New → Confirmed
Revision history for this message
David Paleino (dpaleino) wrote :

Oh. Another 1.7.1 blocker. :(

I perfectly understood the issue -- and I'm looking for a solution.

Changed in wicd:
importance: Undecided → High
assignee: nobody → David Paleino (dpaleino)
milestone: none → 1.7.1
Revision history for this message
David Paleino (dpaleino) wrote :

Ok, I think I fixed it in rev. 714

  http://bazaar.launchpad.net/~wicd-devel/wicd/experimental/revision/714

Are you able to test that patch?

Thanks,
David

Changed in wicd:
status: Confirmed → Fix Committed
Revision history for this message
CarlosJC (cervus) wrote :

Ok, David. I downloaded the revision 714 that you suggested and it works flawlessly!.

This patch solved the issue for me. I'm very happy using wicd again (today I had to switch to network-manager-gnome).

Thank you very much.
Carlos J. C.

David Paleino (dpaleino)
Changed in wicd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.