{"action":"closed","issue":{"url":"https://api.github.com/repos/twstrike/coyim/issues/125","labels_url":"https://api.github.com/repos/twstrike/coyim/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/twstrike/coyim/issues/125/comments","events_url":"https://api.github.com/repos/twstrike/coyim/issues/125/events","html_url":"https://github.com/twstrike/coyim/issues/125","id":116419962,"number":125,"title":"Disconnect crashed","user":{"login":"juniorz","id":30809,"avatar_url":"https://avatars.githubusercontent.com/u/30809?v=3","gravatar_id":"","url":"https://api.github.com/users/juniorz","html_url":"https://github.com/juniorz","followers_url":"https://api.github.com/users/juniorz/followers","following_url":"https://api.github.com/users/juniorz/following{/other_user}","gists_url":"https://api.github.com/users/juniorz/gists{/gist_id}","starred_url":"https://api.github.com/users/juniorz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juniorz/subscriptions","organizations_url":"https://api.github.com/users/juniorz/orgs","repos_url":"https://api.github.com/users/juniorz/repos","events_url":"https://api.github.com/users/juniorz/events{/privacy}","received_events_url":"https://api.github.com/users/juniorz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/twstrike/coyim/labels/bug","name":"bug","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-11-11T21:00:09Z","updated_at":"2015-11-26T15:49:05Z","closed_at":"2015-11-26T15:49:05Z","body":"I logged in, then I got a bunch of presence events but the roster was empty. Then I disconnected and it crashed:\r\n\r\n```\r\npanic: runtime error: invalid memory address or nil pointer dereference\r\n[signal 0xb code=0x1 addr=0x20 pc=0x41d1770]\r\n\r\ngoroutine 31 [running]:\r\ngithub.com/twstrike/coyim/session.(*Session).WatchRosterEvents(0xc8201be0e0)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/session.go:635 +0x2e0\r\ncreated by github.com/twstrike/coyim/session.(*Session).Connect\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/session.go:702 +0x375\r\n\r\ngoroutine 1 [syscall, locked to thread]:\r\ngithub.com/gotk3/gotk3/gtk._Cfunc_gtk_main()\r\n\t??:0 +0x31\r\ngithub.com/gotk3/gotk3/gtk.Main()\r\n\t/Users/rjunior/go/src/github.com/gotk3/gotk3/gtk/gtk.go:840 +0x14\r\ngithub.com/twstrike/coyim/gui.(*gtkUI).Loop(0xc82000e4e0)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/gui/ui.go:202 +0x9b\r\nmain.runClient()\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/gtk.go:8 +0x35\r\nmain.main()\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/main.go:27 +0x22\r\n\r\ngoroutine 17 [syscall, 1 minutes, locked to thread]:\r\nruntime.goexit()\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:1696 +0x1\r\n\r\ngoroutine 5 [select]:\r\ngithub.com/twstrike/coyim/gui.NewGTK.func1(0xc82000e300, 0xc82000e4e0, 0xc82000e360, 0xc82000e3c0, 0xc82000e420)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/gui/ui.go:74 +0x403\r\ncreated by github.com/twstrike/coyim/gui.NewGTK\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/gui/ui.go:97 +0x530\r\n\r\ngoroutine 6 [runnable]:\r\ngithub.com/gotk3/gotk3/glib.IdleAdd(0x4530b00, 0xc82040e2a0, 0x0, 0x0, 0x0, 0x1d69, 0x0, 0x0)\r\n\t/Users/rjunior/go/src/github.com/gotk3/gotk3/glib/glib.go:331\r\ngithub.com/twstrike/coyim/gui.(*gtkUI).observeAccountEvents(0xc82000e4e0)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/gui/account_events.go:20 +0x54e\r\ncreated by github.com/twstrike/coyim/gui.(*gtkUI).Loop\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/gui/ui.go:198 +0x60\r\n\r\ngoroutine 18 [chan receive, 1 minutes]:\r\ngithub.com/twstrike/coyim/gui.(*gtkUI).listenToToggleConnectAllAutomatically(0xc82000e4e0)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/gui/ui.go:401 +0x3a\r\ncreated by github.com/twstrike/coyim/gui.(*gtkUI).configLoaded\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/gui/ui.go:162 +0x1bc\r\n\r\ngoroutine 8 [chan receive, 1 minutes]:\r\ngithub.com/twstrike/coyim/gui.(*account).buildAccountSubmenu.func5(0xc82000e840, 0xc820030270, 0xc820030280, 0xc820188270)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/gui/account.go:112 +0x5d\r\ncreated by github.com/twstrike/coyim/gui.(*account).buildAccountSubmenu\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/gui/account.go:134 +0x67e\r\n\r\ngoroutine 9 [chan receive]:\r\ngithub.com/twstrike/coyim/gui.(*account).buildAccountSubmenu.func5(0xc82000e8a0, 0xc8200302d0, 0xc8200302e0, 0xc820188360)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/gui/account.go:112 +0x5d\r\ncreated by github.com/twstrike/coyim/gui.(*account).buildAccountSubmenu\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/gui/account.go:134 +0x67e\r\n\r\ngoroutine 33 [runnable]:\r\nnet.runtime_pollWait(0x71b5e20, 0x72, 0xc820014130)\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/runtime/netpoll.go:157 +0x60\r\nnet.(*pollDesc).Wait(0xc82005c300, 0x72, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/net/fd_poll_runtime.go:73 +0x3a\r\nnet.(*pollDesc).WaitRead(0xc82005c300, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/net/fd_poll_runtime.go:78 +0x36\r\nnet.(*netFD).Read(0xc82005c2a0, 0xc820201000, 0x1000, 0x1000, 0x0, 0x71b0028, 0xc820014130)\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/net/fd_unix.go:232 +0x23a\r\nnet.(*conn).Read(0xc820186188, 0xc820201000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/net/net.go:172 +0xe4\r\ncrypto/tls.(*block).readFromUntil(0xc820188780, 0xe6fc138, 0xc820186188, 0x5, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/crypto/tls/conn.go:455 +0xcc\r\ncrypto/tls.(*Conn).readRecord(0xc8201fe000, 0x49be417, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/crypto/tls/conn.go:540 +0x2d1\r\ncrypto/tls.(*Conn).Read(0xc8201fe000, 0xc820207000, 0x1000, 0x1000, 0x0, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/crypto/tls/conn.go:901 +0x167\r\nbufio.(*Reader).fill(0xc8201d9380)\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/bufio/bufio.go:97 +0x1e9\r\nbufio.(*Reader).ReadByte(0xc8201d9380, 0xc820467f80, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/bufio/bufio.go:229 +0x7a\r\nencoding/xml.(*Decoder).getc(0xc8201b1080, 0x0)\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/encoding/xml/xml.go:861 +0xad\r\nencoding/xml.(*Decoder).rawToken(0xc8201b1080, 0x0, 0x0, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/encoding/xml/xml.go:512 +0x148\r\nencoding/xml.(*Decoder).Token(0xc8201b1080, 0x0, 0x0, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/encoding/xml/xml.go:247 +0xe83\r\ngithub.com/twstrike/coyim/xmpp.nextStart(0xc8201b1080, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/xmpp/xml.go:40 +0x7c\r\ngithub.com/twstrike/coyim/xmpp.next(0xc8201682a0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/xmpp/xml.go:56 +0x7d\r\ngithub.com/twstrike/coyim/xmpp.(*Conn).Next(0xc8201682a0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/xmpp/connection.go:54 +0xab\r\ngithub.com/twstrike/coyim/session.(*Session).readMessages(0xc8201be0e0, 0xc8201d9aa0)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/session.go:111 +0x61\r\ncreated by github.com/twstrike/coyim/session.(*Session).WatchStanzas\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/session.go:247 +0x88\r\n\r\ngoroutine 30 [chan receive]:\r\ngithub.com/twstrike/coyim/session.(*Session).WatchTimeout(0xc8201be0e0)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/session.go:582 +0x104\r\ncreated by github.com/twstrike/coyim/session.(*Session).Connect\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/session.go:701 +0x350\r\n\r\ngoroutine 32 [chan receive]:\r\ngithub.com/twstrike/coyim/session.(*Session).receiveStanza(0xc8201be0e0, 0xc8201d9aa0, 0xc8201be001)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/session.go:221 +0x89\r\ngithub.com/twstrike/coyim/session.(*Session).WatchStanzas(0xc8201be0e0)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/session.go:248 +0xa0\r\ncreated by github.com/twstrike/coyim/session.(*Session).Connect\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/session.go:703 +0x39a\r\n\r\ngoroutine 50 [sleep]:\r\ntime.Sleep(0x2540be400)\r\n\t/usr/local/Cellar/go/1.5.1/libexec/src/runtime/time.go:59 +0xf9\r\ngithub.com/twstrike/coyim/gui.(*account).buildAccountSubmenu.func5.1(0xc820188360)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/gui/account.go:121 +0x26\r\ncreated by github.com/twstrike/coyim/gui.(*account).buildAccountSubmenu.func5\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/gui/account.go:124 +0x168\r\n\r\ngoroutine 144 [runnable]:\r\ngithub.com/twstrike/coyim/session.publishEvent.func1(0x47c0380, 0xc8204300b0, 0xc82000e8a0)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/events.go:95\r\ncreated by github.com/twstrike/coyim/session.publishEvent\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/events.go:97 +0x49\r\n\r\ngoroutine 142 [runnable]:\r\ngithub.com/twstrike/coyim/session.publishEvent.func1(0x47c0380, 0xc8204300a0, 0xc82000e8a0)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/events.go:95\r\ncreated by github.com/twstrike/coyim/session.publishEvent\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/events.go:97 +0x49\r\n\r\ngoroutine 156 [runnable]:\r\ngithub.com/twstrike/coyim/session.publishEvent.func1(0x47c0380, 0xc820438ac0, 0xc82000e480)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/events.go:95\r\ncreated by github.com/twstrike/coyim/session.publishEvent\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/events.go:97 +0x49\r\n\r\ngoroutine 143 [runnable]:\r\ngithub.com/twstrike/coyim/session.publishEvent.func1(0x47c0380, 0xc8204300b0, 0xc82000e480)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/events.go:95\r\ncreated by github.com/twstrike/coyim/session.publishEvent\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/events.go:97 +0x49\r\n\r\ngoroutine 157 [runnable]:\r\ngithub.com/twstrike/coyim/session.publishEvent.func1(0x47c0380, 0xc820438ac0, 0xc82000e8a0)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/events.go:95\r\ncreated by github.com/twstrike/coyim/session.publishEvent\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/events.go:97 +0x49\r\n\r\ngoroutine 158 [runnable]:\r\ngithub.com/twstrike/coyim/session.publishEvent.func1(0x47c0380, 0xc820438ad0, 0xc82000e480)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/events.go:95\r\ncreated by github.com/twstrike/coyim/session.publishEvent\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/events.go:97 +0x49\r\n\r\ngoroutine 159 [runnable]:\r\ngithub.com/twstrike/coyim/session.publishEvent.func1(0x47c0380, 0xc820438ad0, 0xc82000e8a0)\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/events.go:95\r\ncreated by github.com/twstrike/coyim/session.publishEvent\r\n\t/Users/rjunior/go/src/github.com/twstrike/coyim/session/events.go:97 +0x49\r\n```"}}