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

Reported by ise on 2012-05-03
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
wicd
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

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.

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.

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.

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
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()

ise (daniel-isenmann) wrote :

Forget my last comment, the fix is working!!

Thanks for the commit!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers