sm00th / bitlbee-discord

Bitlbee plugin for Discord (http://discordapp.com)
GNU General Public License v2.0
291 stars 27 forks source link

After idling, crash on sending data to websocket #163

Open digitalcircuit opened 6 years ago

digitalcircuit commented 6 years ago

I'm not yet sure of what causes this issue, but I'll try to update the description/add comments as more is discovered.

bitlbee-discord crashes in trying to send data to the websocket when setting presence to online whenever /away is removed from Bitlbee.

Possible steps to recreate:

  1. Join Bitlbee in a client, set up Discord, join a few channels with periods of inactivity
  2. Set /away
  3. Wait a few hours, not sending anything
    • Some hours of no messages may be required
  4. Remove /away, e.g. with /back
  5. Crash

Actual situation that happens:

  1. Connect to Bitlbee via Quassel core, join channels, etc
  2. Connect to Quassel core with Quassel client
  3. Chat for a while
  4. Disconnect client from core, allowing automatic /away-on-detach to be set
  5. Go do other things in life (usually happens overnight, so sleeping)
  6. Connect client to core, removing automatic /away-on-detach
  7. Bitlbee crashes immediately, restarting while client is attaching to core
  8. bitlbee-discord prints several messages that were missed while reconnecting
  9. Everything works, until step 4 again

Additional

Configuration

Crash log (2018-6-30)

/usr/sbin/bitlbee(+0x260a0)[0x56450e0ad0a0]
/usr/sbin/bitlbee(+0x26201)[0x56450e0ad201]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f2d4dae1390]
/usr/sbin/bitlbee(ssl_write+0x0)[0x56450e0b6d50]
/usr/lib/bitlbee/discord.so(+0x8bc3)[0x7f2d4b5c7bc3]
/usr/lib/bitlbee/discord.so(discord_ws_set_status+0xab)[0x7f2d4b5c7f9b]
/usr/sbin/bitlbee(imc_away_send_update+0x75)[0x56450e0bbe25]
/usr/sbin/bitlbee(+0x324cd)[0x56450e0b94cd]
/usr/sbin/bitlbee(set_setstr+0x36)[0x56450e0ab726]
/usr/sbin/bitlbee(+0x1c330)[0x56450e0a3330]
/usr/sbin/bitlbee(irc_process+0x1ee)[0x56450e09dabe]
/usr/sbin/bitlbee(bitlbee_io_current_client_read+0xcf)[0x56450e09967f]
/usr/sbin/bitlbee(+0x2821f)[0x56450e0af21f]
/usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x819)[0x7f2d4e5264c9]
/usr/sbin/bitlbee(b_main_run+0x30)[0x56450e0aeda0]
/usr/sbin/bitlbee(main+0x23c)[0x56450e0987bc]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f2d4d726830]
/usr/sbin/bitlbee(_start+0x29)[0x56450e098db9]

Discord account settings

<digitalcircuit> account discord set
<root> always_afk = `off'
<root> auto_connect = `true'
<root> auto_join = `off'
<root> auto_join_exclude = `'
<root> auto_reconnect = `true'
<root> away is empty
<root> edit_prefix = `EDIT: '
<root> fetch_pinned = `false'
<root> friendship_mode = `on'
<root> handle_unknown is empty
<root> host = `discordapp.com'
<root> incoming_me_translation = `on'
<root> max_backlog = `50'
<root> mention_ignorecase = `off'
<root> mention_suffix = `[:,]'
<root> never_offline = `true'
<root> nick_format is empty
<root> nick_source = `handle'
<root> password = `********' (hidden)
<root> send_acks = `on'
<root> server_prefix_len = `3'
<root> status is empty
<root> tag = `discord'
<root> urlinfo_handle = `urlinfo'
<root> username = `[redacted]@gmail.com'
<root> voice_status_notify = `off'