robotgo
robotgo copied to clipboard
Maximum number of clients reached fatal error: unexpected signal during runtime execution.
- Robotgo version (or commit ref): v0.50.0
- Go version: go1.11 linux/amd64
- Gcc version: gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
- Operating system and bit: Ubuntu 18.04.1 LTS
- Can you reproduce the bug at Examples:
- [ * ] Yes
- Provide example code:
package main
import (
"fmt"
"time"
"github.com/go-vgo/robotgo"
)
func main() {
for {
time.Sleep(time.Second * 1)
fmt.Println(robotgo.GetPID())
}
}
Description
After few seconds the program panics with following error below:
Maximum number of clients reachedfatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x968 pc=0x7f18e04e815b]
runtime stack:
runtime.throw(0x575156, 0x2a)
/usr/local/go/src/runtime/panic.go:608 +0x72
runtime.sigpanic()
/usr/local/go/src/runtime/signal_unix.go:374 +0x2f2
goroutine 1 [syscall]:
runtime.cgocall(0x51aaa0, 0xc0000e9f30, 0x2)
/usr/local/go/src/runtime/cgocall.go:128 +0x5e fp=0xc0000e9f00 sp=0xc0000e9ec8 pc=0x40aefe
github.com/go-vgo/robotgo._Cfunc_get_PID(0x0)
_cgo_gotypes.go:527 +0x49 fp=0xc0000e9f30 sp=0xc0000e9f00 pc=0x5128f9
github.com/go-vgo/robotgo.GetPID(0x3b9aca00)
/home/imtiyaz/Workspace/src/github.com/go-vgo/robotgo/robotgo.go:1456 +0x22 fp=0xc0000e9f48 sp=0xc0000e9f30 pc=0x512932
main.main()
/home/imtiyaz/Workspace/src/MKCLvLearningAssistant/main.go:13 +0x2f fp=0xc0000e9f98 sp=0xc0000e9f48 pc=0x512a3f
runtime.main()
/usr/local/go/src/runtime/proc.go:201 +0x207 fp=0xc0000e9fe0 sp=0xc0000e9f98 pc=0x431997
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc0000e9fe8 sp=0xc0000e9fe0 pc=0x45be41
exit status 2```
I will test it.
Any overcome
is it fixed ?
I guess I wrote a workaround for this in my program 2 years back and I don't remember which program was that. Also I switched to MacOS now and above code works well with Go 1.14 here..
No idea about Ubuntu 18
It works on MacOS 10.15.7 but causes memory leak. I could reproduce by building the mentioned code and ran the builded app, I saw that memory usage rises on Activity Monitor.
Has this issue fixed or planned to be fixed?
Would be great to see some solution to this. @vcaesar
@vcaesar is the above issue is solved?
I just ran into this with the latest version running on Linux Cinnamon Mint 20.3:
Maximum number of clients reached2022/09/19 18:22:47 Found title: "IsValid failed."
2022/09/19 18:22:47 Get Xid from Pid errors is: failed to find a window with a matching pid.
2022/09/19 18:22:47 Found title: ""
2022/09/19 18:22:47 Get Xid from Pid errors is: failed to find a window with a matching pid.
2022/09/19 18:22:47 Found title: ""
2022/09/19 18:22:47 Get Xid from Pid errors is: failed to find a window with a matching pid.
2022/09/19 18:22:47 Found title: ""
2022/09/19 18:22:47 Get Xid from Pid errors is: failed to find a window with a matching pid.
2022/09/19 18:22:47 Found title: ""
2022/09/19 18:22:47 Get Xid from Pid errors is: failed to find a window with a matching pid.
2022/09/19 18:22:47 Found title: ""
2022/09/19 18:22:47 Unable to find Firefox browser with page titled: " — Mozilla Firefox"
exit status 1
Linux Debian 11 kernel 6 go 1.19 github.com/go-vgo/robotgo v0.100.10 github.com/robotn/gohook v0.31.3
Maximum number of clients reachedfatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x968 pc=0x7f1fae1c8f42]
@mi1qw Can you give #590 a spin and see if it resolve the issue for you?
It's fixed.
@mi1qw Can you give #590 a spin and see if it resolve the issue for you?
Thank you, the code is now working without any errors!