~eliasnaur/gio#210: 
Panic when pasting in an editor when the clipboard is empty (macOS)

On macOS. Pasted in an editor widget. Panic. Went to Vim and said "*p to paste whatever was in the paste board, and got a message along the lines of "paste buffer is empty". Can't reproduce or I'd quote it exactly.

Traceback:
SIGILL: illegal instruction
PC=0x7fff2063c01b m=0 sigcode=1
signal arrived during cgo execution
instruction bytes: 0xf 0xb 0x48 0x8d 0x5 0xbe 0x15 0x21 0x0 0x48 0x89 0x5 0x15 0xb8 0x44 0x68

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x415ab80, 0xc000050c38, 0x410b3e5)
	/usr/local/go/src/runtime/cgocall.go:154 +0x5b fp=0xc000050c08 sp=0xc000050bd0 pc=0x4007f9b
gioui.org/app/internal/wm._Cfunc_CFRelease(0x0)
	_cgo_gotypes.go:113 +0x3c fp=0xc000050c38 sp=0xc000050c08 pc=0x410a99c
gioui.org/app/internal/wm.nsstringToString.func1.1()
	/Users/lmc/src/goget/pkg/mod/gioui.org@v0.0.0-20210316171537-eeb045c59f86/app/internal/wm/os_darwin.go:79 +0x2a fp=0xc000050c50 sp=0xc000050c38 pc=0x410e7aa
gioui.org/app/internal/wm.nsstringToString(0x0, 0x0, 0x0)
	/Users/lmc/src/goget/pkg/mod/gioui.org@v0.0.0-20210316171537-eeb045c59f86/app/internal/wm/os_darwin.go:82 +0x87 fp=0xc000050cb0 sp=0xc000050c50 pc=0x410c127
gioui.org/app/internal/wm.(*window).ReadClipboard.func1()
	/Users/lmc/src/goget/pkg/mod/gioui.org@v0.0.0-20210316171537-eeb045c59f86/app/internal/wm/os_macos.go:111 +0x30 fp=0xc000050ce0 sp=0xc000050cb0 pc=0x410ea10
gioui.org/app/internal/wm.gio_dispatchMainFuncs()
	/Users/lmc/src/goget/pkg/mod/gioui.org@v0.0.0-20210316171537-eeb045c59f86/app/internal/wm/os_darwin.go:69 +0x29 fp=0xc000050d10 sp=0xc000050ce0 pc=0x410c049
_cgoexp_014a60c0b354_gio_dispatchMainFuncs(0x7ffeefbfd6c7)
	_cgo_gotypes.go:545 +0x25 fp=0xc000050d20 sp=0xc000050d10 pc=0x410f505
runtime.cgocallbackg1(0x410f4e0, 0x7ffeefbfd6c7, 0x0)
	/usr/local/go/src/runtime/cgocall.go:292 +0x18c fp=0xc000050dc0 sp=0xc000050d20 pc=0x400834c
runtime.cgocallbackg(0x410f4e0, 0x7ffeefbfd6c7, 0x0)
	/usr/local/go/src/runtime/cgocall.go:228 +0xda fp=0xc000050e30 sp=0xc000050dc0 pc=0x400811a
runtime.cgocallback(0x4007fbf, 0x415ae80, 0xc000050ec8)
	/usr/local/go/src/runtime/asm_amd64.s:788 +0xa9 fp=0xc000050e58 sp=0xc000050e30 pc=0x406cce9
runtime.asmcgocall(0x415ae80, 0xc000050ec8)
	/usr/local/go/src/runtime/asm_amd64.s:652 +0x42 fp=0xc000050e60 sp=0xc000050e58 pc=0x406cbc2
runtime.cgocall(0x415ae80, 0xc000050ec8, 0xc000000180)
	/usr/local/go/src/runtime/cgocall.go:164 +0x7f fp=0xc000050e98 sp=0xc000050e60 pc=0x4007fbf
gioui.org/app/internal/wm._Cfunc_gio_main()
	_cgo_gotypes.go:300 +0x3c fp=0xc000050ec8 sp=0xc000050e98 pc=0x410b19c
gioui.org/app/internal/wm.Main(...)
	/Users/lmc/src/goget/pkg/mod/gioui.org@v0.0.0-20210316171537-eeb045c59f86/app/internal/wm/os_macos.go:387
gioui.org/app.Main(...)
	/Users/lmc/src/goget/pkg/mod/gioui.org@v0.0.0-20210316171537-eeb045c59f86/app/app.go:47
main.main()
	/Users/lmc/src/goget/src/github.com/theclapp/gio-example/askpass/askpass.go:87 +0x21c fp=0xc000050f88 sp=0xc000050ec8 pc=0x4158d1c
runtime.main()
	/usr/local/go/src/runtime/proc.go:225 +0x256 fp=0xc000050fe0 sp=0xc000050f88 pc=0x403b7d6
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc000050fe8 sp=0xc000050fe0 pc=0x406cf61

goroutine 19 [chan receive]:
main.(*Askpass).loop(0xc00012e000, 0x2, 0x2)
	/Users/lmc/src/goget/src/github.com/theclapp/gio-example/askpass/askpass.go:111 +0x85
main.main.func1(0xc00012e000)
	/Users/lmc/src/goget/src/github.com/theclapp/gio-example/askpass/askpass.go:82 +0x24f
created by main.main
	/Users/lmc/src/goget/src/github.com/theclapp/gio-example/askpass/askpass.go:71 +0x216

goroutine 34 [select]:
gioui.org/app.(*Window).run(0xc000196000, 0xc0000fc1c0)
	/Users/lmc/src/goget/pkg/mod/gioui.org@v0.0.0-20210316171537-eeb045c59f86/app/window.go:360 +0x1a5
created by gioui.org/app.NewWindow
	/Users/lmc/src/goget/pkg/mod/gioui.org@v0.0.0-20210316171537-eeb045c59f86/app/window.go:108 +0x265

goroutine 36 [select]:
gioui.org/app/internal/wm.(*displayLink).run(0xc0000bc090, 0x484fe00)
	/Users/lmc/src/goget/pkg/mod/gioui.org@v0.0.0-20210316171537-eeb045c59f86/app/internal/wm/os_darwin.go:113 +0x1c5
created by gioui.org/app/internal/wm.NewDisplayLink
	/Users/lmc/src/goget/pkg/mod/gioui.org@v0.0.0-20210316171537-eeb045c59f86/app/internal/wm/os_darwin.go:101 +0x159

goroutine 5 [select, locked to thread]:
gioui.org/app.(*renderLoop).renderLoop.func1(0xc00006e240, 0x4215b90, 0xc00000e078, 0xc000022360)
	/Users/lmc/src/goget/pkg/mod/gioui.org@v0.0.0-20210316171537-eeb045c59f86/app/loop.go:79 +0x1f3
created by gioui.org/app.(*renderLoop).renderLoop
	/Users/lmc/src/goget/pkg/mod/gioui.org@v0.0.0-20210316171537-eeb045c59f86/app/loop.go:61 +0x7f

rax    0x7fff2084d5bd
rbx    0xc000050c38
rcx    0xc000050c38
rdx    0xc000050bc8
rdi    0x0
rsi    0x44d5f60
rbp    0x7ffeefbfd5e0
rsp    0x7ffeefbfd5d8
r8     0xc000000180
r9     0x0
r10    0x7ffeefbff148
r11    0x7fff204956b5
r12    0x1
r13    0x1
r14    0x18
r15    0xffffffffffffffff
rip    0x7fff2063c01b
rflags 0x10246
cs     0x2b
fs     0x0
gs     0x0
exit status 2
Status
RESOLVED FIXED
Submitter
~theclapp
Assigned to
No-one
Submitted
a month ago
Updated
a month ago
Labels
No labels applied.

~eliasnaur REPORTED FIXED a month ago

~theclapp a month ago

Thanks! 🎉

Register here or Log in to comment, or comment via email.