Crash when interacting with an sleekxmpp-based bot: "AttributeError: 'NoneType' object has no attribute 'get_shown_name'"
Gajim crashes regularly when I interact with an XMPP bot (based on sleekxmpp) made by a friend.
I am using Gajim 0.16.1-1 with ArchLinux and Gnome 3.
Here is what happens:
- in a MUC, there is myself, other persons (inluding other Linux Gajim users), and this bot
- the bot provides a game during which we interact with the bot using commands, which makes the bot send us private messages
- sometimes (not always), when the bot sends me private messages, Gajim opens tons of error windows on top of each other, and my complete system freezes (probably because of Gajim)
- then I restart my system
The last time it happened, I had started Gajim to redirect all the output to a file, with the verbose flag enabled. What I observe is that this error and exception were printed multiple times:
09/07/2015 21:34:21 (E) gajim.c.ged: Error while running an even handler: \<bound method GroupchatControl._nec_decrypted_message_received of \<groupchat_control.GroupchatControl object at 0x7f8c022defd0>>
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/gajim/common/ged.py", line 93, in raise_event
if handler(*args, **kwargs):
File "/usr/lib/python2.7/site-packages/gajim/groupchat_control.py", line 1371, in _nec_decrypted_message_received
displaymarking=obj.displaymarking)
File "/usr/lib/python2.7/site-packages/gajim/chat_control.py", line 2560, in print_conversation
name = contact.get_shown_name()
AttributeError: 'NoneType' object has no attribute 'get_shown_name'
09/07/2015 21:34:21 (D) gajim.c.ged: notification
Args: (\<common.connection_handlers_events.NotificationEvent object at 0x7f8bdf409650>
More precisely, here is what happens in the log before the exception, with the messages sent by the bot:
09/07/2015 21:34:21 (D) gajim.c.ged: stanza-received
Args: (\<common.connection_handlers_events.StanzaReceivedEvent object at 0x7f8c01bd2750>,)
09/07/2015 21:34:21 (I) nbxmpp.simplexml: STARTTAG.. DEPTH -> 2 , tag -> message, attrs -> {u'to': u'xxx@yyy.fr/zzz', u'xml:lang': u'en', u'type': u'groupchat', u'from': u'bot@bbb.fr/bot'}
09/07/2015 21:34:21 (I) nbxmpp.simplexml: STARTTAG.. DEPTH -> 3 , tag -> body, attrs -> {}
09/07/2015 21:34:21 (I) nbxmpp.simplexml: DEPTH -> 3 , tag -> body
09/07/2015 21:34:21 (I) nbxmpp.simplexml: DEPTH -> 2 , tag -> message
09/07/2015 21:34:21 (D) nbxmpp.dispatcher_nb: Got jabber:client/message stanza
09/07/2015 21:34:21 (D) gajim.c.connection_handlers: MessageCB
09/07/2015 21:34:21 (D) gajim.c.ged: raw-message-received
Args: (\<common.nec.NetworkEvent object at 0x7f8c01bd2350>,)
09/07/2015 21:34:21 (D) gajim.c.ged: message-received
Args: (\<common.connection_handlers_events.MessageReceivedEvent object at 0x7f8c01bd2250>,)
09/07/2015 21:34:21 (D) gajim.plugin_system: getPolicy(key=ALLOW_V2) = True
09/07/2015 21:34:21 (D) gajim.plugin_system: getPolicy(key=SEND_TAG) = True
09/07/2015 21:34:21 (D) gajim.plugin_system: getPolicy(key=REQUIRE_ENCRYPTION) = False
09/07/2015 21:34:21 (D) gajim.c.ged: decrypted-message-received
Args: (\<common.connection_handlers_events.DecryptedMessageReceivedEvent object at 0x7f8c01bd2650>,)
09/07/2015 21:34:21 (D) gajim.c.ged: gc-message-received
Args: (\<common.connection_handlers_events.GcMessageReceivedEvent object at 0x7f8c01bd2ad0>,)
09/07/2015 21:34:21 (D) gajim.c.ged: notification
Args: (\<common.connection_handlers_events.NotificationEvent object at 0x7f8c01bd2410>,)
09/07/2015 21:34:21 (I) nbxmpp.simplexml: STARTTAG.. DEPTH -> 2 , tag -> message, attrs -> {u'to': u'xxx@yyy.fr/zzz', u'xml:lang': u'en', u'type': u'groupchat', u'from': u'bot@bbb.fr/bot'}
09/07/2015 21:34:21 (I) nbxmpp.simplexml: STARTTAG.. DEPTH -> 3 , tag -> body, attrs -> {}
09/07/2015 21:34:21 (I) nbxmpp.simplexml: DEPTH -> 3 , tag -> body
09/07/2015 21:34:21 (I) nbxmpp.simplexml: DEPTH -> 2 , tag -> message
09/07/2015 21:34:21 (D) nbxmpp.dispatcher_nb: Got jabber:client/message stanza
09/07/2015 21:34:21 (D) gajim.c.connection_handlers: MessageCB
09/07/2015 21:34:21 (D) gajim.c.ged: raw-message-received
Args: (\<common.nec.NetworkEvent object at 0x7f8c01bd2250>,)
09/07/2015 21:34:21 (D) gajim.c.ged: message-received
Args: (\<common.connection_handlers_events.MessageReceivedEvent object at 0x7f8c01bd2650>,)
09/07/2015 21:34:21 (D) gajim.plugin_system: getPolicy(key=ALLOW_V2) = True
09/07/2015 21:34:21 (D) gajim.plugin_system: getPolicy(key=SEND_TAG) = True
09/07/2015 21:34:21 (D) gajim.plugin_system: getPolicy(key=REQUIRE_ENCRYPTION) = False
09/07/2015 21:34:21 (D) gajim.c.ged: decrypted-message-received
Args: (\<common.connection_handlers_events.DecryptedMessageReceivedEvent object at 0x7f8c01bd2ad0>,)
09/07/2015 21:34:21 (D) gajim.c.ged: gc-message-received
Args: (\<common.connection_handlers_events.GcMessageReceivedEvent object at 0x7f8c01bd2090>,)
09/07/2015 21:34:21 (D) gajim.c.ged: notification
Args: (\<common.connection_handlers_events.NotificationEvent object at 0x7f8c01bd2050>,)
09/07/2015 21:34:21 (I) nbxmpp.simplexml: STARTTAG.. DEPTH -> 2 , tag -> message, attrs -> {u'to': u'xxx@yyy.fr/zzz', u'xml:lang': u'en', u'type': u'groupchat', u'from': u'bot@bbb.fr/bot'}
09/07/2015 21:34:21 (I) nbxmpp.simplexml: STARTTAG.. DEPTH -> 3 , tag -> body, attrs -> {}
09/07/2015 21:34:21 (I) nbxmpp.simplexml: DEPTH -> 3 , tag -> body
09/07/2015 21:34:21 (I) nbxmpp.simplexml: DEPTH -> 2 , tag -> message
09/07/2015 21:34:21 (D) nbxmpp.dispatcher_nb: Got jabber:client/message stanza
09/07/2015 21:34:21 (D) gajim.c.connection_handlers: MessageCB
09/07/2015 21:34:21 (D) gajim.c.ged: raw-message-received
Args: (\<common.nec.NetworkEvent object at 0x7f8c01bd2650>,)
09/07/2015 21:34:21 (D) gajim.c.ged: message-received
Args: (\<common.connection_handlers_events.MessageReceivedEvent object at 0x7f8c01bd2ad0>,)
09/07/2015 21:34:21 (D) gajim.plugin_system: getPolicy(key=ALLOW_V2) = True
09/07/2015 21:34:21 (D) gajim.plugin_system: getPolicy(key=SEND_TAG) = True
09/07/2015 21:34:21 (D) gajim.plugin_system: getPolicy(key=REQUIRE_ENCRYPTION) = False
09/07/2015 21:34:21 (D) gajim.c.ged: decrypted-message-received
Args: (\<common.connection_handlers_events.DecryptedMessageReceivedEvent object at 0x7f8c01bd2090>,)
09/07/2015 21:34:21 (D) gajim.c.ged: gc-message-received
Args: (\<common.connection_handlers_events.GcMessageReceivedEvent object at 0x7f8c01bd2790>,)
09/07/2015 21:34:21 (D) gajim.c.ged: notification
Args: (\<common.connection_handlers_events.NotificationEvent object at 0x7f8c01bd23d0>,)
09/07/2015 21:34:21 (I) nbxmpp.simplexml: STARTTAG.. DEPTH -> 2 , tag -> message, attrs -> {u'to': u'xxx@yyy.fr/zzz', u'xml:lang': u'en', u'from': u'bot@bbb.fr/bot'}
09/07/2015 21:34:21 (I) nbxmpp.simplexml: STARTTAG.. DEPTH -> 3 , tag -> body, attrs -> {}
09/07/2015 21:34:21 (I) nbxmpp.simplexml: DEPTH -> 3 , tag -> body
09/07/2015 21:34:21 (I) nbxmpp.simplexml: DEPTH -> 2 , tag -> message
09/07/2015 21:34:21 (D) nbxmpp.dispatcher_nb: Got jabber:client/message stanza
09/07/2015 21:34:21 (D) gajim.c.connection_handlers: MessageCB
09/07/2015 21:34:21 (D) gajim.c.ged: raw-message-received
Args: (\<common.nec.NetworkEvent object at 0x7f8c01bd2ad0>,)
09/07/2015 21:34:21 (D) gajim.c.ged: message-received
Args: (\<common.connection_handlers_events.MessageReceivedEvent object at 0x7f8c01bd2090>,)
09/07/2015 21:34:21 (D) gajim.plugin_system: getPolicy(key=ALLOW_V2) = True
09/07/2015 21:34:21 (D) gajim.plugin_system: getPolicy(key=SEND_TAG) = True
09/07/2015 21:34:21 (D) gajim.plugin_system: getPolicy(key=REQUIRE_ENCRYPTION) = False
09/07/2015 21:34:21 (D) gajim.c.ged: decrypted-message-received
Args: (\<common.connection_handlers_events.DecryptedMessageReceivedEvent object at 0x7f8c01bd23d0>,)
09/07/2015 21:34:21 (E) gajim.c.ged: Error while running an even handler: \<bound method GroupchatControl._nec_decrypted_message_received of \<groupchat_control.GroupchatControl object at 0x7f8c022defd0>>
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/gajim/common/ged.py", line 93, in raise_event
if handler(*args, **kwargs):
File "/usr/lib/python2.7/site-packages/gajim/groupchat_control.py", line 1371, in _nec_decrypted_message_received
displaymarking=obj.displaymarking)
File "/usr/lib/python2.7/site-packages/gajim/chat_control.py", line 2560, in print_conversation
name = contact.get_shown_name()
AttributeError: 'NoneType' object has no attribute 'get_shown_name'
09/07/2015 21:34:21 (D) gajim.c.ged: notification
Args: (\<common.connection_handlers_events.NotificationEvent object at 0x7f8bdf409650>,)