robiot / xclicker

XClicker - Fast gui autoclicker for x11 linux desktops
https://xclicker.xyz
GNU General Public License v3.0
480 stars 42 forks source link

Crash when setting the hotkey #83

Closed UrsoTriangularo closed 1 year ago

UrsoTriangularo commented 1 year ago

When i opened my xclicker today, it crashed whenever i tried to set the hotkeys, after some debugging i noticed it was happening because g_idle_add expects a function that returns a boolean, and removes the function from the event list if it returns false, instead, it was receiving a void function, which would cause it to run indefinitely, causing a segmentation fault.

It can be fixed by replacing g_idle_add with g_idle_add_once.

Im not sure why it suddenly started happening, maybe a GLib update changed the behavior of g_idle_add?

UrsoTriangularo commented 1 year ago

Probably related issue: #68

Shringe commented 1 year ago

Same here

Shringe commented 1 year ago

Do you know where I could change 'g_idle_add' with 'g_idle_add_once'?

robiot commented 1 year ago

Yeah, I think I was able to repro it. I will see if I can fix it.

robiot commented 1 year ago

Ok seems like it isnt building in cicd anymore, supposedly because that is some kind of new glib function??. Maybe I just should use g_idle_add and return false.

robiot commented 1 year ago

Ok I made a fix, im waitig for it to build,,, pls work

robiot commented 1 year ago

cool it built, 1.5.0 is released