robotgo icon indicating copy to clipboard operation
robotgo copied to clipboard

Maximum number of clients reached fatal error: unexpected signal during runtime execution.

Open imtiyazs opened this issue 7 years ago • 8 comments

  • 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```

imtiyazs avatar Sep 24 '18 11:09 imtiyazs

I will test it.

vcaesar avatar Sep 24 '18 17:09 vcaesar

Any overcome

vipulpatel1994 avatar Jun 09 '20 15:06 vipulpatel1994

is it fixed ?

aatishgore avatar Jun 09 '20 16:06 aatishgore

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

imtiyazs avatar Jun 10 '20 06:06 imtiyazs

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?

takuyahara avatar Nov 10 '20 03:11 takuyahara

Would be great to see some solution to this. @vcaesar

okridgway avatar Dec 10 '21 04:12 okridgway

@vcaesar is the above issue is solved?

rajkumarks7 avatar Apr 07 '22 03:04 rajkumarks7

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

gmlewis avatar Sep 19 '22 22:09 gmlewis

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 avatar Apr 11 '23 22:04 mi1qw

@mi1qw Can you give #590 a spin and see if it resolve the issue for you?

jraby avatar Jun 11 '23 00:06 jraby

It's fixed.

vcaesar avatar Jun 11 '23 17:06 vcaesar

@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!

mi1qw avatar Jun 18 '23 00:06 mi1qw