Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arch Linux: Intermittent crash freeing Gesture unique_ptr #443

Closed
iwismer opened this issue Feb 3, 2021 · 25 comments
Closed

Arch Linux: Intermittent crash freeing Gesture unique_ptr #443

iwismer opened this issue Feb 3, 2021 · 25 comments

Comments

@iwismer
Copy link

iwismer commented Feb 3, 2021

Describe the bug

Touchegg client crashes sometimes on gesture. Not quite sure what exactly causes it.

Expected behaviour

The gesture should run the action

Actual behaviour

Touchegg crashes

Your environment

  • Version of Touchégg: 2.0.6 (Arch version 2.0.6-1)
  • Operating System: Arch Linux
  • Desktop Environment: KDE

Here is the log from a crash. If anything else is needed to figure this out, let me know!
log2.txt

@vvitorveloso
Copy link

Same here, for a quick test when i swipe three fingers to right on the touchscreen it always crash on the second time, if i do it on touchpad works fine ( no matter how many times).

"journalctl -u touchegg -b -f" -> https://pastebin.com/4UFm5rK5
program log -> https://pastebin.com/BjBtJ3jj
dmesg -> [ 2338.174535] touchegg[10515]: segfault at 0 ip 0000556dab5b6c72 sp 00007ffc4cc37440 error 4 cpu 2 in touchegg[556dab5a9000+2e000]
systemd-coredump -> https://pastebin.com/HAy6eFg6

Your environment

Version of Touchégg: 2.0.6 AUR
Operating System: Arch Linux
Desktop Environment: XFCE

@JoseExposito
Copy link
Owner

Hi!

Thanks for the bug report.

@iwismer could you attach your configuration file please?

@vvitorveloso it looks like the same issue, it crashes when it tries to free the memory allocated for the gesture. And you both use Arch 🤔
Does it crash when you perform any gesture? Or just when you swipe right with 3 fingers on the touchscreen? In case it only happens with one gesture, could you attach your config file please?

I guess I'll have to install Arch...

@iwismer
Copy link
Author

iwismer commented Feb 3, 2021

@iwismer
Copy link
Author

iwismer commented Feb 3, 2021

Also, re: when does it crash.
I'm trying to nail down a pattern, but have not been able to figure it out. It doesn't consistently do it the nth time, always over a single application or with a specific gesture.

I'm going to try and keep an eye on what I'm doing when it crashes today to see if I can figure it out.

@vvitorveloso
Copy link

@JoseExposito it happen with others combinations, I just used that one to test it, I use the same to verify if always crash in the same point.
I using the default config - cp /usr/... ~/.config/... , I open two tabs in terminal, one with daemon and other with the client (I try with -daemon and systemctl) , so I can confirm it not receive any input from the touchscreen other than these two patterns since the start.
The crash is always after the second swipe and something like one to three seconds after

@iwismer
Copy link
Author

iwismer commented Feb 3, 2021

Another crash log, with all the gestures since boot, if that helps:
Touchegg
Touchegg client

@vvitorveloso
Copy link

Maybe this will help, i try here now and note that if i swipe with 3 fingers to the right one time on touchpad and one time on touchscreen it will crash too, but if i swipe first with the touchscreen no matter how many times i swipe on the touchpad it wont crash, also when using thouscreen appears a lot more "Gesture update detected" than touchpad.

log -> https://pastebin.com/zsrGpxt7

Also forgot to tell i was using xfce-terminal to test it, but just test with firefox and swipe to left and same thing.

It looks like something to do with the touchscreen.

Bus 001 Device 005: ID 04f3:002a Elan Microelectronics Corp. Touchscreen

Thanks for your time.

@vvitorveloso
Copy link

@iwismer you too are using touchscreen or touchpad when it crash?
Maybe we getting somewhere here. :)

@iwismer
Copy link
Author

iwismer commented Feb 3, 2021

I am using a touchpad only, but there is a touchscreen on my laptop

@vvitorveloso
Copy link

Later I will try open and use just touchpad to see if it crash too

@JoseExposito
Copy link
Owner

JoseExposito commented Feb 3, 2021

Thanks for attaching your configuration file and more logs.

It definitely looks like it is an intermittent bug freeing memory. I don't understand why it crash, I mean, it is just freeing memory, but it does:

GestureController::onGestureUpdate -> unique_ptr<Gesture>::default_delete

I'll need to test it in a similar system to see what's going on. I'm not able to reproduce in Debian based OSs.

@JoseExposito JoseExposito changed the title Touchegg crashes after detecting a gesture. Arch Linux: Intermittent crash freeing Gesture unique_ptr Feb 3, 2021
@JoseExposito JoseExposito added this to the 2.0.7 milestone Feb 3, 2021
@pongo1231
Copy link

pongo1231 commented Feb 3, 2021

The SHOW_DESKTOP action seems to be the culprit. I can always get the client to crash due to a segmentation fault by executing a gesture that runs that action (though it takes a couple of tries occasionally).

My touchegg.conf (slightly modified version of https://github.com/NayamAmarshe/ToucheggKDE)

I'm using KDE if that helps.

@JoseExposito
Copy link
Owner

Hi! Yesterday I installed Manjaro (installing Arch is just too difficult, sorry) and I'm not able to reproduce the bug. My understanding is that both OSs should be similar...

I followed this steps, just to make sure we installed Touchégg in a similar way.

First I installed every dependency and build dependency:

$ sudo pamac install base-devel git cmake gdb clang libinput cairo systemd-libs libx11 libxi libxrandr pugixml gtk3 glib2

And build if from code, as explained here.

I tested the compiled version and it didn't crash, so I tried with AUR:

$ pacma build touchegg

The same, I'm not able to reproduce the crash.
The AUR PKGBUILD was changed shortly after the release to include a missing dependency and adjust a build number, so make sure you are using the very latest version.

How did you installed it? Did you install the dependencies from the official repo? Just to make sure we are using a similar environment.

My system info:

  • Manjaro Linux
  • KDE 5.20.5 (X11)
  • Kernel 5.10.7, 64 bits system

@parkerlreed
Copy link

Manjaro isn't Arch. It shares the same build system but the repo packages are completely their own. They are usually 2 weeks behind on updates. An issue on Arch will not always coorelate to Manjaro and vice versa.

@parkerlreed
Copy link

For what it's worth I tried the config from the repo you posted @pongo1231 (On KDE as well) and I haven't gotten SHOW_DESKTOP to crash yet. Vanilla Arch. Strange indeed.

@JoseExposito
Copy link
Owner

Thanks for testing it @parkerlreed . It might be something hardware specific... Do you guys run a 32 bits OS?

Since the information of the gesture is correct, and it doesn't crash on the first time... Could you test the same disabling animations?
If that doesn't crash, could you set a color and border color instead of using "auto"?

The log is not pointing in that direction, but because I use GTK to figure out the animation color and I added in this release D-Bus (using a glib event loop) there could be a conflict in the way the event loops interact.

@iwismer
Copy link
Author

iwismer commented Feb 4, 2021

I'm using regular 64 bit arch with all my repos up to date. I use Paru as my AUR helper.
The crash happened only 3 times yesterday, despite using lots and lots of gestures. It was always crashing on a 4 finger gesture, which I have set up to change the desktop.

I will give changing the colour and animation a try and see if that stops the crashes.

As a side note, I think it only started crashing in 2.0.6 (and maybe 2.0.5, but I doubt it), but definitely not before that.

@vvitorveloso
Copy link

Just test it with my wife hd on my notebook (Manjaro).
using the default config file, on touchscreen with 4 fingers nothing wrong happens (not sure if there is an action in swipe 4 fingers to right), with 3 crash the same way (right).

Linux ester-inspironn5110 5.10.7-3-MANJARO #1 SMP PREEMPT Fri Jan 15 21:11:34 UTC 2021 x86_64 GNU/Linux

https://pastebin.com/8HbrwNia

Not sure if it is the same problem of others

@vvitorveloso
Copy link

vvitorveloso commented Feb 4, 2021

Tested now with xinit -> openbox & -> xfce4-terminal , crashes same way

daemon in one tab, client and another

the minimal and without effects i can think of

@vvitorveloso
Copy link

Branch event-loop seems to fix it

@JoseExposito
Copy link
Owner

Cool! I commited a quick change on that branch. I need to do some testing and I'll let you know when it is merged so you can use touchegg-git from AUR to get the fix.

For the moment, you can avoid using auto for border and borderColor to bypass the bug.

Thanks a lot for testing it!

@vvitorveloso
Copy link

Thanks for the fix.

For the moment, you can avoid using auto for border and borderColor to bypass the bug.

How do i change it? is a gtk setting?

I upload a PKGBUILD pointing to event-loop branch, so if anyone wanna test can clone it and run makepkg.

git clone https://github.com/vvitorveloso/touchegg-aur-fix
cd touchegg-aur-fix
makepkg -si

@graele
Copy link

graele commented Feb 4, 2021

Hello all!
I can also report a quite consistent crash on PopOs 20.10. It crashes only with 4 fingers swipe on touchpad. Noticed the problem in particular when swiping over the Gnome System Monitor. I have touchegg opened in a terminal and I can see it crashes at the start of detection of the gesture (around 4%). So I guess it is not only a problem with Arch.. I hope this can help.

@vvitorveloso
Copy link

vvitorveloso commented Feb 5, 2021

How do i change it? is a gtk setting?

kkkk i felt stupid, now i see the config file.

Changing the color options fix the issue on v2.0.6 like you said before @JoseExposito

<property name="color">FFFFFF</property> <property name="borderColor">FFFFFF</property>

Thanks for the help and the awesome application

@JoseExposito
Copy link
Owner

I just finished testing the change and it doesn't seem to affect anything else, so it's merged.

You can install touchegg-git from AUR to get the fix, or set a colour like @vvitorveloso explained.

Thank you all for testing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants