Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ping.10s.sh crashes xbar #1567

Closed
Joshfindit opened this issue Mar 12, 2021 · 17 comments
Closed

ping.10s.sh crashes xbar #1567

Joshfindit opened this issue Mar 12, 2021 · 17 comments

Comments

@Joshfindit
Copy link
Contributor

I'm thinking this has to do with the differences between xbar and BitBar

I'm up for updating this plugin myself if someone can point out the issue, but I would also like to suggest something in addition:
Let xbar fail gracefully and not crash when a script breaks.

➜  ~ Downloads/xbar.app/Contents/MacOS/xbar
xbar v2.0.25-beta-1-g8d8f34f1
2021/03/12 12:24:46 ping.10s.sh: /Users/josh/Library/Application Support/xbar/plugins/001-ping.10s.sh.vars.json, no such file:
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x4fa030 pc=0x7fff5dffe184]

runtime stack:
runtime.throw(0x44e3e69, 0x2a)
	/usr/local/go/src/runtime/panic.go:1117 +0x72
runtime.sigpanic()
	/usr/local/go/src/runtime/signal_unix.go:718 +0x2ef

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x43edb60, 0xc000113d40, 0x0)
	/usr/local/go/src/runtime/cgocall.go:154 +0x5b fp=0xc000113d10 sp=0xc000113cd8 pc=0x400491b
github.com/wailsapp/wails/v2/internal/ffenestri._Cfunc_Run(0x4e047f0, 0xc000000000, 0x0)
	_cgo_gotypes.go:358 +0x45 fp=0xc000113d40 sp=0xc000113d10 pc=0x43d11a5
github.com/wailsapp/wails/v2/internal/ffenestri.(*Application).Run.func6(0x4e047f0)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/ffenestri/ffenestri.go:171 +0x65 fp=0xc000113d70 sp=0xc000113d40 pc=0x43d3f45
github.com/wailsapp/wails/v2/internal/ffenestri.(*Application).Run(0xc0000e2800, 0x4572a80, 0xc0000c14a0, 0xc0001a2a80, 0xa5c, 0xc0000e2e00, 0x0, 0x0)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/ffenestri/ffenestri.go:171 +0x2f1 fp=0xc000113de0 sp=0xc000113d70 pc=0x43d2691
github.com/wailsapp/wails/v2/internal/app.(*App).Run(0xc0000e7340, 0xc0000e7340, 0x0)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/app/desktop.go:224 +0x659 fp=0xc000113e88 sp=0xc000113de0 pc=0x43e0479
github.com/wailsapp/wails/v2.Run(0xc00017c000, 0xc0000e2680, 0x44d03a7)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/wails.go:24 +0x5f fp=0xc000113eb8 sp=0xc000113e88 pc=0x43e0a9f
main.run(0x44da22e, 0x18)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/app/main.go:33 +0x30d fp=0xc000113f18 sp=0xc000113eb8 pc=0x43e78cd
main.main()
	/Users/matryer/Code/go/src/github.com/matryer/xbar/app/main.go:19 +0x6f fp=0xc000113f88 sp=0xc000113f18 pc=0x43e74ef
runtime.main()
	/usr/local/go/src/runtime/proc.go:225 +0x256 fp=0xc000113fe0 sp=0xc000113f88 pc=0x40397d6
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc000113fe8 sp=0xc000113fe0 pc=0x406d241

goroutine 19 [select]:
github.com/wailsapp/wails/v2/internal/servicebus.(*ServiceBus).Start.func1(0xc0000be5a0)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/servicebus/servicebus.go:83 +0x157
created by github.com/wailsapp/wails/v2/internal/servicebus.(*ServiceBus).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/servicebus/servicebus.go:77 +0xce

goroutine 20 [select]:
github.com/wailsapp/wails/v2/internal/subsystem.(*Runtime).Start.func1(0xc0000bf440)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/runtime.go:73 +0x17c
created by github.com/wailsapp/wails/v2/internal/subsystem.(*Runtime).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/runtime.go:70 +0x3f

goroutine 21 [select]:
github.com/wailsapp/wails/v2/internal/subsystem.(*Log).Start.func1(0xc0000964b0)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/log.go:68 +0x157
created by github.com/wailsapp/wails/v2/internal/subsystem.(*Log).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/log.go:64 +0x5c

goroutine 22 [select]:
github.com/wailsapp/wails/v2/internal/messagedispatcher.(*Dispatcher).Start.func1(0xc0000c14a0)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/messagedispatcher/messagedispatcher.go:118 +0x225
created by github.com/wailsapp/wails/v2/internal/messagedispatcher.(*Dispatcher).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/messagedispatcher/messagedispatcher.go:115 +0x9e

goroutine 23 [select]:
github.com/wailsapp/wails/v2/internal/subsystem.(*URL).Start.func1(0xc000096780)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/url.go:66 +0x157
created by github.com/wailsapp/wails/v2/internal/subsystem.(*URL).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/url.go:62 +0x5c

goroutine 24 [select]:
github.com/wailsapp/wails/v2/internal/subsystem.(*Event).Start.func1(0xc000096820)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/event.go:89 +0x153
created by github.com/wailsapp/wails/v2/internal/subsystem.(*Event).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/event.go:86 +0x9b

goroutine 25 [select]:
github.com/wailsapp/wails/v2/internal/subsystem.(*Menu).Start.func1(0xc0000968c0)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/menu.go:72 +0x153
created by github.com/wailsapp/wails/v2/internal/subsystem.(*Menu).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/menu.go:69 +0x9b

goroutine 26 [select]:
github.com/wailsapp/wails/v2/internal/subsystem.(*Call).Start.func1(0xc000096960)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/call.go:77 +0x14a
created by github.com/wailsapp/wails/v2/internal/subsystem.(*Call).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/call.go:74 +0x5a

goroutine 5 [syscall]:
os/signal.signal_recv(0x0)
	/usr/local/go/src/runtime/sigqueue.go:165 +0x9d
os/signal.loop()
	/usr/local/go/src/os/signal/signal_unix.go:23 +0x25
created by os/signal.Notify.func1.1
	/usr/local/go/src/os/signal/signal.go:151 +0x45

goroutine 34 [select]:
github.com/wailsapp/wails/v2/internal/signal.(*Manager).Start.func1(0xc0000e2ec0)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/signal/signal.go:59 +0x9e
created by github.com/wailsapp/wails/v2/internal/signal.(*Manager).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/signal/signal.go:58 +0xc9

goroutine 51 [semacquire]:
sync.runtime_Semacquire(0xc000338018)
	/usr/local/go/src/runtime/sema.go:56 +0x45
sync.(*WaitGroup).Wait(0xc000338010)
	/usr/local/go/src/sync/waitgroup.go:130 +0x65
github.com/matryer/xbar/pkg/plugins.(*Plugin).Run(0xc000370340, 0x4579838, 0xc0000e31c0)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:229 +0x1aa
github.com/matryer/xbar/pkg/plugins.Plugins.Run.func1(0x4579838, 0xc0000e31c0, 0xc000208130, 0xc000370340)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:108 +0x3f
created by github.com/matryer/xbar/pkg/plugins.Plugins.Run
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:107 +0x9f

goroutine 31 [semacquire]:
sync.runtime_Semacquire(0xc000208138)
	/usr/local/go/src/runtime/sema.go:56 +0x45
sync.(*WaitGroup).Wait(0xc000208130)
	/usr/local/go/src/sync/waitgroup.go:130 +0x65
github.com/matryer/xbar/pkg/plugins.Plugins.Run(0xc000193b40, 0x1, 0x2, 0x4579838, 0xc0000e31c0)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:112 +0xc5
main.(*app).RefreshAll.func1(0xc0000c1400, 0x4579838, 0xc0000e31c0)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/app/app.go:193 +0x55
created by main.(*app).RefreshAll
	/Users/matryer/Code/go/src/github.com/matryer/xbar/app/app.go:190 +0x712

goroutine 58 [select]:
github.com/matryer/xbar/pkg/plugins.(*Plugin).Run.func1(0xc000338010, 0xc0004f80c0, 0xc000370340, 0x4579838, 0xc0000e31c0)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:193 +0x139
created by github.com/matryer/xbar/pkg/plugins.(*Plugin).Run
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:190 +0x138

goroutine 70 [IO wait]:
internal/poll.runtime_pollWait(0x7d31bd0, 0x72, 0xffffffffffffffff)
	/usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc000432198, 0x72, 0xe00, 0xe11, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000432180, 0xc000262000, 0xe11, 0xe11, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1d5
net.(*netFD).Read(0xc000432180, 0xc000262000, 0xe11, 0xe11, 0xc000262575, 0xc0001e4658, 0xc000052828)
	/usr/local/go/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc000218078, 0xc000262000, 0xe11, 0xe11, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/net.go:183 +0x91
crypto/tls.(*atLeastReader).Read(0xc0001f0108, 0xc000262000, 0xe11, 0xe11, 0x0, 0xc0002aa000, 0x0)
	/usr/local/go/src/crypto/tls/conn.go:776 +0x63
bytes.(*Buffer).ReadFrom(0xc000252278, 0x45723e0, 0xc0001f0108, 0x400c7c5, 0x4463a40, 0x44bd000)
	/usr/local/go/src/bytes/buffer.go:204 +0xbe
crypto/tls.(*Conn).readFromUntil(0xc000252000, 0x7cf9170, 0xc000218078, 0x5, 0xc000218078, 0x447e8e0)
	/usr/local/go/src/crypto/tls/conn.go:798 +0xf3
crypto/tls.(*Conn).readRecordOrCCS(0xc000252000, 0x0, 0x0, 0xc000193500)
	/usr/local/go/src/crypto/tls/conn.go:605 +0x115
crypto/tls.(*Conn).readRecord(...)
	/usr/local/go/src/crypto/tls/conn.go:573
crypto/tls.(*Conn).Read(0xc000252000, 0xc0002c3000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/crypto/tls/conn.go:1276 +0x165
bufio.(*Reader).Read(0xc000373080, 0xc0001dc3b8, 0x9, 0x9, 0x425fd6b, 0xc000052c78, 0x40080a5)
	/usr/local/go/src/bufio/bufio.go:227 +0x222
io.ReadAtLeast(0x4572240, 0xc000373080, 0xc0001dc3b8, 0x9, 0x9, 0x9, 0xc0001fc440, 0xf59308b3e9af00, 0xc0001fc440)
	/usr/local/go/src/io/io.go:328 +0x87
io.ReadFull(...)
	/usr/local/go/src/io/io.go:347
net/http.http2readFrameHeader(0xc0001dc3b8, 0x9, 0x9, 0x4572240, 0xc000373080, 0x0, 0x0, 0xc0001fa600, 0x0)
	/usr/local/go/src/net/http/h2_bundle.go:1477 +0x89
net/http.(*http2Framer).ReadFrame(0xc0001dc380, 0xc0001fa600, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/http/h2_bundle.go:1735 +0xa5
net/http.(*http2clientConnReadLoop).run(0xc000052fa8, 0x0, 0x0)
	/usr/local/go/src/net/http/h2_bundle.go:8322 +0xd8
net/http.(*http2ClientConn).readLoop(0xc000376a80)
	/usr/local/go/src/net/http/h2_bundle.go:8244 +0x6f
created by net/http.(*http2Transport).newClientConn
	/usr/local/go/src/net/http/h2_bundle.go:7208 +0x6c5

goroutine 59 [select]:
github.com/matryer/xbar/pkg/plugins.(*Plugin).Run.func2(0xc000338010, 0xc000370340, 0x4579838, 0xc0000e31c0, 0xc0004f80c0)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:215 +0x150
created by github.com/matryer/xbar/pkg/plugins.(*Plugin).Run
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:212 +0x19c
➜  ~
@matryer
Copy link
Owner

matryer commented Mar 28, 2021

@leaanthony Is this related to other similar issues?

@leaanthony
Copy link

Leave this with me to investigate 👍

@leaanthony
Copy link

Can't reproduce with latest. @Joshfindit if this still happens with latest, let us know 👍

@Joshfindit
Copy link
Contributor Author

@leaanthony It still crashes for me on latest, yes:

xbar v2.0.34-beta
2021/03/28 10:08:53 vtc-btc-bittrex_detail.30s.sh: (skipping) no variable file: /Users/josh/Library/Application Support/xbar/plugins/001-vtc-btc-bittrex_detail.30s.sh.vars.json
2021/03/28 10:08:53 ping.10s.sh: (skipping) no variable file: /Users/josh/Library/Application Support/xbar/plugins/001-ping.10s.sh.vars.json
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x682bf0 pc=0x7fff781fb184]

runtime stack:
runtime.throw(0x44e6871, 0x2a)
	/usr/local/go/src/runtime/panic.go:1117 +0x72
runtime.sigpanic()
	/usr/local/go/src/runtime/signal_unix.go:718 +0x2ef

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x43ef3c0, 0xc00015bd40, 0xc000072f00)
	/usr/local/go/src/runtime/cgocall.go:154 +0x5b fp=0xc00015bd10 sp=0xc00015bcd8 pc=0x4004b1b
github.com/wailsapp/wails/v2/internal/ffenestri._Cfunc_Run(0x6800120, 0xc000000000, 0x0)
	_cgo_gotypes.go:358 +0x45 fp=0xc00015bd40 sp=0xc00015bd10 pc=0x43d2be5
github.com/wailsapp/wails/v2/internal/ffenestri.(*Application).Run.func6(0x6800120)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/ffenestri/ffenestri.go:171 +0x65 fp=0xc00015bd70 sp=0xc00015bd40 pc=0x43d5985
github.com/wailsapp/wails/v2/internal/ffenestri.(*Application).Run(0xc000072880, 0x4575700, 0xc000113540, 0xc0001f6a80, 0xa5c, 0xc000072f00, 0x0, 0x0)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/ffenestri/ffenestri.go:171 +0x2f1 fp=0xc00015bde0 sp=0xc00015bd70 pc=0x43d40d1
github.com/wailsapp/wails/v2/internal/app.(*App).Run(0xc00012f6b0, 0xc00012f6b0, 0x0)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/app/desktop.go:224 +0x659 fp=0xc00015be88 sp=0xc00015bde0 pc=0x43e2039
github.com/wailsapp/wails/v2.Run(0xc0001d0000, 0xc0000726c0, 0x44d2501)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/wails.go:24 +0x5f fp=0xc00015beb8 sp=0xc00015be88 pc=0x43e265f
main.run(0x44d6378, 0xc)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/app/main.go:33 +0x332 fp=0xc00015bf18 sp=0xc00015beb8 pc=0x43e9372
main.main()
	/Users/matryer/Code/go/src/github.com/matryer/xbar/app/main.go:19 +0x6f fp=0xc00015bf88 sp=0xc00015bf18 pc=0x43e8f6f
runtime.main()
	/usr/local/go/src/runtime/proc.go:225 +0x256 fp=0xc00015bfe0 sp=0xc00015bf88 pc=0x40399d6
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc00015bfe8 sp=0xc00015bfe0 pc=0x406d441

goroutine 6 [select]:
github.com/wailsapp/wails/v2/internal/servicebus.(*ServiceBus).Start.func1(0xc000074660)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/servicebus/servicebus.go:83 +0x157
created by github.com/wailsapp/wails/v2/internal/servicebus.(*ServiceBus).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/servicebus/servicebus.go:77 +0xce

goroutine 7 [select]:
github.com/wailsapp/wails/v2/internal/subsystem.(*Runtime).Start.func1(0xc0001c3730)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/runtime.go:77 +0x17c
created by github.com/wailsapp/wails/v2/internal/subsystem.(*Runtime).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/runtime.go:74 +0x3f

goroutine 8 [select]:
github.com/wailsapp/wails/v2/internal/subsystem.(*Log).Start.func1(0xc000076500)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/log.go:68 +0x157
created by github.com/wailsapp/wails/v2/internal/subsystem.(*Log).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/log.go:64 +0x5c

goroutine 9 [select]:
github.com/wailsapp/wails/v2/internal/messagedispatcher.(*Dispatcher).Start.func1(0xc000113540)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/messagedispatcher/messagedispatcher.go:118 +0x225
created by github.com/wailsapp/wails/v2/internal/messagedispatcher.(*Dispatcher).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/messagedispatcher/messagedispatcher.go:115 +0x9e

goroutine 10 [select]:
github.com/wailsapp/wails/v2/internal/subsystem.(*URL).Start.func1(0xc0000767d0)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/url.go:66 +0x157
created by github.com/wailsapp/wails/v2/internal/subsystem.(*URL).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/url.go:62 +0x5c

goroutine 11 [select]:
github.com/wailsapp/wails/v2/internal/subsystem.(*Event).Start.func1(0xc000076870)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/event.go:89 +0x153
created by github.com/wailsapp/wails/v2/internal/subsystem.(*Event).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/event.go:86 +0x9b

goroutine 12 [select]:
github.com/wailsapp/wails/v2/internal/subsystem.(*Menu).Start.func1(0xc000076910)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/menu.go:72 +0x153
created by github.com/wailsapp/wails/v2/internal/subsystem.(*Menu).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/menu.go:69 +0x9b

goroutine 13 [select]:
github.com/wailsapp/wails/v2/internal/subsystem.(*Call).Start.func1(0xc0000769b0)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/call.go:77 +0x14a
created by github.com/wailsapp/wails/v2/internal/subsystem.(*Call).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/subsystem/call.go:74 +0x5a

goroutine 18 [syscall]:
os/signal.signal_recv(0x0)
	/usr/local/go/src/runtime/sigqueue.go:165 +0x9d
os/signal.loop()
	/usr/local/go/src/os/signal/signal_unix.go:23 +0x25
created by os/signal.Notify.func1.1
	/usr/local/go/src/os/signal/signal.go:151 +0x45

goroutine 15 [select]:
github.com/wailsapp/wails/v2/internal/signal.(*Manager).Start.func1(0xc000072f40)
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/signal/signal.go:59 +0x9e
created by github.com/wailsapp/wails/v2/internal/signal.(*Manager).Start
	/Users/matryer/Code/go/pkg/mod/github.com/wailsapp/wails/[email protected]/internal/signal/signal.go:58 +0xc9

goroutine 16 [select]:
github.com/matryer/xbar/pkg/plugins.(*Plugin).Run.func1(0xc000096064, 0xc00008e120, 0xc000286ea0, 0x457c478, 0xc00028c300)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:197 +0x139
created by github.com/matryer/xbar/pkg/plugins.(*Plugin).Run
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:194 +0x138

goroutine 40 [semacquire]:
sync.runtime_Semacquire(0xc000288044)
	/usr/local/go/src/runtime/sema.go:56 +0x45
sync.(*WaitGroup).Wait(0xc000288044)
	/usr/local/go/src/sync/waitgroup.go:130 +0x65
github.com/matryer/xbar/pkg/plugins.(*Plugin).Run(0xc000286dd0, 0x457c478, 0xc00028c300)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:233 +0x1aa
github.com/matryer/xbar/pkg/plugins.Plugins.Run.func1(0x457c478, 0xc00028c300, 0xc000289380, 0xc000286dd0)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:108 +0x3f
created by github.com/matryer/xbar/pkg/plugins.Plugins.Run
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:107 +0x9f

goroutine 38 [semacquire]:
sync.runtime_Semacquire(0xc000289388)
	/usr/local/go/src/runtime/sema.go:56 +0x45
sync.(*WaitGroup).Wait(0xc000289380)
	/usr/local/go/src/sync/waitgroup.go:130 +0x65
github.com/matryer/xbar/pkg/plugins.Plugins.Run(0xc00029d278, 0x2, 0x3, 0x457c478, 0xc00028c300)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:112 +0xc5
main.(*app).RefreshAll.func1(0xc00012e370, 0x457c478, 0xc00028c300)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/app/app.go:205 +0x55
created by main.(*app).RefreshAll
	/Users/matryer/Code/go/src/github.com/matryer/xbar/app/app.go:202 +0x71f

goroutine 39 [sleep]:
time.Sleep(0x2540be400)
	/usr/local/go/src/runtime/time.go:193 +0xd2
main.(*app).Start.func2(0xc00012e370)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/app/app.go:142 +0x30
created by main.(*app).Start
	/Users/matryer/Code/go/src/github.com/matryer/xbar/app/app.go:140 +0x1ea

goroutine 41 [semacquire]:
sync.runtime_Semacquire(0xc000096064)
	/usr/local/go/src/runtime/sema.go:56 +0x45
sync.(*WaitGroup).Wait(0xc000096064)
	/usr/local/go/src/sync/waitgroup.go:130 +0x65
github.com/matryer/xbar/pkg/plugins.(*Plugin).Run(0xc000286ea0, 0x457c478, 0xc00028c300)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:233 +0x1aa
github.com/matryer/xbar/pkg/plugins.Plugins.Run.func1(0x457c478, 0xc00028c300, 0xc000289380, 0xc000286ea0)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:108 +0x3f
created by github.com/matryer/xbar/pkg/plugins.Plugins.Run
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:107 +0x9f

goroutine 46 [select]:
github.com/matryer/xbar/pkg/plugins.(*Plugin).Run.func1(0xc000288044, 0xc000200180, 0xc000286dd0, 0x457c478, 0xc00028c300)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:197 +0x139
created by github.com/matryer/xbar/pkg/plugins.(*Plugin).Run
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:194 +0x138

goroutine 66 [select]:
github.com/matryer/xbar/pkg/plugins.(*Plugin).Run.func2(0xc000096064, 0xc000286ea0, 0x457c478, 0xc00028c300, 0xc00008e120)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:219 +0x15f
created by github.com/matryer/xbar/pkg/plugins.(*Plugin).Run
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:216 +0x19c

goroutine 47 [select]:
github.com/matryer/xbar/pkg/plugins.(*Plugin).Run.func2(0xc000288044, 0xc000286dd0, 0x457c478, 0xc00028c300, 0xc000200180)
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:219 +0x15f
created by github.com/matryer/xbar/pkg/plugins.(*Plugin).Run
	/Users/matryer/Code/go/src/github.com/matryer/xbar/pkg/plugins/plugin.go:216 +0x19c

@leaanthony
Copy link

What OS version? That's so weird

@Joshfindit
Copy link
Contributor Author

This is 10.13.6

Do note as well:

  • This is not the only plugin that crashes for me (I installed others that crashed), it's just the main one I use
  • I have not dug in fully in to what part is crashing, but I suspect it's the output

@Joshfindit
Copy link
Contributor Author

Confirmed: it's the output.

It crashes inconsistently when the script is simply

#!/bin/bash

# <xbar.title>Crashing plugin</xbar.title>
# <xbar.version>v0.1</xbar.version>
# <xbar.author>Josh</xbar.author>
# <xbar.author.github>joshfindit</xbar.author.github>
# <xbar.desc>Sends nothing to do nothing (except crash)</xbar.desc>
# <xbar.image>http://i.imgur.com/lk3iGat.png?1</xbar.image>
# <xbar.dependencies>echo</xbar.dependencies>

echo "⚡39±5 | color=#1a9850"

(Oddly: Sometimes it will show the colour)

And crashes reliably when the script is

#!/bin/bash

# <xbar.title>Crashing plugin</xbar.title>
# <xbar.version>v0.1</xbar.version>
# <xbar.author>Josh</xbar.author>
# <xbar.author.github>joshfindit</xbar.author.github>
# <xbar.desc>Sends nothing to do nothing (except crash)</xbar.desc>
# <xbar.image>http://i.imgur.com/lk3iGat.png?1</xbar.image>
# <xbar.dependencies>echo</xbar.dependencies>

echo "⚡39±5"
echo "---"
echo "google.com: 35 ms | color=#1a9850"

and I click on the ⚡39±5 in the menubar.

  • font= does work without crashes
  • The characters in ⚡39±5 don't matter. I can put a single number or letter and it's the same result

As one of the few people in the repo using High Sierra, I am perfectly comfortable with xbar simply discarding color information on older versions in order to avoid this crash.

@leaanthony
Copy link

Thanks for the detailed information! I'm going to install High Sierra on my test machine and figure this out!

@leaanthony
Copy link

So my initial tests confirm the crash. After a lot of debugging I can also confirm that it's to do with the way High Sierra deals with NSMutableStrings. There's quite a few reports online of this scenario causing problems. More investigation needed.

@leaanthony
Copy link

What's kinda interesting is that not giving a colour does make all the menus work, but commenting out all the code related to colour doesn't change a thing.

@Joshfindit
Copy link
Contributor Author

Really unfortunate that it sounds like a bug (or "feature") with High Sierra itself.

I'm sad to say that with v2.0.35-beta the problem is still there.

One new thing I accidentally came across: if I us echo "⚡39±5 | color=#1a9850" as the first line, then click on ⚡39±5 and keep the menu up, xbar won't crash until I click away from the menu and it updates the item again.

@beaudett
Copy link

Hi @Joshfindit
Good catch! As a follow up of the crash I was mentioning in matryer/xbar/issues/611, I can confirm that if I remove all color= xbar(v2.0.35-beta) doesn't crash anymore.

@leaanthony
Copy link

@Joshfindit @beaudett I tracked down the issue last night and will be doing a Wails release later on tonight plus a PR for xbar.

@leaanthony
Copy link

Should be in the next release...
Screen Shot 2021-03-30 at 4 38 13 am

@beaudett
Copy link

Hi @leaanthony
I confirm with v2.0.37-beta it does not crash and that the colors are back ! Thanks ! I noticed that with this version (running in MacOS 10.14.6) xbar gets stuck when started. It seems to be due to the system running osascript -e tell application "System Events" to get the name of every login item. If I kill the corresponding process, then xbar shows my plugin.

@leaanthony
Copy link

leaanthony commented Mar 30, 2021

Ah, that's a pain! That's the auto login check. I will look into this - EDIT: I'm not seeing that at all on High Sierra. Please provide more info on which scripts, etc.

@Joshfindit
Copy link
Contributor Author

ping.10s.sh no longer crashes xbar as of v2.0.37-beta.

Awesome work @leaanthony, thank you 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants