OSX: random crash
Maybe related to the systray library?
users-iMac:bitmask-systray user1$ ./bitmask-systray
2018-06-19 07:25:14.738 bitmask-systray[428:4591] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-1154/Misc.subproj/NSUndoManager.m:340
2018-06-19 07:25:14.739 bitmask-systray[428:4591] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.
2018-06-19 07:25:14.740 bitmask-systray[428:4591] (
0 CoreFoundation 0x00007fff9343903c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff98d0c76e objc_exception_throw + 43
2 CoreFoundation 0x00007fff93438e1a +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff8fe8599b -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 Foundation 0x00007fff8fe0764f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 156
5 AppKit 0x00007fff97510b95 -[NSApplication run] + 756
6 bitmask-systray 0x0000000004279ef0 nativeLoop + 128
7 bitmask-systray 0x000000000427978a _cgo_53ed241910c0_Cfunc_nativeLoop + 26
8 bitmask-systray 0x0000000004055b60 runtime.asmcgocall + 112
)
2018-06-19 07:25:14.740 bitmask-systray[428:4591] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-1154/Misc.subproj/NSUndoManager.m:340
2018-06-19 07:25:14.741 bitmask-systray[428:4591] An uncaught exception was raised
2018-06-19 07:25:14.741 bitmask-systray[428:4591] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.
2018-06-19 07:25:14.741 bitmask-systray[428:4591] (
0 CoreFoundation 0x00007fff9343903c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff98d0c76e objc_exception_throw + 43
2 CoreFoundation 0x00007fff93438e1a +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff8fe8599b -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 Foundation 0x00007fff8fe0764f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 156
5 AppKit 0x00007fff97510c41 -[NSApplication run] + 928
6 bitmask-systray 0x0000000004279ef0 nativeLoop + 128
7 bitmask-systray 0x000000000427978a _cgo_53ed241910c0_Cfunc_nativeLoop + 26
8 bitmask-systray 0x0000000004055b60 runtime.asmcgocall + 112
)
2018-06-19 07:25:14.742 bitmask-systray[428:4591] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff9343903c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff98d0c76e objc_exception_throw + 43
2 CoreFoundation 0x00007fff93438e1a +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff8fe8599b -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 Foundation 0x00007fff8fe0764f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 156
5 AppKit 0x00007fff97510c41 -[NSApplication run] + 928
6 bitmask-systray 0x0000000004279ef0 nativeLoop + 128
7 bitmask-systray 0x000000000427978a _cgo_53ed241910c0_Cfunc_nativeLoop + 26
8 bitmask-systray 0x0000000004055b60 runtime.asmcgocall + 112
)
libc++abi.dylib: terminating with uncaught exception of type NSException
SIGABRT: abort
PC=0x7fff96483286 m=5 sigcode=0
signal arrived during cgo execution
goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x4279770, 0xc420147e18, 0x4013278)
/usr/local/Cellar/go/1.10.3/libexec/src/runtime/cgocall.go:128 +0x64 fp=0xc420147de8 sp=0xc420147db0 pc=0x4004134
github.com/getlantern/systray._Cfunc_nativeLoop(0xc400000000)
_cgo_gotypes.go:101 +0x49 fp=0xc420147e18 sp=0xc420147de8 pc=0x4273e19
github.com/getlantern/systray.nativeLoop()
/Users/user1/go/src/github.com/getlantern/systray/systray_nonwindows.go:19 +0x22 fp=0xc420147e30 sp=0xc420147e18 pc=0x42742d2
github.com/getlantern/systray.Run(0xc420188010, 0xc42017a0c0)
/Users/user1/go/src/github.com/getlantern/systray/systray.go:81 +0x77 fp=0xc420147e68 sp=0xc420147e30 pc=0x4273477
main.run(0xc4201780a0, 0xc4200a0200, 0xc42000e010)
/Users/user1/leap/bitmask-systray/systray.go:48 +0x14f fp=0xc420147ef8 sp=0xc420147e68 pc=0x427725f
main.main()
/Users/user1/leap/bitmask-systray/main.go:69 +0x24a fp=0xc420147f88 sp=0xc420147ef8 pc=0x42757da
runtime.main()
/usr/local/Cellar/go/1.10.3/libexec/src/runtime/proc.go:198 +0x212 fp=0xc420147fe0 sp=0xc420147f88 pc=0x402d492
runtime.goexit()
/usr/local/Cellar/go/1.10.3/libexec/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420147fe8 sp=0xc420147fe0 pc=0x4056e71
goroutine 37 [select]:
net/http.(*persistConn).roundTrip(0xc4200cb0e0, 0xc4201c6750, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/transport.go:2033 +0x5a7
net/http.(*Transport).RoundTrip(0x44d2480, 0xc4201d0300, 0x44d2480, 0x0, 0x0)
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/transport.go:422 +0x8f2
net/http.send(0xc4201d0300, 0x435de20, 0x44d2480, 0x0, 0x0, 0x0, 0xc4200a82f8, 0x150, 0xc420057d08, 0x1)
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/client.go:252 +0x185
net/http.(*Client).send(0xc4201c6600, 0xc4201d0300, 0x0, 0x0, 0x0, 0xc4200a82f8, 0x0, 0x1, 0x4013278)
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/client.go:176 +0xfa
net/http.(*Client).Do(0xc4201c6600, 0xc4201d0300, 0xe, 0xc42018e0a0, 0x20)
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/client.go:615 +0x28d
0xacab.org/leap/bitmask-systray/bitmask.send(0xc42018e0a0, 0x20, 0xc4201c6600, 0xc420117080, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0)
/Users/user1/go/src/0xacab.org/leap/bitmask-systray/bitmask/main.go:115 +0x265
0xacab.org/leap/bitmask-systray/bitmask.(*Bitmask).eventsHandler(0xc4201780a0)
/Users/user1/go/src/0xacab.org/leap/bitmask-systray/bitmask/events.go:33 +0x180
created by 0xacab.org/leap/bitmask-systray/bitmask.Init
/Users/user1/go/src/0xacab.org/leap/bitmask-systray/bitmask/main.go:60 +0x11a
goroutine 4 [sleep]:
time.Sleep(0x45d964b800)
/usr/local/Cellar/go/1.10.3/libexec/src/runtime/time.go:102 +0x166
main.(*notificator).donations(0xc42000e010)
/Users/user1/leap/bitmask-systray/notificator.go:53 +0x34
created by main.newNotificator
/Users/user1/leap/bitmask-systray/notificator.go:48 +0x66
goroutine 39 [chan receive]:
github.com/getlantern/systray.Run.func2(0xc42018a180, 0xc420188010)
/Users/user1/go/src/github.com/getlantern/systray/systray.go:66 +0x34
created by github.com/getlantern/systray.Run
/Users/user1/go/src/github.com/getlantern/systray/systray.go:65 +0xf5
goroutine 28 [IO wait]:
internal/poll.runtime_pollWait(0x4697d60, 0x72, 0xc4200469a8)
/usr/local/Cellar/go/1.10.3/libexec/src/runtime/netpoll.go:173 +0x57
internal/poll.(*pollDesc).wait(0xc4201ea018, 0x72, 0xffffffffffffff00, 0x435eb00, 0x4496760)
/usr/local/Cellar/go/1.10.3/libexec/src/internal/poll/fd_poll_runtime.go:85 +0x9b
internal/poll.(*pollDesc).waitRead(0xc4201ea018, 0xc4201ee000, 0x1000, 0x1000)
/usr/local/Cellar/go/1.10.3/libexec/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc4201ea000, 0xc4201ee000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.10.3/libexec/src/internal/poll/fd_unix.go:157 +0x1dc
net.(*netFD).Read(0xc4201ea000, 0xc4201ee000, 0x1000, 0x1000, 0x4053200, 0xc420001980, 0x4)
/usr/local/Cellar/go/1.10.3/libexec/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc4200a82d0, 0xc4201ee000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.10.3/libexec/src/net/net.go:176 +0x6a
net/http.(*persistConn).Read(0xc4200cb0e0, 0xc4201ee000, 0x1000, 0x1000, 0xc420046b98, 0x4006195, 0xc42008a780)
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/transport.go:1453 +0x136
bufio.(*Reader).fill(0xc4200bce40)
/usr/local/Cellar/go/1.10.3/libexec/src/bufio/bufio.go:100 +0x11e
bufio.(*Reader).Peek(0xc4200bce40, 0x1, 0x0, 0x0, 0x0, 0xc42008a6c0, 0x0)
/usr/local/Cellar/go/1.10.3/libexec/src/bufio/bufio.go:132 +0x3a
net/http.(*persistConn).readLoop(0xc4200cb0e0)
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/transport.go:1601 +0x185
created by net/http.(*Transport).dialConn
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/transport.go:1237 +0x95a
goroutine 52 [IO wait]:
internal/poll.runtime_pollWait(0x4697f00, 0x72, 0xc4201cc9a8)
/usr/local/Cellar/go/1.10.3/libexec/src/runtime/netpoll.go:173 +0x57
internal/poll.(*pollDesc).wait(0xc4200ba518, 0x72, 0xffffffffffffff00, 0x435eb00, 0x4496760)
/usr/local/Cellar/go/1.10.3/libexec/src/internal/poll/fd_poll_runtime.go:85 +0x9b
internal/poll.(*pollDesc).waitRead(0xc4200ba518, 0xc4201f0000, 0x1000, 0x1000)
/usr/local/Cellar/go/1.10.3/libexec/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc4200ba500, 0xc4201f0000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.10.3/libexec/src/internal/poll/fd_unix.go:157 +0x1dc
net.(*netFD).Read(0xc4200ba500, 0xc4201f0000, 0x1000, 0x1000, 0x4053200, 0xc42007e900, 0x4)
/usr/local/Cellar/go/1.10.3/libexec/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc42000e0c8, 0xc4201f0000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.10.3/libexec/src/net/net.go:176 +0x6a
net/http.(*persistConn).Read(0xc42016e240, 0xc4201f0000, 0x1000, 0x1000, 0xc4201ccb98, 0x4006195, 0xc42001eae0)
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/transport.go:1453 +0x136
bufio.(*Reader).fill(0xc420064d20)
/usr/local/Cellar/go/1.10.3/libexec/src/bufio/bufio.go:100 +0x11e
bufio.(*Reader).Peek(0xc420064d20, 0x1, 0x0, 0x0, 0x0, 0xc42001ea20, 0x0)
/usr/local/Cellar/go/1.10.3/libexec/src/bufio/bufio.go:132 +0x3a
net/http.(*persistConn).readLoop(0xc42016e240)
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/transport.go:1601 +0x185
created by net/http.(*Transport).dialConn
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/transport.go:1237 +0x95a
goroutine 53 [select]:
net/http.(*persistConn).writeLoop(0xc42016e240)
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/transport.go:1822 +0x14b
created by net/http.(*Transport).dialConn
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/transport.go:1238 +0x97f
goroutine 29 [select]:
net/http.(*persistConn).writeLoop(0xc4200cb0e0)
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/transport.go:1822 +0x14b
created by net/http.(*Transport).dialConn
/usr/local/Cellar/go/1.10.3/libexec/src/net/http/transport.go:1238 +0x97f
rax 0x0
rbx 0x6
rcx 0xb0185518
rdx 0x0
rdi 0x1003
rsi 0x6
rbp 0xb0185540
rsp 0xb0185518
r8 0x0
r9 0x7fff91a6ed60
r10 0x8000000
r11 0x206
r12 0xb01856a0
r13 0x5321440
r14 0xb0187000
r15 0xb0185580
rip 0x7fff96483286
rflags 0x206
cs 0x7
fs 0x0
gs 0x0