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

Three finger touchpad swipe crashes Hyprland #9262

Closed
5 of 6 tasks
logrusx opened this issue Jan 31, 2025 · 34 comments
Closed
5 of 6 tasks

Three finger touchpad swipe crashes Hyprland #9262

logrusx opened this issue Jan 31, 2025 · 34 comments
Labels
bug Something isn't working

Comments

@logrusx
Copy link

logrusx commented Jan 31, 2025

Already reported ? *

  • I have searched the existing open and closed issues.

Regression?

I don't know, I started using Hyprland only recently

System Info and Hyprland Version

System/Version info
Hyprland 0.47.0 built from branch  at commit 3b99e906df8b439d65e740301940e57efc057012  (compositor: don't iterate over unmapped ls-es in vectorToLS).
Date: Tue Feb 4 12:18:08 2025
Tag: v0.47.0-45-g3b99e906, commits: 5787
built against:
 aquamarine 0.7.2
 hyprlang 0.6.0
 hyprutils 0.5.0
 hyprcursor 0.1.11
 hyprgraphics 0.1.1


no flags were set


System Information:
System name: Linux
Node name: joro-lt
Release: 6.13.1-gentoo-default
Version: #1 SMP PREEMPT Mon Feb  3 11:12:57 EET 2025


GPU information: 
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] [10de:2560] (rev a1) (prog-if 00 [VGA controller])
05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1638] (rev c5) (prog-if 00 [VGA controller])
NVRM version: NVIDIA UNIX x86_64 Kernel Module  550.144.03  Mon Dec 30 17:44:08 UTC 2024


os-release: NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/"
SUPPORT_URL="https://www.gentoo.org/support/"
BUG_REPORT_URL="https://bugs.gentoo.org/"
VERSION_ID="2.17"


plugins:

Description

  gestures {                                                                                                                                  
      workspace_swipe = false                                                                                                                 
      workspace_swipe_fingers = 3                                                                                                             
  }                                                                                                                                           

crashes Hyprland when you try to actually swipe.

How to reproduce

Set the above configuration and try to swipe.

Attach not paste

  • I understand that all text files must be attached, and not pasted directly. If not respected, this issue will likely get closed as spam

Checklist of files to include below

  • Hyprland config - hyprctl systeminfo -c (always include)
  • Crash report (always include in case of crash)
  • Video (always include in case of a visual bug)
  • Logs (might contain useful info such as errors)

Additional info & File uploads

gdb.txt

hyprlandCrashReport17272.txt

@logrusx logrusx added the bug Something isn't working label Jan 31, 2025
@0elek
Copy link

0elek commented Jan 31, 2025

how is hyprlandCrashReport42114.txt dated v0.46.2 Date: Thu Dec 19 19:26:47 2024

but the syslog.log is Jan 31 18:49:59 and refers to a month old crashreport lol "report at ... hyprlandCrashReport42114.txt"

I think you should check if this still happens on the newest version of Hyprland.

@logrusx
Copy link
Author

logrusx commented Jan 31, 2025

how is hyprlandCrashReport42114.txt dated v0.46.2 Date: Thu Dec 19 19:26:47 2024

but the syslog.log is Jan 31 18:49:59 and refers to a month old crashreport lol "report at ... hyprlandCrashReport42114.txt"

I'm not sure bu I think this is the release date/time, not the file. On the filesystem they were two files, 3 minutes apart. I was surprised to find another one but since they were a few minutes apart I included them both.

I think you should check if this still happens on the newest version of Hyprland.

Am I wrong that 0.46.2 is the current release? I tried running the main branch but it apparently has more bugs and I don't want to run it for the time being.

EDIT:

Oh, I'm wrong! I'll repackage it and try to compile ti. Thanks for pointing it out.

@logrusx
Copy link
Author

logrusx commented Jan 31, 2025

It happens on 0.47.1 as well. I updated system information and log files.

@fufexan
Copy link
Member

fufexan commented Jan 31, 2025

Can you get a debug stacktrace? I got some on my Nix machine but they don't include complete debugging info from hyprutils and aquamarine.

@0elek
Copy link

0elek commented Jan 31, 2025

isn't this just that

fullBox.scale(pMonitor->scale).round();

should be before
if (fullBox.width < 1 || fullBox.height < 1)
return; // don't draw invisible shadows

so it get all the way to

RASSERT((box.width > 0 && box.height > 0), "Tried to render shadow with width/height < 0!");

if the monitor scale is 0.33 or less and the shadow size is 1 then it rounds 0?

but then again i dont know why would this not happen more often

@fufexan
Copy link
Member

fufexan commented Jan 31, 2025

I've tried moving the scaling before the check, but the crash still occurs.

@logrusx
Copy link
Author

logrusx commented Feb 1, 2025

Can you get a debug stacktrace?

Does that mean I have to recompile with debug symbols? I'm not compilers experts, I don't understand compiler flags et.c.

Also in using Gentoo's portage which takes care of all the compiling.

I need specific instructions how to enable debug symbols for every specific project that needs to be recompiled. At least what flags I have to pass to the compiler/ build system. I'll ask the gentoo experts to then help me put them in the appropriate places so that portage compiles the packages with debug symbols.

Best Regards,
Georgi

@0elek
Copy link

0elek commented Feb 1, 2025

You clone the repo with git clone https://github.com/hyprwm/Hyprland --recursive and follow this
https://wiki.hyprland.org/Crashes-and-Bugs/#obtaining-a-debug-stacktrace

@logrusx
Copy link
Author

logrusx commented Feb 1, 2025

You clone the repo with git clone https://github.com/hyprwm/Hyprland --recursive and follow this https://wiki.hyprland.org/Crashes-and-Bugs/#obtaining-a-debug-stacktrace

I'll try but this is not how things work in Gentoo and I don't want to contaminate my system with manual installations. Also AFAIR it's not Gnu make but meson.

@fufexan
Copy link
Member

fufexan commented Feb 1, 2025

You don't need to install the binary, just run it from the build directory. Also you can use either meson or cmake (with make).

@logrusx
Copy link
Author

logrusx commented Feb 1, 2025

You don't need to install the binary, just run it from the build directory. Also you can use either meson or cmake (with make).

I can't run it from the build directly. It needs to use hyprutils and aquamarine also compiled with debug symbols as per fufexan's request. I'll see what I can do to package them that way so I don't need to tinker with things I don't understand. But that will happen next week.

@logrusx
Copy link
Author

logrusx commented Feb 3, 2025

gdb.txt attached. Please tell me if I've done a good job.

p.s. it's worth mentioning in the instructions the the config file changes from hyrpland.conf to hyprlandd.conf. It took me a while to realize it didn't overwrite my custom config, after I almost got a heart attack :)

@fufexan
Copy link
Member

fufexan commented Feb 4, 2025

I think so, yes. Thanks.

@vaxerski mind looking at this?

@vaxerski
Copy link
Member

vaxerski commented Feb 4, 2025

what fucking rev is that? line numbers dont match git

@vaxerski
Copy link
Member

vaxerski commented Feb 4, 2025

looks like 0.47.2, I don't see how this is possible. The assert complains that box's w / h was < 0, but in the func that is obviously invoked before, we return if w / h is not > 1.

In the stacktace, there is no data about the box. Can you do frame 7 and p box?

@logrusx
Copy link
Author

logrusx commented Feb 4, 2025

I think it was 0.47.1 before I realized there was 0.47.2. Then I went and found other libraries were updated too. For one it was hyprutils which was 0.4.0 at the time I took that trace. Aquamarine was 0.7.1 at that time.

Please understand I have other things to do as well and this has been too much for me already.

EDIT: just tested on 0.47.2 which I'm using right now and broke the same way. It's worth mentioning it crashed sddm as well, which is setup to use Hyprland as the composer.

@logrusx
Copy link
Author

logrusx commented Feb 4, 2025

Can you do frame 7 and p box?

Honestly, I don't know what you're talking about. I guess those are commands you want me to run in the gdb shell. Do I still need the packages compiled with debug symbols and reproduce the issue or I can use the coredump already available? Is it still available if I didn't remove it explicitly?

I'm already on 0.47.2 and if I have to recompile again, I'd rather try to do it on the main branch but that'll take time.

@vaxerski
Copy link
Member

vaxerski commented Feb 4, 2025

yes, debug and these are gdb commands. Git is preferable

@logrusx
Copy link
Author

logrusx commented Feb 4, 2025

Issue updated with relevant system information, gdb.txt and hyprlandCrashReport17272.txt.

@vaxerski
Copy link
Member

vaxerski commented Feb 6, 2025

wtf how did nan get there lmao thats the source

@vaxerski
Copy link
Member

vaxerski commented Feb 6, 2025

patch.txt try this

@logrusx
Copy link
Author

logrusx commented Feb 7, 2025

System/Version info
Hyprland 0.47.0 built from branch  at commit 54441e0c4e51dd182f78876c014446d5d0359ba8 dirty (renderer: fix fade out on silent moves to special).
Date: Thu Feb 6 19:45:28 2025
Tag: v0.47.0-55-g54441e0c, commits: 5797
built against:
 aquamarine 0.7.2
 hyprlang 0.6.0
 hyprutils 0.5.0
 hyprcursor 0.1.11
 hyprgraphics 0.1.1


no flags were set


System Information:
System name: Linux
Node name: joro-lt
Release: 6.13.1-gentoo-default
Version: #1 SMP PREEMPT Mon Feb  3 11:12:57 EET 2025


GPU information: 
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] [10de:2560] (rev a1) (prog-if 00 [VGA controller])
05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1638] (rev c5) (prog-if 00 [VGA controller])
NVRM version: NVIDIA UNIX x86_64 Kernel Module  550.144.03  Mon Dec 30 17:44:08 UTC 2024


os-release: NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/"
SUPPORT_URL="https://www.gentoo.org/support/"
BUG_REPORT_URL="https://bugs.gentoo.org/"
VERSION_ID="2.17"


plugins:

gdb.txt

hyprlandCrashReport40685.txt

@vaxerski
Copy link
Member

vaxerski commented Feb 9, 2025

can you run hyprland with asan, this doesnt look right to me

@logrusx
Copy link
Author

logrusx commented Feb 9, 2025

I could but I don't know what asan is. Could you point me to it give me instructions?

@vaxerski
Copy link
Member

vaxerski commented Feb 9, 2025

cmake -DWITH_ASAN:STRING=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -B build    
cmake --build build -j `nproc`

then

ASAN_OPTIONS="detect_odr_violation=0,log_path=asan.log" HYPRLAND_NO_CRASHREPORTER=1 ./build/Hyprland

if anything goes wrong, hyprland should immediately close and you'll get a file called asan.log.xxxx in your cwd

@logrusx
Copy link
Author

logrusx commented Feb 9, 2025

asan.log.16913.log
asan.log.16473.log

I'm not sure why 2 files, they are two minutes apart, 16913 being the later one.

@vaxerski
Copy link
Member

vaxerski commented Feb 9, 2025

hm, neither is related to this issue tho

did hyprland close when you did the gesture?

@logrusx
Copy link
Author

logrusx commented Feb 9, 2025

did hyprland close when you did the gesture?

Yes. I'll redo the procedure tomorrow morning when I'm fresh, just to be sure I made everything right.

@logrusx
Copy link
Author

logrusx commented Feb 10, 2025

For some reason no asan.log files are generated and I struggle to remember what I did last night to get two of them. I also tried with https://wiki.hyprland.org/Crashes-and-Bugs/#building-the-wayland-stack-with-asan and neither method yielded results. I searched my whole home directory with find and it didn't find any of those files. I remember seeing the logs telling me to set debug:disable_logs to false, I did it both in hyprland and hyprlandd.conf. I'll try again later and see if I can figure out what I did wrong.

But I also think the issue has changed a bit. When I produced the fist stacktraces I remember it was enough to just swipe on an empty desktop and now that has gone, both with and without the patch applied. I need to open a window and try to swipe over it.

@vaxerski
Copy link
Member

vaxerski commented Feb 10, 2025

you dont need to enable hyprland logging for those.

However, as long as hyprland crashes, it should provide a log. Check the cwd, or possibly ~.

Make sure you're launching the correct binary

also keep in mind that without the ASAN_OPTIONS env the log will be printed to stdout instead

@logrusx
Copy link
Author

logrusx commented Feb 10, 2025

I can't make it write a log file for the sake of my life. This is how I did it last night. This is from my .bash_history:

asan.log

I remember being unable to obtain asan.log with the commands you gave me and then I decided to consult the wiki, so I used make asan. And it must have worked. I think I even made it generate asan.log twice.

I'm trying to to the same but it doesn't work.

@vaxerski
Copy link
Member

vaxerski commented Feb 10, 2025

the number at the end should be the pid of hyprland from that session.

If you can't get it to write a log file, you can try redirecting all stdout and stderr to a file, and not setting the log_path in ASAN_OPTIONS.

I might try it myself tomorrow on a laptop if you can't get it.

@logrusx
Copy link
Author

logrusx commented Feb 11, 2025

the number at the end should be the pid of hyprland from that session.

If you can't get it to write a log file, you can try redirecting all stdout and stderr to a file, and not setting the log_path in ASAN_OPTIONS.

I might try it myself tomorrow on a laptop if you can't get it.

Well, I can't because after Hyprland crashes there's nothing interesting on the console. In fact I see that warning about logs being disabled by default that I can catch a glimpse of before Hyprland starts.

The problem here is I don't have enough knowledge to diagnose what I'm doing wrong and I'm shooting in the dark.

@logrusx
Copy link
Author

logrusx commented Feb 18, 2025

After I gave up on this issue, I reverted back to 0.47.2. Today I spontaneously decided to swipe on an empty workspace and nothing happened. Then I swiped on a window and it worked. I recompiled from main with debug symbols what not and it again didn't crash. Then I removed the patch and recompiled again and again nothing happened. Reverted back to 0.47.2 without the patch and it still works.

Gentoo is a rolling distribution and updates happen all the time, but reflecting on the updates, I don't see anything substantial from the hyprland ecosystem I updated. The only suspicious update is libinput. I'm closing this issue and apologize for the time it might have wasted.

The only thing I noticed on the main branch is it doesn't display anything on my integrated display anymore, although the mouse seem to go there but only on the external monitor. But that's another issue. Should I report it or it's already known?

@logrusx logrusx closed this as completed Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants