getRoster() returns NoneType object
Versions
- OS:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
- Gajim version:
$ dpkg -l |grep gajim
ii gajim 0.16.5-0.1 all GTK+-based Jabber client
- GTK version:
$ dpkg -l |egrep -e libgtk -e python[23]?-gtk
ii libgtk-3-0:amd64 3.18.9-1ubuntu3.3 amd64 GTK+ graphical user interface library
ii libgtk-3-bin 3.18.9-1ubuntu3.3 amd64 programs for the GTK+ graphical user interface library
ii libgtk-3-common 3.18.9-1ubuntu3.3 all common files for the GTK+ graphical user interface library
ii libgtk-3-dev:amd64 3.18.9-1ubuntu3.3 amd64 development files for the GTK+ library
ii libgtk-vnc-2.0-0:amd64 0.5.3-1.3ubuntu2.1 amd64 VNC viewer widget for GTK+3 (runtime libraries)
ii libgtk2-perl 2:1.2498-1 amd64 Perl interface to the 2.x series of the Gimp Toolkit library
ii libgtk2.0-0:amd64 2.24.30-1ubuntu1.16.04.2 amd64 GTK+ graphical user interface library
ii libgtk2.0-bin 2.24.30-1ubuntu1.16.04.2 amd64 programs for the GTK+ graphical user interface library
ii libgtk2.0-cil 2.12.10-6 amd64 CLI binding for the GTK+ toolkit 2.12
ii libgtk2.0-common 2.24.30-1ubuntu1.16.04.2 all common files for the GTK+ graphical user interface library
ii libgtk2.0-dev 2.24.30-1ubuntu1.16.04.2 amd64 development files for the GTK+ library
ii libgtk3.0-cil 2.99.3-2 amd64 CLI binding for the GTK+ 3.0 toolkit
ii libgtkimageview0 1.6.4+dfsg-1 amd64 image viewer widget for GTK+
ii libgtkmm-2.4-1v5:amd64 1:2.24.4-2 amd64 C++ wrappers for GTK+ (shared libraries)
ii libgtkmm-3.0-1v5:amd64 3.18.0-1 amd64 C++ wrappers for GTK+ (shared libraries)
ii libgtksourceview-3.0-1:amd64 3.18.2-1 amd64 shared libraries for the GTK+ syntax highlighting widget
ii libgtksourceview-3.0-common 3.18.2-1 all common files for the GTK+ syntax highlighting widget
ii libgtksourceview2.0-0 2.10.5-2ubuntu2 amd64 shared libraries for the GTK+ syntax highlighting widget
ii libgtksourceview2.0-common 2.10.5-2ubuntu2 all common files for the GTK+ syntax highlighting widget
ii libgtkspell0 2.0.16-1.1ubuntu1 amd64 a spell-checking addon for GTK's TextView widget
ii libgtkspell3-3-0:amd64 3.0.7-2 amd64 spell-checking addon for GTK+'s TextView widget
ii python-gtk2 2.24.0-4ubuntu1 amd64 Python bindings for the GTK+ widget set
- Python-nbxmpp version:
$ dpkg -l |grep python-nbxmpp
ii python-nbxmpp
Steps to reproduce the problem
- Leave Gajim running for a long time during numerous suspend/wake cycles (current uptime: up 7 days, 2 min) and screen config changes (between two different desktop dock stations and laptop lcd)
- An unhandled exception pops up without interaction with the gui
Expected behavior
- No exception
Actual behavior
The fallback exception dialog pops up with the message: "A programming error has been detected. It is probably not fatal, but should be reported to the developers nonetheless." Details:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nbxmpp/dispatcher_nb.py", line 497, in dispatch
handler['func'](session, stanza)
File "/usr/share/gajim/src/common/connection_handlers.py", line 562, in _IqCB
roster.setRaw(roster_data)
AttributeError: 'NoneType' object has no attribute 'setRaw'
At /usr/share/gajim/src/common/connection_handlers.py:531-532 I see:
roster_data = gajim.logger.get_roster(account_jid)
roster = self.connection.getRoster(force=True)
roster.setRaw(roster_data)
And I see unchanged assumption in current git code that getRooster() will return something on which setRaw() can be called.