wicd gtk client freezes and curses client crashes when connecting

Bug #422675 reported by d3b null on 2009-09-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wicd
Medium
Dan O'Reilly
wicd (Debian)
New
Undecided
Unassigned

Bug Description

I'm using wicd 1.6.2.1-1 from debian sid.

My wireless network essid is an integer (essid composed only by numerical characters).

When I try to connect via GTK client to my network, interface just freezes.

When I try to connect via ncurses client, I get this:

Traceback (most recent call last):
  File "/usr/share/wicd/wicd-curses.py", line 89, in wrapper
    return func(*args, **kargs)
  File "/usr/share/wicd/wicd-curses.py", line 918, in update_ui
    self.handle_keys(keys)
  File "/usr/share/wicd/wicd-curses.py", line 834, in handle_keys
    self.connect("wireless",pos)
  File "/usr/share/wicd/wicd-curses.py", line 929, in connect
    wireless.ConnectWireless(networkid)
  File "/usr/lib/pymodules/python2.5/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/pymodules/python2.5/dbus/connection.py", line 622, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.5/dbus/service.py", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/share/wicd/wicd-daemon.py", line 1147, in ConnectWireless
    print 'Connecting to wireless network ' + self.LastScan[id]['essid']
TypeError: cannot concatenate 'str' and 'int' objects

It seems that for some reason, self.LastScan[id]['essid'] returns the integer value instead of a string value with a number.

Adam Blackburn (adamblackburn) wrote :

Please grab the latest 1.6.2.2 deb and try it again.

Changed in wicd:
status: New → In Progress
d3b null (d3b-null) wrote :

Hi, thanks for the fast response.

I've just tried the 1.6.2.2 package and it also fails. I even rebooted the laptop to avoid any doubt.

I've also been touching some code and it seems note related to the 'print' statement or even to the numerical ESSID name.

Adam Blackburn (adamblackburn) wrote :

Can you post /var/log/wicd/wicd.log ?

Adam Blackburn (adamblackburn) wrote :

Also, for what it's worth, I have no problem with numeric ESSIDs.

d3b null (d3b-null) wrote :

I haven't attached the log before because it doesn't say any meaningfull for debuging.

I've tryed executing, wicd-client and wicd -f , from a terminal to see the output but... there isn't any kind of error or fail in output.

I thought it could be related to scripts, (pre-connect, post-connect, etc) so I deactivated everyone. Nothing changes.

d3b null (d3b-null) wrote :

I've just tryed the behavior of wicd in my University network. It connects perfectly: gtk interface doesn't freeze, ncurses interface connects and doesn't crash and of course connects to network.

So i guess the curses crash and the gui freeze are related to the same problem.

About network configuration, the diferences are:

 - My network uses static IP addresses, University's uses DHCP
 - Autentication in my network is just WPA2 TKIP, University's uses a complex authentication with LEAP (i think),
 - My network has a numeric ESSID... but if you can use numeric ESSIDS, this can't be the problem.

Well, I forgot to say that i've been using wicd for about a year and always worked perfectly until I updated to 1.6.2.1 and, of course, I haven't change anything in configuration.

d3b null (d3b-null) wrote :

Hi again.

    Well, i think i know how to reproduce the crash. I deleted my network from /etc/wicd/wireless-settings.conf. Then, i restarted wicd daemon and, in gui client, i configured my network again: static ip address, netmask, gateway and dns1. I also configured WPA 1/2 (Preshared Key).
    I pressed Connect button and.... it connected !!!

    So the next i did was press Disconnect button and it disconnected. But when I pressed again the connect button.... gui frozen. I tryed to restart wicd daemon but the gui still failing and the curses client gives the same error.

I hope this helps.

d3b null (d3b-null) wrote :

It's still happening on 1.6.2.2-1 version.

summary: - wicd daemon crashes when connecting to essids with a numeric name
+ wicd gtk client freezes and curses client crashes when connecting
Dan O'Reilly (oreilldf) wrote :

File "/usr/share/wicd/wicd-daemon.py", line 1147, in ConnectWireless
    print 'Connecting to wireless network ' + self.LastScan[id]['essid']
TypeError: cannot concatenate 'str' and 'int' objects

As a workaround, you can open up /usr/share/wicd/wicd-daemon.py, go to the line it references in the backtrace (1147), and change
    self.LastScan[id]['essid']
to
    str(self.LastScan[id]['essid'])

Changed in wicd:
assignee: nobody → Dan O'Reilly (oreilldf)
importance: Undecided → Medium

Hi,

    first of all, thanks for the replay but i'm afraid that it's not so
simple.
    That line (1147) is just a print. Ive tryed `self.LastScan[id]` but it
fails with exactly the same error. I've even commented the line and it's
still the same.
    I think the problem is related to dbus or something like that but i'm
not an expert programmer and I don't even know how dbus works deeply.

    If any developer needs any kind of backtrace or information, he/she just
has to ask for it.

Thanks

On Wed, Sep 9, 2009 at 17:39, Dan O'Reilly <email address hidden> wrote:

> File "/usr/share/wicd/wicd-daemon.py", line 1147, in ConnectWireless
> print 'Connecting to wireless network ' + self.LastScan[id]['essid']
> TypeError: cannot concatenate 'str' and 'int' objects
>
> As a workaround, you can open up /usr/share/wicd/wicd-daemon.py, go to the
> line it references in the backtrace (1147), and change
> self.LastScan[id]['essid']
> to
> str(self.LastScan[id]['essid'])
>
> ** Changed in: wicd
> Importance: Undecided => Medium
>
> ** Changed in: wicd
> Assignee: (unassigned) => Dan O'Reilly (oreilldf)
>
> --
> wicd gtk client freezes and curses client crashes when connecting
> https://bugs.launchpad.net/bugs/422675
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in wicd: In Progress
> Status in “wicd” package in Debian: New
>
> Bug description:
> I'm using wicd 1.6.2.1-1 from debian sid.
>
> My wireless network essid is an integer (essid composed only by numerical
> characters).
>
> When I try to connect via GTK client to my network, interface just freezes.
>
> When I try to connect via ncurses client, I get this:
>
> Traceback (most recent call last):
> File "/usr/share/wicd/wicd-curses.py", line 89, in wrapper
> return func(*args, **kargs)
> File "/usr/share/wicd/wicd-curses.py", line 918, in update_ui
> self.handle_keys(keys)
> File "/usr/share/wicd/wicd-curses.py", line 834, in handle_keys
> self.connect("wireless",pos)
> File "/usr/share/wicd/wicd-curses.py", line 929, in connect
> wireless.ConnectWireless(networkid)
> File "/usr/lib/pymodules/python2.5/dbus/proxies.py", line 140, in __call__
> **keywords)
> File "/usr/lib/pymodules/python2.5/dbus/connection.py", line 622, in
> call_blocking
> message, timeout)
> dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError:
> Traceback (most recent call last):
> File "/usr/lib/pymodules/python2.5/dbus/service.py", line 702, in
> _message_cb
> retval = candidate_method(self, *args, **keywords)
> File "/usr/share/wicd/wicd-daemon.py", line 1147, in ConnectWireless
> print 'Connecting to wireless network ' + self.LastScan[id]['essid']
> TypeError: cannot concatenate 'str' and 'int' objects
>
>
> It seems that for some reason, self.LastScan[id]['essid'] returns the
> integer value instead of a string value with a number.
>

Dan O'Reilly (oreilldf) wrote :

If you're still hitting an error then something is failing elsewhere. Can you run wicd-client from a terminal window and paste the backtrace you get when it fails? Same for wicd-curses.

teox99 (teox99) wrote :

hello,
i'm getting crazy for this kind of problem.
im using zenwalk(6.0 or 6.2) distro (slackware based) with XFCE desktop.
i tried wicd 1.4.2, 1.5.9, 1.6.2.2 and while connecting different wireless AP in WPA or WEP the wicd gui freeze and my system hangup so i have no backtrace to report.

teox99 (teox99) wrote :

same prob happen usig wicd-curses from terminal.

d3b null (d3b-null) wrote :

I thin it's not related to this bug. My system doesn't freeze, not even
wicd. Just the wicd client gui freezes till I press cancel button.

And I also can connect to other networks without any problem.

On Thu, Sep 10, 2009 at 23:36, teox99 <email address hidden> wrote:

> same prob happen usig wicd-curses from terminal.
>
>
> ** Attachment added: "wicd.log"
> http://launchpadlibrarian.net/31621026/wicd.log
>
> --
> wicd gtk client freezes and curses client crashes when connecting
> https://bugs.launchpad.net/bugs/422675
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in wicd: In Progress
> Status in “wicd” package in Debian: New
>
> Bug description:
> I'm using wicd 1.6.2.1-1 from debian sid.
>
> My wireless network essid is an integer (essid composed only by numerical
> characters).
>
> When I try to connect via GTK client to my network, interface just freezes.
>
> When I try to connect via ncurses client, I get this:
>
> Traceback (most recent call last):
> File "/usr/share/wicd/wicd-curses.py", line 89, in wrapper
> return func(*args, **kargs)
> File "/usr/share/wicd/wicd-curses.py", line 918, in update_ui
> self.handle_keys(keys)
> File "/usr/share/wicd/wicd-curses.py", line 834, in handle_keys
> self.connect("wireless",pos)
> File "/usr/share/wicd/wicd-curses.py", line 929, in connect
> wireless.ConnectWireless(networkid)
> File "/usr/lib/pymodules/python2.5/dbus/proxies.py", line 140, in __call__
> **keywords)
> File "/usr/lib/pymodules/python2.5/dbus/connection.py", line 622, in
> call_blocking
> message, timeout)
> dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError:
> Traceback (most recent call last):
> File "/usr/lib/pymodules/python2.5/dbus/service.py", line 702, in
> _message_cb
> retval = candidate_method(self, *args, **keywords)
> File "/usr/share/wicd/wicd-daemon.py", line 1147, in ConnectWireless
> print 'Connecting to wireless network ' + self.LastScan[id]['essid']
> TypeError: cannot concatenate 'str' and 'int' objects
>
>
> It seems that for some reason, self.LastScan[id]['essid'] returns the
> integer value instead of a string value with a number.
>

d3b null (d3b-null) wrote :
Download full text (3.5 KiB)

The wicd-client just says:

/usr/share/wicd/wicd/gui.py:730: DeprecationWarning: use
gtk.Statusbar.remove_message
  gtk.main_iteration()

But I thin it's not related since in previous versions with this bug, I
hadn't any output in terminal as I've already said above.

Curses client says the same I posted previously :(.

Dbus Failed! It's probable that this happened for wicd Daemon stopping while
wicd-curses was running. Please, restart the Daemon, and then restart
wicd-curses.
Traceback (most recent call last):
  File "/usr/share/wicd/wicd-curses.py", line 89, in wrapper
    return func(*args, **kargs)
  File "/usr/share/wicd/wicd-curses.py", line 918, in update_ui
    self.handle_keys(keys)
  File "/usr/share/wicd/wicd-curses.py", line 834, in handle_keys
    self.connect("wireless",pos)
  File "/usr/share/wicd/wicd-curses.py", line 929, in connect
    wireless.ConnectWireless(networkid)
  File "/usr/lib/pymodules/python2.5/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/pymodules/python2.5/dbus/connection.py", line 622, in
call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.5/dbus/service.py", line 702, in
_message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/share/wicd/wicd-daemon.py", line 1147, in ConnectWireless
    print 'Connecting to wireless network ' + self.LastScan[id]['essid']
TypeError: cannot concatenate 'str' and 'int' objects

On Wed, Sep 9, 2009 at 22:03, Dan O'Reilly <email address hidden> wrote:

> If you're still hitting an error then something is failing elsewhere.
> Can you run wicd-client from a terminal window and paste the backtrace
> you get when it fails? Same for wicd-curses.
>
> --
> wicd gtk client freezes and curses client crashes when connecting
> https://bugs.launchpad.net/bugs/422675
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in wicd: In Progress
> Status in “wicd” package in Debian: New
>
> Bug description:
> I'm using wicd 1.6.2.1-1 from debian sid.
>
> My wireless network essid is an integer (essid composed only by numerical
> characters).
>
> When I try to connect via GTK client to my network, interface just freezes.
>
> When I try to connect via ncurses client, I get this:
>
> Traceback (most recent call last):
> File "/usr/share/wicd/wicd-curses.py", line 89, in wrapper
> return func(*args, **kargs)
> File "/usr/share/wicd/wicd-curses.py", line 918, in update_ui
> self.handle_keys(keys)
> File "/usr/share/wicd/wicd-curses.py", line 834, in handle_keys
> self.connect("wireless",pos)
> File "/usr/share/wicd/wicd-curses.py", line 929, in connect
> wireless.ConnectWireless(networkid)
> File "/usr/lib/pymodules/python2.5/dbus/proxies.py", line 140, in __call__
> **keywords)
> File "/usr/lib/pymodules/python2.5/dbus/connection.py", line 622, in
> call_blocking
> message, timeout)
> dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError:
> Traceback (most recent call last):
> File "/usr/lib/pymodules/python2.5/dbus/service.py", line 702, in
> ...

Read more...

Dan O'Reilly (oreilldf) wrote :

It looks like you didn't put the str() around self.LastScan[id]['essid'] as I suggested previously. That will fix the crash. Just be sure to restart the daemon after you make the change.

d3b null (d3b-null) wrote :

I've tryed the fix you proposed and now the GUI interface doesn't feeze and
curses doesn't crash. But, due to Murphy's law, I still can't connecting to
the wireless because wicd tryes to get an IP by DHCP insted of use the
configured static IP address.

I guess I have to report another bug.... or could it be related in some
way??

Thanks !

On Fri, Sep 11, 2009 at 01:42, Dan O'Reilly <email address hidden> wrote:

> It looks like you didn't put the str() around self.LastScan[id]['essid']
> as I suggested previously. That will fix the crash. Just be sure to
> restart the daemon after you make the change.
>
> --
> wicd gtk client freezes and curses client crashes when connecting
> https://bugs.launchpad.net/bugs/422675
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in wicd: In Progress
> Status in “wicd” package in Debian: New
>
> Bug description:
> I'm using wicd 1.6.2.1-1 from debian sid.
>
> My wireless network essid is an integer (essid composed only by numerical
> characters).
>
> When I try to connect via GTK client to my network, interface just freezes.
>
> When I try to connect via ncurses client, I get this:
>
> Traceback (most recent call last):
> File "/usr/share/wicd/wicd-curses.py", line 89, in wrapper
> return func(*args, **kargs)
> File "/usr/share/wicd/wicd-curses.py", line 918, in update_ui
> self.handle_keys(keys)
> File "/usr/share/wicd/wicd-curses.py", line 834, in handle_keys
> self.connect("wireless",pos)
> File "/usr/share/wicd/wicd-curses.py", line 929, in connect
> wireless.ConnectWireless(networkid)
> File "/usr/lib/pymodules/python2.5/dbus/proxies.py", line 140, in __call__
> **keywords)
> File "/usr/lib/pymodules/python2.5/dbus/connection.py", line 622, in
> call_blocking
> message, timeout)
> dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError:
> Traceback (most recent call last):
> File "/usr/lib/pymodules/python2.5/dbus/service.py", line 702, in
> _message_cb
> retval = candidate_method(self, *args, **keywords)
> File "/usr/share/wicd/wicd-daemon.py", line 1147, in ConnectWireless
> print 'Connecting to wireless network ' + self.LastScan[id]['essid']
> TypeError: cannot concatenate 'str' and 'int' objects
>
>
> It seems that for some reason, self.LastScan[id]['essid'] returns the
> integer value instead of a string value with a number.
>

Dan O'Reilly (oreilldf) wrote :

Definitely not related. Please open a new bug for the issue you're seeing now, and attached wicd.log from a connection attempt with debug mode enabled.

Changed in wicd:
status: In Progress → Fix Committed
milestone: none → 1.6.3

The fix here isn't the correct one. The correct line to change is 1206 (in my version) of wicd-daemon.py

It needs to be changed from:
             cur_network['essid'] = stored_essid
to:
            cur_network['essid'] = str(stored_essid)

This solves the TypeError throughout, and should fix the problem altogether.

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

Other bug subscribers

Bug attachments