muesli / telephant

A lightweight but modern Mastodon client for the desktop
MIT License
190 stars 14 forks source link

macOS: Quitting/Closing the app does not work properly #22

Open PhilippvK opened 5 years ago

PhilippvK commented 5 years ago

When I want to close telephant on macOS, the window disappears but the App still exists in the dock. Relaunching it does not work because it is in an "Not responding" state. (see Screenshot)

Screenshot 2019-05-14 at 10 19 21

Here are the logs I am getting in the terminal:

goroutine 1 [running, locked to thread]:
runtime.throw(0x445d4dd, 0x2d)
    /usr/local/go/src/runtime/panic.go:617 +0x72 fp=0xc0000dde80 sp=0xc0000dde50 pc=0x4031872
runtime.exitsyscall()
    /usr/local/go/src/runtime/proc.go:2945 +0x287 fp=0xc0000ddeb0 sp=0xc0000dde80 pc=0x403a457
runtime.cgocallbackg(0x0)
    /usr/local/go/src/runtime/cgocall.go:188 +0xa7 fp=0xc0000ddf18 sp=0xc0000ddeb0 pc=0x4009397
runtime.cgocallback_gofunc(0x404e66c, 0x405ef00, 0xc0000ddf98, 0x16)
    /usr/local/go/src/runtime/asm_amd64.s:773 +0x9b fp=0xc0000ddf38 sp=0xc0000ddf18 pc=0x405d03b
runtime.asmcgocall(0x405ef00, 0xc0000ddf98)
    /usr/local/go/src/runtime/asm_amd64.s:620 +0x42 fp=0xc0000ddf40 sp=0xc0000ddf38 pc=0x405ced2
runtime.libcCall(0x405ef00, 0xc0000ddf98, 0x2b)
    /usr/local/go/src/runtime/sys_darwin.go:46 +0x6c fp=0xc0000ddf70 sp=0xc0000ddf40 pc=0x404e66c
runtime.exit(0xc000000000)
    /usr/local/go/src/runtime/sys_darwin.go:199 +0x33 fp=0xc0000ddf98 sp=0xc0000ddf70 pc=0x404ebf3
runtime.main()
    /usr/local/go/src/runtime/proc.go:222 +0x261 fp=0xc0000ddfe0 sp=0xc0000ddf98 pc=0x4033221
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1337 +0x1 fp=0xc0000ddfe8 sp=0xc0000ddfe0 pc=0x405d761

goroutine 34 [sleep]:
runtime.goparkunlock(...)
    /usr/local/go/src/runtime/proc.go:307
time.Sleep(0xdf8475800)
    /usr/local/go/src/runtime/time.go:105 +0x159
main.(*MessageModel).init.func1(0xc0000bc190)
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:136 +0x30
created by main.(*MessageModel).init
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:134 +0xe64

goroutine 35 [sleep]:
runtime.goparkunlock(...)
    /usr/local/go/src/runtime/proc.go:307
time.Sleep(0xdf8475800)
    /usr/local/go/src/runtime/time.go:105 +0x159
main.(*MessageModel).init.func1(0xc0000bc3c0)
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:136 +0x30
created by main.(*MessageModel).init
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:134 +0xe64

goroutine 36 [sleep]:
runtime.goparkunlock(...)
    /usr/local/go/src/runtime/proc.go:307
time.Sleep(0xdf8475800)
    /usr/local/go/src/runtime/time.go:105 +0x159
main.(*MessageModel).init.func1(0xc0000bc730)
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:136 +0x30
created by main.(*MessageModel).init
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:134 +0xe64

goroutine 37 [sleep]:
runtime.goparkunlock(...)
    /usr/local/go/src/runtime/proc.go:307
time.Sleep(0xdf8475800)
    /usr/local/go/src/runtime/time.go:105 +0x159
main.(*MessageModel).init.func1(0xc0000bc960)
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:136 +0x30
created by main.(*MessageModel).init
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:134 +0xe64

goroutine 38 [chan receive]:
main.handleEvents(0xc0000aa0c0, 0xc0000bc730, 0xc0000bc960)
    /Users/Philipp/go/src/github.com/muesli/telephant/events.go:56 +0x5b
created by main.setupMastodon
    /Users/Philipp/go/src/github.com/muesli/telephant/telephant.go:230 +0x308

goroutine 45 [select]:
net/http.(*http2ClientConn).roundTrip(0xc000130900, 0xc0001e0100, 0x0, 0x0, 0x0, 0x0)
    /usr/local/go/src/net/http/h2_bundle.go:7504 +0x8cc
net/http.(*http2Transport).RoundTripOpt(0xc000170000, 0xc0001e0100, 0xc00004b800, 0x42416e6, 0x0, 0xc000160120)
    /usr/local/go/src/net/http/h2_bundle.go:6867 +0x159
net/http.(*http2Transport).RoundTrip(...)
    /usr/local/go/src/net/http/h2_bundle.go:6829
net/http.http2noDialH2RoundTripper.RoundTrip(0xc000170000, 0xc0001e0100, 0xc000360740, 0x5, 0xc0001601a8)
    /usr/local/go/src/net/http/h2_bundle.go:8959 +0x3f
net/http.(*Transport).roundTrip(0x47b3880, 0xc0001e0100, 0x10, 0xc0000a72c0, 0xc00004bb80)
    /usr/local/go/src/net/http/transport.go:430 +0xe90
net/http.(*Transport).RoundTrip(0x47b3880, 0xc0001e0100, 0x47b3880, 0x0, 0x0)
    /usr/local/go/src/net/http/roundtrip.go:17 +0x35
net/http.send(0xc0001e0100, 0x44d2ce0, 0x47b3880, 0x0, 0x0, 0x0, 0xc000010288, 0xc000039e20, 0x1, 0x0)
    /usr/local/go/src/net/http/client.go:250 +0x461
net/http.(*Client).send(0xc0000c8680, 0xc0001e0100, 0x0, 0x0, 0x0, 0xc000010288, 0x0, 0x1, 0xe)
    /usr/local/go/src/net/http/client.go:174 +0xfb
net/http.(*Client).do(0xc0000c8680, 0xc0001e0100, 0x0, 0x0, 0x0)
    /usr/local/go/src/net/http/client.go:641 +0x279
net/http.(*Client).Do(...)
    /usr/local/go/src/net/http/client.go:509
github.com/mattn/go-mastodon.(*Client).doStreaming(0xc0000c8680, 0xc0001e0100, 0xc0001740c0)
    /Users/Philipp/go/src/github.com/mattn/go-mastodon/streaming.go:114 +0x3c
github.com/mattn/go-mastodon.(*Client).streaming.func1(0xc0001740c0, 0x44deaa0, 0xc0000a8000, 0xc0000c8680, 0xc0001e0100)
    /Users/Philipp/go/src/github.com/mattn/go-mastodon/streaming.go:107 +0x6b
created by github.com/mattn/go-mastodon.(*Client).streaming
    /Users/Philipp/go/src/github.com/mattn/go-mastodon/streaming.go:98 +0x3dd

goroutine 10 [IO wait]:
internal/poll.runtime_pollWait(0x11100ea8, 0x72, 0xffffffffffffffff)
    /usr/local/go/src/runtime/netpoll.go:182 +0x56
internal/poll.(*pollDesc).wait(0xc000132118, 0x72, 0x2500, 0x2566, 0xffffffffffffffff)
    /usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x9b
internal/poll.(*pollDesc).waitRead(...)
    /usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000132100, 0xc0004b6000, 0x2566, 0x2566, 0x0, 0x0, 0x0)
    /usr/local/go/src/internal/poll/fd_unix.go:169 +0x1f2
net.(*netFD).Read(0xc000132100, 0xc0004b6000, 0x2566, 0x2566, 0x203000, 0x0, 0x16d6)
    /usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc0000a0008, 0xc0004b6000, 0x2566, 0x2566, 0x0, 0x0, 0x0)
    /usr/local/go/src/net/net.go:177 +0x69
crypto/tls.(*atLeastReader).Read(0xc00047a3e0, 0xc0004b6000, 0x2566, 0x2566, 0x100, 0x6efffff, 0xc0001859e0)
    /usr/local/go/src/crypto/tls/conn.go:761 +0x60
bytes.(*Buffer).ReadFrom(0xc000107058, 0x44d2680, 0xc00047a3e0, 0x400f8e5, 0x43eb780, 0x4430640)
    /usr/local/go/src/bytes/buffer.go:207 +0xbd
crypto/tls.(*Conn).readFromUntil(0xc000106e00, 0x6f510e8, 0xc0000a0008, 0x5, 0xc0000a0008, 0x9)
    /usr/local/go/src/crypto/tls/conn.go:783 +0xf8
crypto/tls.(*Conn).readRecordOrCCS(0xc000106e00, 0x4467300, 0xc000106f38, 0xc000185d58)
    /usr/local/go/src/crypto/tls/conn.go:590 +0x125
crypto/tls.(*Conn).readRecord(...)
    /usr/local/go/src/crypto/tls/conn.go:558
crypto/tls.(*Conn).Read(0xc000106e00, 0xc0001b1000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/local/go/src/crypto/tls/conn.go:1236 +0x137
bufio.(*Reader).Read(0xc0001702a0, 0xc0001ca038, 0x9, 0x9, 0x400c5c4, 0xc0001629c0, 0xc000185d58)
    /usr/local/go/src/bufio/bufio.go:223 +0x23e
io.ReadAtLeast(0x44d2560, 0xc0001702a0, 0xc0001ca038, 0x9, 0x9, 0x9, 0x44d2780, 0xc0002fa9f0, 0xc000086050)
    /usr/local/go/src/io/io.go:310 +0x88
io.ReadFull(...)
    /usr/local/go/src/io/io.go:329
net/http.http2readFrameHeader(0xc0001ca038, 0x9, 0x9, 0x44d2560, 0xc0001702a0, 0x0, 0x0, 0xc0000ad5f0, 0x0)
    /usr/local/go/src/net/http/h2_bundle.go:1476 +0x88
net/http.(*http2Framer).ReadFrame(0xc0001ca000, 0xc0000ad5f0, 0x0, 0x0, 0x0)
    /usr/local/go/src/net/http/h2_bundle.go:1734 +0xa1
net/http.(*http2clientConnReadLoop).run(0xc000185fb8, 0x4466ce8, 0xc00003d7b8)
    /usr/local/go/src/net/http/h2_bundle.go:8102 +0x8f
net/http.(*http2ClientConn).readLoop(0xc000130900)
    /usr/local/go/src/net/http/h2_bundle.go:8030 +0x76
created by net/http.(*http2Transport).newClientConn
    /usr/local/go/src/net/http/h2_bundle.go:7093 +0x637

goroutine 44 [select]:
github.com/muesli/telephant/accounts/mastodon.(*Account).handleStream(0xc0000ad170)
    /Users/Philipp/go/src/github.com/muesli/telephant/accounts/mastodon/mastodon.go:517 +0x13f
created by github.com/muesli/telephant/accounts/mastodon.(*Account).Run
    /Users/Philipp/go/src/github.com/muesli/telephant/accounts/mastodon/mastodon.go:144 +0x511
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
panic during panic
SIGABRT: abort
PC=0x7fff6c0902c6 m=0 sigcode=0

goroutine 0 [idle]:
runtime.exit(0xc000000000)
    /usr/local/go/src/runtime/sys_darwin.go:199 +0x33 fp=0xc0000ddf98 sp=0xc0000ddf70 pc=0x404ebf3
runtime.main()
    /usr/local/go/src/runtime/proc.go:222 +0x261 fp=0xc0000ddfe0 sp=0xc0000ddf98 pc=0x4033221
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1337 +0x1 fp=0xc0000ddfe8 sp=0xc0000ddfe0 pc=0x405d761

goroutine 1 [running, locked to thread]:
runtime.systemstack_switch()
    /usr/local/go/src/runtime/asm_amd64.s:311 fp=0xc0000dde18 sp=0xc0000dde10 pc=0x405b6b0
runtime.fatalthrow()
    /usr/local/go/src/runtime/panic.go:669 +0x57 fp=0xc0000dde50 sp=0xc0000dde18 pc=0x4031a47
runtime.throw(0x445d4dd, 0x2d)
    /usr/local/go/src/runtime/panic.go:617 +0x72 fp=0xc0000dde80 sp=0xc0000dde50 pc=0x4031872
runtime.exitsyscall()
    /usr/local/go/src/runtime/proc.go:2945 +0x287 fp=0xc0000ddeb0 sp=0xc0000dde80 pc=0x403a457
runtime.cgocallbackg(0x0)
    /usr/local/go/src/runtime/cgocall.go:188 +0xa7 fp=0xc0000ddf18 sp=0xc0000ddeb0 pc=0x4009397
runtime.cgocallback_gofunc(0x404e66c, 0x405ef00, 0xc0000ddf98, 0x16)
    /usr/local/go/src/runtime/asm_amd64.s:773 +0x9b fp=0xc0000ddf38 sp=0xc0000ddf18 pc=0x405d03b
runtime.asmcgocall(0x405ef00, 0xc0000ddf98)
    /usr/local/go/src/runtime/asm_amd64.s:620 +0x42 fp=0xc0000ddf40 sp=0xc0000ddf38 pc=0x405ced2
runtime.libcCall(0x405ef00, 0xc0000ddf98, 0x2b)
    /usr/local/go/src/runtime/sys_darwin.go:46 +0x6c fp=0xc0000ddf70 sp=0xc0000ddf40 pc=0x404e66c
runtime.exit(0xc000000000)
    /usr/local/go/src/runtime/sys_darwin.go:199 +0x33 fp=0xc0000ddf98 sp=0xc0000ddf70 pc=0x404ebf3
runtime.main()
    /usr/local/go/src/runtime/proc.go:222 +0x261 fp=0xc0000ddfe0 sp=0xc0000ddf98 pc=0x4033221
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1337 +0x1 fp=0xc0000ddfe8 sp=0xc0000ddfe0 pc=0x405d761

goroutine 34 [sleep]:
runtime.goparkunlock(...)
    /usr/local/go/src/runtime/proc.go:307
time.Sleep(0xdf8475800)
    /usr/local/go/src/runtime/time.go:105 +0x159
main.(*MessageModel).init.func1(0xc0000bc190)
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:136 +0x30
created by main.(*MessageModel).init
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:134 +0xe64

goroutine 35 [sleep]:
runtime.goparkunlock(...)
    /usr/local/go/src/runtime/proc.go:307
time.Sleep(0xdf8475800)
    /usr/local/go/src/runtime/time.go:105 +0x159
main.(*MessageModel).init.func1(0xc0000bc3c0)
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:136 +0x30
created by main.(*MessageModel).init
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:134 +0xe64

goroutine 36 [sleep]:
runtime.goparkunlock(...)
    /usr/local/go/src/runtime/proc.go:307
time.Sleep(0xdf8475800)
    /usr/local/go/src/runtime/time.go:105 +0x159
main.(*MessageModel).init.func1(0xc0000bc730)
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:136 +0x30
created by main.(*MessageModel).init
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:134 +0xe64

goroutine 37 [sleep]:
runtime.goparkunlock(...)
    /usr/local/go/src/runtime/proc.go:307
time.Sleep(0xdf8475800)
    /usr/local/go/src/runtime/time.go:105 +0x159
main.(*MessageModel).init.func1(0xc0000bc960)
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:136 +0x30
created by main.(*MessageModel).init
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:134 +0xe64

goroutine 38 [chan receive]:
main.handleEvents(0xc0000aa0c0, 0xc0000bc730, 0xc0000bc960)
    /Users/Philipp/go/src/github.com/muesli/telephant/events.go:56 +0x5b
created by main.setupMastodon
    /Users/Philipp/go/src/github.com/muesli/telephant/telephant.go:230 +0x308

goroutine 45 [select]:
net/http.(*http2ClientConn).roundTrip(0xc000130900, 0xc0001e0100, 0x0, 0x0, 0x0, 0x0)
    /usr/local/go/src/net/http/h2_bundle.go:7504 +0x8cc
net/http.(*http2Transport).RoundTripOpt(0xc000170000, 0xc0001e0100, 0xc00004b800, 0x42416e6, 0x0, 0xc000160120)
    /usr/local/go/src/net/http/h2_bundle.go:6867 +0x159
net/http.(*http2Transport).RoundTrip(...)
    /usr/local/go/src/net/http/h2_bundle.go:6829
net/http.http2noDialH2RoundTripper.RoundTrip(0xc000170000, 0xc0001e0100, 0xc000360740, 0x5, 0xc0001601a8)
    /usr/local/go/src/net/http/h2_bundle.go:8959 +0x3f
net/http.(*Transport).roundTrip(0x47b3880, 0xc0001e0100, 0x10, 0xc0000a72c0, 0xc00004bb80)
    /usr/local/go/src/net/http/transport.go:430 +0xe90
net/http.(*Transport).RoundTrip(0x47b3880, 0xc0001e0100, 0x47b3880, 0x0, 0x0)
    /usr/local/go/src/net/http/roundtrip.go:17 +0x35
net/http.send(0xc0001e0100, 0x44d2ce0, 0x47b3880, 0x0, 0x0, 0x0, 0xc000010288, 0xc000039e20, 0x1, 0x0)
    /usr/local/go/src/net/http/client.go:250 +0x461
net/http.(*Client).send(0xc0000c8680, 0xc0001e0100, 0x0, 0x0, 0x0, 0xc000010288, 0x0, 0x1, 0xe)
    /usr/local/go/src/net/http/client.go:174 +0xfb
net/http.(*Client).do(0xc0000c8680, 0xc0001e0100, 0x0, 0x0, 0x0)
    /usr/local/go/src/net/http/client.go:641 +0x279
net/http.(*Client).Do(...)
    /usr/local/go/src/net/http/client.go:509
github.com/mattn/go-mastodon.(*Client).doStreaming(0xc0000c8680, 0xc0001e0100, 0xc0001740c0)
    /Users/Philipp/go/src/github.com/mattn/go-mastodon/streaming.go:114 +0x3c
github.com/mattn/go-mastodon.(*Client).streaming.func1(0xc0001740c0, 0x44deaa0, 0xc0000a8000, 0xc0000c8680, 0xc0001e0100)
    /Users/Philipp/go/src/github.com/mattn/go-mastodon/streaming.go:107 +0x6b
created by github.com/mattn/go-mastodon.(*Client).streaming
    /Users/Philipp/go/src/github.com/mattn/go-mastodon/streaming.go:98 +0x3dd

goroutine 10 [IO wait]:
internal/poll.runtime_pollWait(0x11100ea8, 0x72, 0xffffffffffffffff)
    /usr/local/go/src/runtime/netpoll.go:182 +0x56
internal/poll.(*pollDesc).wait(0xc000132118, 0x72, 0x2500, 0x2566, 0xffffffffffffffff)
    /usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x9b
internal/poll.(*pollDesc).waitRead(...)
    /usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000132100, 0xc0004b6000, 0x2566, 0x2566, 0x0, 0x0, 0x0)
    /usr/local/go/src/internal/poll/fd_unix.go:169 +0x1f2
net.(*netFD).Read(0xc000132100, 0xc0004b6000, 0x2566, 0x2566, 0x203000, 0x0, 0x16d6)
    /usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc0000a0008, 0xc0004b6000, 0x2566, 0x2566, 0x0, 0x0, 0x0)
    /usr/local/go/src/net/net.go:177 +0x69
crypto/tls.(*atLeastReader).Read(0xc00047a3e0, 0xc0004b6000, 0x2566, 0x2566, 0x100, 0x6efffff, 0xc0001859e0)
    /usr/local/go/src/crypto/tls/conn.go:761 +0x60
bytes.(*Buffer).ReadFrom(0xc000107058, 0x44d2680, 0xc00047a3e0, 0x400f8e5, 0x43eb780, 0x4430640)
    /usr/local/go/src/bytes/buffer.go:207 +0xbd
crypto/tls.(*Conn).readFromUntil(0xc000106e00, 0x6f510e8, 0xc0000a0008, 0x5, 0xc0000a0008, 0x9)
    /usr/local/go/src/crypto/tls/conn.go:783 +0xf8
crypto/tls.(*Conn).readRecordOrCCS(0xc000106e00, 0x4467300, 0xc000106f38, 0xc000185d58)
    /usr/local/go/src/crypto/tls/conn.go:590 +0x125
crypto/tls.(*Conn).readRecord(...)
    /usr/local/go/src/crypto/tls/conn.go:558
crypto/tls.(*Conn).Read(0xc000106e00, 0xc0001b1000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/local/go/src/crypto/tls/conn.go:1236 +0x137
bufio.(*Reader).Read(0xc0001702a0, 0xc0001ca038, 0x9, 0x9, 0x400c5c4, 0xc0001629c0, 0xc000185d58)
    /usr/local/go/src/bufio/bufio.go:223 +0x23e
io.ReadAtLeast(0x44d2560, 0xc0001702a0, 0xc0001ca038, 0x9, 0x9, 0x9, 0x44d2780, 0xc0002fa9f0, 0xc000086050)
    /usr/local/go/src/io/io.go:310 +0x88
io.ReadFull(...)
    /usr/local/go/src/io/io.go:329
net/http.http2readFrameHeader(0xc0001ca038, 0x9, 0x9, 0x44d2560, 0xc0001702a0, 0x0, 0x0, 0xc0000ad5f0, 0x0)
    /usr/local/go/src/net/http/h2_bundle.go:1476 +0x88
net/http.(*http2Framer).ReadFrame(0xc0001ca000, 0xc0000ad5f0, 0x0, 0x0, 0x0)
    /usr/local/go/src/net/http/h2_bundle.go:1734 +0xa1
net/http.(*http2clientConnReadLoop).run(0xc000185fb8, 0x4466ce8, 0xc00003d7b8)
    /usr/local/go/src/net/http/h2_bundle.go:8102 +0x8f
net/http.(*http2ClientConn).readLoop(0xc000130900)
    /usr/local/go/src/net/http/h2_bundle.go:8030 +0x76
created by net/http.(*http2Transport).newClientConn
    /usr/local/go/src/net/http/h2_bundle.go:7093 +0x637

goroutine 44 [select]:
github.com/muesli/telephant/accounts/mastodon.(*Account).handleStream(0xc0000ad170)
    /Users/Philipp/go/src/github.com/muesli/telephant/accounts/mastodon/mastodon.go:517 +0x13f
created by github.com/muesli/telephant/accounts/mastodon.(*Account).Run
    /Users/Philipp/go/src/github.com/muesli/telephant/accounts/mastodon/mastodon.go:144 +0x511

rax    0x0
rbx    0xf6245c0
rcx    0x7ffeefbfecb8
rdx    0x0
rdi    0x307
rsi    0x6
rbp    0x7ffeefbfecf0
rsp    0x7ffeefbfecb8
r8     0x0
r9     0x7ffeefbfec10
r10    0x0
r11    0x206
r12    0x307
r13    0xfd88000
r14    0x6
r15    0x2d
rip    0x7fff6c0902c6
rflags 0x206
cs     0x7
fs     0x0
gs     0x0
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
stack trace unavailable
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
signal 6 received but handler not on signal stack
fatal error: non-Go code set up signal handler without SA_ONSTACK flag

runtime stack:
runtime: unexpected return pc for runtime.sigtramp called from 0xc0000022b8
stack: frame={sp:0xc000001e40, fp:0xc000001e50} stack=[0xbfffff9d80,0xc000002180)
000000c000001d40:  000000000445fe6d  0000000000000039
000000c000001d50:  000000c000001d70  000000000404654f <runtime.sigNotOnStack+127>
000000c000001d60:  000000000445fe6d  0000000000000039
000000c000001d70:  000000c000001e30  0000000004045bd3 <runtime.sigtrampgo+819>
000000c000001d80:  0000000000000006  000000c000001e00
000000c000001d90:  000000c000002320  0000000004021300 <runtime.gcMarkTermination+2768>
000000c000001da0:  0000000000000000  000000c000001e40
000000c000001db0:  0000000000000000  0000000000000000
000000c000001dc0:  0000000000000000  0000000000000000
000000c000001dd0:  0000000000000000  000000c000000000
000000c000001de0:  0000000000000000  0000000000000000
000000c000001df0:  0000000000000000  0000000000000000
000000c000001e00:  000000c000002000  0000000000008000
000000c000001e10:  0000000000000001  0000000000000000
000000c000001e20:  0000000000000000  0000000000000000
000000c000001e30:  000000c000001e80  000000000405f143 <runtime.sigtramp+51>
000000c000001e40: <0000000000000006 !000000c0000022b8
000000c000001e50: >000000c000002320  000000c000002320
000000c000001e60:  c2f4e5a4c6db400a  000000000fd95000
000000c000001e70:  0000000000000006  000000000000002d
000000c000001e80:  000000c000001e90  00007fff6c13ab5d
000000c000001e90:  000000c000002410  0000000000000000
000000c000001ea0:  0000000000000000  0000000000000000
000000c000001eb0:  0200014800000085  000000000fd96000
000000c000001ec0:  0000000000000000  000000000f6245c0
000000c000001ed0:  000000c0000023d8  0000000000000000
000000c000001ee0:  0000000000000307  0000000000000006
000000c000001ef0:  000000c000002410  000000c0000023d8
000000c000001f00:  0000000000000000  000000c000002330
000000c000001f10:  0000000000000000  0000000000000206
000000c000001f20:  0000000000000307  000000000fd95000
000000c000001f30:  0000000000000006  000000000000002d
000000c000001f40:  00007fff6c0902c6  0000000000000206
runtime.throw(0x445fe6d, 0x39)
    /usr/local/go/src/runtime/panic.go:617 +0x72
runtime.sigNotOnStack(0x6)
    /usr/local/go/src/runtime/signal_unix.go:576 +0x7f
runtime.sigtrampgo(0x6, 0xc0000022b8, 0xc000002320)
    /usr/local/go/src/runtime/signal_unix.go:334 +0x333
runtime: unexpected return pc for runtime.sigtramp called from 0xc0000022b8
stack: frame={sp:0xc000001e40, fp:0xc000001e50} stack=[0xbfffff9d80,0xc000002180)
000000c000001d40:  000000000445fe6d  0000000000000039
000000c000001d50:  000000c000001d70  000000000404654f <runtime.sigNotOnStack+127>
000000c000001d60:  000000000445fe6d  0000000000000039
000000c000001d70:  000000c000001e30  0000000004045bd3 <runtime.sigtrampgo+819>
000000c000001d80:  0000000000000006  000000c000001e00
000000c000001d90:  000000c000002320  0000000004021300 <runtime.gcMarkTermination+2768>
000000c000001da0:  0000000000000000  000000c000001e40
000000c000001db0:  0000000000000000  0000000000000000
000000c000001dc0:  0000000000000000  0000000000000000
000000c000001dd0:  0000000000000000  000000c000000000
000000c000001de0:  0000000000000000  0000000000000000
000000c000001df0:  0000000000000000  0000000000000000
000000c000001e00:  000000c000002000  0000000000008000
000000c000001e10:  0000000000000001  0000000000000000
000000c000001e20:  0000000000000000  0000000000000000
000000c000001e30:  000000c000001e80  000000000405f143 <runtime.sigtramp+51>
000000c000001e40: <0000000000000006 !000000c0000022b8
000000c000001e50: >000000c000002320  000000c000002320
000000c000001e60:  c2f4e5a4c6db400a  000000000fd95000
000000c000001e70:  0000000000000006  000000000000002d
000000c000001e80:  000000c000001e90  00007fff6c13ab5d
000000c000001e90:  000000c000002410  0000000000000000
000000c000001ea0:  0000000000000000  0000000000000000
000000c000001eb0:  0200014800000085  000000000fd96000
000000c000001ec0:  0000000000000000  000000000f6245c0
000000c000001ed0:  000000c0000023d8  0000000000000000
000000c000001ee0:  0000000000000307  0000000000000006
000000c000001ef0:  000000c000002410  000000c0000023d8
000000c000001f00:  0000000000000000  000000c000002330
000000c000001f10:  0000000000000000  0000000000000206
000000c000001f20:  0000000000000307  000000000fd95000
000000c000001f30:  0000000000000006  000000000000002d
000000c000001f40:  00007fff6c0902c6  0000000000000206
runtime.sigtramp(0xc000002320, 0xc000002320, 0xc2f4e5a4c6db400a, 0xfd95000, 0x6, 0x2d, 0xc000001e90, 0x7fff6c13ab5d, 0xc000002410, 0x0, ...)
    /usr/local/go/src/runtime/sys_darwin_amd64.s:206 +0x33
telephant(71489,0xf6245c0) malloc: *** error for object 0xa9437e0: pointer being freed was not allocated
telephant(71489,0xf6245c0) malloc: *** set a breakpoint in malloc_error_break to debug
panic during panic
SIGABRT: abort
PC=0x7fff6c0902c6 m=1 sigcode=0

goroutine 0 [idle]:
runtime.exit(0xc000000002)
    /usr/local/go/src/runtime/sys_darwin.go:199 +0x33
runtime.fatalthrow.func1()
    /usr/local/go/src/runtime/panic.go:679 +0x73
runtime.fatalthrow()
    /usr/local/go/src/runtime/panic.go:669 +0x57
runtime.throw(0x445fe6d, 0x39)
    /usr/local/go/src/runtime/panic.go:617 +0x72
runtime.sigNotOnStack(0x6)
    /usr/local/go/src/runtime/signal_unix.go:576 +0x7f
runtime.sigtrampgo(0x6, 0xc0000022b8, 0xc000002320)
    /usr/local/go/src/runtime/signal_unix.go:334 +0x333
runtime: unexpected return pc for runtime.sigtramp called from 0xc0000022b8
stack: frame={sp:0xc000001e40, fp:0xc000001e50} stack=[0xbfffff9d80,0xc000002180)
000000c000001d40:  000000000445fe6d  0000000000000039
000000c000001d50:  000000c000001d70  000000000404654f <runtime.sigNotOnStack+127>
000000c000001d60:  000000000445fe6d  0000000000000039
000000c000001d70:  000000c000001e30  0000000004045bd3 <runtime.sigtrampgo+819>
000000c000001d80:  0000000000000006  000000c000001e00
000000c000001d90:  000000c000002320  0000000004021300 <runtime.gcMarkTermination+2768>
000000c000001da0:  0000000000000000  000000c000001e40
000000c000001db0:  0000000000000000  0000000000000000
000000c000001dc0:  0000000000000000  0000000000000000
000000c000001dd0:  0000000000000000  000000c000000000
000000c000001de0:  0000000000000000  0000000000000000
000000c000001df0:  0000000000000000  0000000000000000
000000c000001e00:  000000c000002000  0000000000008000
000000c000001e10:  0000000000000001  0000000000000000
000000c000001e20:  0000000000000000  0000000000000000
000000c000001e30:  000000c000001e80  000000000405f143 <runtime.sigtramp+51>
000000c000001e40: <0000000000000006 !000000c0000022b8
000000c000001e50: >000000c000002320  000000c000002320
000000c000001e60:  c2f4e5a4c6db400a  000000000fd95000
000000c000001e70:  0000000000000006  000000000000002d
000000c000001e80:  000000c000001e90  00007fff6c13ab5d
000000c000001e90:  000000c000002410  0000000000000000
000000c000001ea0:  0000000000000000  0000000000000000
000000c000001eb0:  0200014800000085  000000000fd96000
000000c000001ec0:  0000000000000000  000000000f6245c0
000000c000001ed0:  000000c0000023d8  0000000000000000
000000c000001ee0:  0000000000000307  0000000000000006
000000c000001ef0:  000000c000002410  000000c0000023d8
000000c000001f00:  0000000000000000  000000c000002330
000000c000001f10:  0000000000000000  0000000000000206
000000c000001f20:  0000000000000307  000000000fd95000
000000c000001f30:  0000000000000006  000000000000002d
000000c000001f40:  00007fff6c0902c6  0000000000000206
runtime.sigtramp(0xc000002320, 0xc000002320, 0xc2f4e5a4c6db400a, 0xfd95000, 0x6, 0x2d, 0xc000001e90, 0x7fff6c13ab5d, 0xc000002410, 0x0, ...)
    /usr/local/go/src/runtime/sys_darwin_amd64.s:206 +0x33

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1337 +0x1 fp=0xc00004cfe8 sp=0xc00004cfe0 pc=0x405d761

goroutine 1 [running, locked to thread]:
    goroutine running on other thread; stack unavailable

goroutine 34 [sleep]:
runtime.goparkunlock(...)
    /usr/local/go/src/runtime/proc.go:307
time.Sleep(0xdf8475800)
    /usr/local/go/src/runtime/time.go:105 +0x159
main.(*MessageModel).init.func1(0xc0000bc190)
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:136 +0x30
created by main.(*MessageModel).init
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:134 +0xe64

goroutine 35 [sleep]:
runtime.goparkunlock(...)
    /usr/local/go/src/runtime/proc.go:307
time.Sleep(0xdf8475800)
    /usr/local/go/src/runtime/time.go:105 +0x159
main.(*MessageModel).init.func1(0xc0000bc3c0)
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:136 +0x30
created by main.(*MessageModel).init
    /Users/Philipp/go/src/github.com/muesli/telephant/messagemodel.go:134 +0xe64

goroutine 1 [??? (scan), locked to thread]:
nueh commented 5 years ago

This may be a tough bug to fix. Seems like a known problem on macOS/darwin (maybe all BSDs?): https://github.com/golang/go/issues/7227

CalmBit commented 5 years ago

@nueh Forigve me, but I don't see the immediate relation between the two, although it does seem to be an error with QT in general, and not with Telephant. Seems more akin to https://github.com/visualfc/goqt/issues/52, based on my limited research.

CalmBit commented 5 years ago

Also, just so it's clear, I'm also experiencing this issue. Mac OS Mojave, 10.14.4.

It also occurs if you use the "exit" menu option from within the app, although at that point the app doesn't even close - it just stays alive, perpetually untargetable. Force quitting is necessary each time.

muesli commented 5 years ago

I'll hopefully get to look into that (and a macOS build) soon enough. There's a Qt setting to quit the app if the last remaining window has been closed. We probably want to enable that.

nueh commented 5 years ago

@CalmBit You might be right as I am neither fluent in Go nor Qt. In fact, I tried setting setQuitOnLastWindowClosed(true) but couldn't figure out how to do it in Go (although it should be true by default).