[wicd-curses and wicd-gtk] crashes when trying to save network properties

Bug #993912 reported by ise
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
wicd
Fix Committed
High
David Paleino
Arch Linux
New
Undecided
Unassigned

Bug Description

wicd-curses crashes when trying to save network properties, no matter if you try it with wicd-curses or wicd-gtk

DBus failure! This is most likely caused by the wicd daemon stopping while wicd-curses is running. Please restart the daemon, and then restart wicd-curses.
Traceback (most recent call last):
File "/usr/share/wicd/curses/wicd-curses.py", line 921, in call_update_ui
self.update_ui(True)
File "/usr/share/wicd/curses/wicd-curses.py", line 88, in wrapper
return func(*args, **kargs)
File "/usr/share/wicd/curses/wicd-curses.py", line 932, in update_ui
self.handle_keys(input_data[1])
File "/usr/share/wicd/curses/wicd-curses.py", line 913, in handle_keys
self.diag.save_settings()
File "/usr/share/wicd/curses/netentry_curses.py", line 481, in save_settin
self.set_net_prop("enctype", "None")
File "/usr/share/wicd/curses/netentry_curses.py", line 448, in set_net_pro
wireless.SetWirelessProperty(self.networkid, option, value)
File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __ca
**keywords)
File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 651, in cblocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceb(most recent call last):
File "/usr/lib/python2.7/site-packages/dbus/service.py", line 707, in _mes_cb
retval = candidate_method(self, *args, **keywords)
File "/usr/share/wicd/daemon/wicd-daemon.py", line 1067, in SetWirelessProy
prop = misc.sanitize_config(prop)
File "/usr/lib/python2.7/site-packages/wicd/misc.py", line 433, in sanitiznfig
return s.translate(None, table)
TypeError: translate() takes exactly one argument (2 given)

wicd version: latest (1.7.2.4)
Distro: Arch Linux
Arch Linux Bug report: https://bugs.archlinux.org/task/29709

Maybe a fix:

/user/share/wicd/daemon/wicd-daemon.py:1067
change:
prop = misc.sanitize_config(prop)
to:
prop = misc.sanitize_config(str(prop))

Related branches

Revision history for this message
Cyrille Pontvieux (jrd-enialis) wrote :

I had the same bug.
Here the patch I created/applied.

Feel free to review it and/or find a better way to implement this.

Revision history for this message
David Paleino (dpaleino) wrote :

No, please. The patch might work, but is conceptually wrong.

"Property" should NEVER be something different than a string.

In fact, I regularly use wicd-gtk, and it works fine. So this is probably a bug in wicd-curses.

Revision history for this message
Cyrille Pontvieux (jrd-enialis) wrote :

No this bug appear s on wicd-gtk too. I know few people having this bug. I could try to reproduce the bug and post the python stacktrace. Maybe something related to unicode as str function force conversion.
But the bug is definitely real.

Revision history for this message
David Paleino (dpaleino) wrote :

Ok, ACKed and patch made. I also found what the culprit was (and why it worked on my system). The patch is really similar to Cyrille's, but more general.

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

I'm marking it for 1.7.3 -- it would deserve a 1.7.2.5, but I'm quite fed up of doing minor 1.7.2 releases. So please wait a couple of days, so that I can fix more bugs for 1.7.3.

Thanks,
David

Changed in wicd:
importance: Undecided → High
status: New → In Progress
assignee: nobody → David Paleino (dpaleino)
milestone: none → 1.7.3
status: In Progress → Fix Committed
Revision history for this message
David Paleino (dpaleino) wrote :
Revision history for this message
ise (daniel-isenmann) wrote :

The patch doesn't fix the problem here. Nearly the same error appears, here is the output:

Traceback (most recent call last):
  File "/usr/share/wicd/gtk/gui.py", line 666, in edit_advanced
    if self.run_settings_dialog(dialog, ttype, networkid, networkentry):
  File "/usr/share/wicd/gtk/gui.py", line 679, in run_settings_dialog
    if self.save_settings(nettype, networkid, networkentry):
  File "/usr/share/wicd/gtk/gui.py", line 644, in save_settings
    if not networkentry.save_wireless_settings(networkid):
  File "/usr/share/wicd/gtk/netentry.py", line 940, in save_wireless_settings
    return self.advanced_dialog.save_settings(networkid)
  File "/usr/share/wicd/gtk/netentry.py", line 591, in save_settings
    encrypt_methods[self.combo_encryption.get_active()]['type'])
  File "/usr/share/wicd/gtk/netentry.py", line 532, in set_net_prop
    wireless.SetWirelessProperty(self.networkID, option, value)
  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/share/wicd/daemon/wicd-daemon.py", line 1067, in SetWirelessProperty
    prop = misc.sanitize_config(prop)
  File "/usr/lib/python2.7/site-packages/wicd/misc.py", line 433, in sanitize_config
TypeError: translate() takes exactly one argument (2 given)

Traceback (most recent call last):
  File "/usr/share/wicd/gtk/wicd-client.py", line 1066, in <module>
    main(sys.argv)
  File "/usr/share/wicd/gtk/wicd-client.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/usr/share/wicd/gtk/wicd-client.py", line 1062, in main
    mainloop.run()

Revision history for this message
ise (daniel-isenmann) wrote :

Forget my last comment, the fix is working!!

Thanks for the commit!

Revision history for this message
Stuart Longland (redhatter) wrote :

Hi,

I just ran into this bug whilst setting up wicd on Yocto Linux. It seems in the neighbourhood we have an access point that has all kinds of rubbish characters in its SSID, and this causes wicd to crash with the above issue, in spite of the patches.

I fixed it with the following patch. The purpose here, is to filter out all the "garbage" characters in the string that would otherwise yield a unicode object, *then* perform the translate.

Changed in wicd:
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
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.