robotgo
robotgo copied to clipboard
GetPid panic
- Robotgo version (or commit ref): a780825c0931
- Go version: 1.21.1
- Gcc version: Apple clang version 15.0.0 (clang-1500.0.40.1)
- Operating system and bit: macos arm64
- Resolution:
- Can you reproduce the bug
- [x] Yes (provide example code)
- [ ] No
- [ ] Not relevant
Steps to reproduce:
- select some file on desktop in macos
- invoke robotgo.GetPid() in the background (in my case, hotkey to trigger)
- panic happen
panic log
SIGBUS: bus error
PC=0x18db6806c m=7 sigcode=1
signal arrived during cgo execution
goroutine 504 [syscall]:
runtime.cgocall(0x1007bd8ac, 0x140000ab908)
/opt/homebrew/opt/go/libexec/src/runtime/cgocall.go:157 +0x44 fp=0x140000ab8d0 sp=0x140000ab890 pc=0x10028d384
github.com/go-vgo/robotgo._Cfunc_get_PID()
_cgo_gotypes.go:540 +0x34 fp=0x140000ab900 sp=0x140000ab8d0 pc=0x100724f44
github.com/go-vgo/robotgo.GetPid()
/Users/qianlifeng/go/pkg/mod/github.com/go-vgo/[email protected]/robotgo.go:1012 +0x20 fp=0x140000ab930 sp=0x140000ab900 pc=0x100725470