robiot / xclicker

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

Crash when setting the hotkey #83

Closed UrsoTriangularo closed 11 months ago

UrsoTriangularo commented 11 months 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 11 months ago

Probably related issue: #68

Shringe commented 11 months ago

Same here

Shringe commented 11 months ago

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

robiot commented 11 months ago

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

robiot commented 11 months 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 11 months ago

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

robiot commented 11 months ago

cool it built, 1.5.0 is released