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

Sigh unsafe stuff take 3 #3713

Merged
merged 9 commits into from
Nov 1, 2023
Merged

Sigh unsafe stuff take 3 #3713

merged 9 commits into from
Nov 1, 2023

Conversation

vaxerski
Copy link
Member

@vaxerski vaxerski commented Oct 31, 2023

Stuff

re: #3637

@rszyma
Copy link
Contributor

rszyma commented Oct 31, 2023

no worky for me. Nothing changed compared to before.

@phonetic112
Copy link
Contributor

phonetic112 commented Oct 31, 2023

Now it crashes for me. I just had lxappearance, xeyes, waybar, and vscode open.

--------------------------------------------
   Hyprland Crash Report
--------------------------------------------
Sorry, didn't mean to...

Hyprland received signal 11 (Segmentation fault)

Version: a59792f7408535bea7b7127eb2fc9e7344bde88e
Tag: v0.31.0-63-ga59792f7

System info:
	System name: Linux
	Node name: artix
	Release: 6.5.7-artix1-1
	Version: #1 SMP PREEMPT_DYNAMIC Sun, 15 Oct 2023 22:13:26 +0000

GPU:
	07:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU104 [GeForce RTX 2060] [10de:1e89] (rev a1) (prog-if 00 [VGA controller])


os-release:
	NAME="Artix Linux"
	PRETTY_NAME="Artix Linux"
	ID=artix
	BUILD_ID=rolling
	ANSI_COLOR="0;36"
	HOME_URL="https://www.artixlinux.org/"
	DOCUMENTATION_URL="https://wiki.artixlinux.org/"
	SUPPORT_URL="https://forum.artixlinux.org/"
	BUG_REPORT_URL="https://bugs.artixlinux.org/"
	PRIVACY_POLICY_URL="https://terms.artixlinux.org/docs/privacy-policy/"
	LOGO=artixlinux-logo
	


Backtrace:
	#0 | ./build/Hyprland(_Z12getBacktracev+0x49) [0x558272f8f94f]
		??
		??:0
	#1 | ./build/Hyprland(_ZN13CrashReporter18createAndSaveCrashEi+0x66d) [0x558272f330b1]
		??
		??:0
	#2 | ./build/Hyprland(_Z25handleUnrecoverableSignali+0x69) [0x558272e2814a]
		??
		??:0
	#3 | /usr/lib/libc.so.6(+0x3e710) [0x7f418194a710]
		??
		??:0
	#4 | /usr/lib/libwayland-server.so.0(wl_event_loop_dispatch+0xa0) [0x7f41824e1ae0]
		??
		??:0
	#5 | /usr/lib/libwayland-server.so.0(wl_display_run+0x27) [0x7f41824e22d7]
		??
		??:0
	#6 | ./build/Hyprland(_ZN11CCompositor15startCompositorEv+0x56e) [0x558272e2d366]
		??
		??:0
	#7 | ./build/Hyprland(main+0x8a5) [0x558272fdc47d]
		??
		??:0
	#8 | /usr/lib/libc.so.6(+0x27cd0) [0x7f4181933cd0]
		??
		??:0
	#9 | /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f4181933d8a]
		??
		??:0
	#10 | ./build/Hyprland(_start+0x25) [0x558272e27f95]
		??
		??:0


Log tail:
[LOG] Removed monitor DP-1!
[WARN] Unplugged last monitor, entering an unsafe state. Good luck my friend.
[LOG] Entering unsafe state
[LOG] Registered signal for owner 558273acd580: 558273aafd80 -> 558273acd880 (owner: )
[LOG] Registered signal for owner 558273acd580: 558273aafe10 -> 558273acd8e8 (owner: )
[LOG] Registered signal for owner 558273acd580: 558273aafe00 -> 558273acd950 (owner: )
[LOG] Registered signal for owner 558273acd580: 558273aafd90 -> 558273acd9b8 (owner: )
[LOG] Registered signal for owner 558273acd580: 558273aafda0 -> 558273acda20 (owner: )
[LOG] Registered signal for owner 558273acd580: 558273aafdc0 -> 558273acda88 (owner: )
[LOG] Registered signal for owner 558273acd580: 558273aafde0 -> 558273acdaf0 (owner: )
[WARN] No rule found for HEADLESS-1, trying to use the first.
[WARN] No rules configured. Using the default hardcoded one.
[LOG] Applying monitor rule for HEADLESS-1
[ERR] Monitor HEADLESS-1 has NO PREFERRED MODE
[LOG] output HEADLESS-1 succeeded basic test on format DRM_FORMAT_XRGB8888
[LOG] Monitor HEADLESS-1 -> destroyed all render data
[LOG] arrangeMonitors: 2 to arrange
[LOG] arrangeMonitors: DP-1 explicit [0.00, 0.00]
[LOG] arrangeMonitors: HEADLESS-1 auto [1920, 0.00]
[LOG] arrangeMonitors: DP-1 xwayland [0, 0.00]
[LOG] arrangeMonitors: HEADLESS-1 xwayland [1920, 0.00]
[LOG] Monitor HEADLESS-1 layers arranged: reserved: [0.00000, 0.00000] [0.00000, 0.00000]
[LOG] Monitor HEADLESS-1 data dump: res 1920x1080@60.00Hz, scale 1.00, transform 0, pos 1920x0, 10b 0
[LOG] Added new monitor with name HEADLESS-1 at [1920, 0] with size [1920, 1080], pointer 558273aafc30
[LOG] New monitor: WORKSPACEID 3, exists: 0
[LOG] Monitor HEADLESS-1 layers arranged: reserved: [0.00000, 0.00000] [0.00000, 0.00000]
[wlr] [backend/drm/legacy.c:98] connector DP-1: Failed to set DPMS property: Invalid argument
[LOG] Removing monitor DP-1 from realMonitors
[LOG] Callback 558273a7d380 -> 558273a7d378,  removed.
[LOG] Callback 558273a7d3e8 -> 558273a7d3e0,  removed.
[wlr] [backend/drm/legacy.c:98] connector DP-1: Failed to set DPMS property: Invalid argument
[wlr] [backend/drm/drm.c:1155] connector DP-1: Failed to disable CRTC 81
[WARN] Attempted to render frame on inactive session!
[WARN] No rule found for HEADLESS-1, trying to use the first.
[WARN] No rules configured. Using the default hardcoded one.
[LOG] [Window 558274c875c0: title: "xeyes", class: XEyes] unmapped
[LOG] [hookSystem] New hook event registered: closeWindow
[LOG] Unregistered late callbacks XWL
[LOG] Callback 558274c87858 -> 558274c87850, XWayland Window Late removed.
[LOG] Callback 558274c87ac8 -> 558274c87ac0, XWayland Window Late removed.
[LOG] Callback 558274c87788 -> 558274c87780, XWayland Window Late removed.
[LOG] Callback 558274c879f8 -> 558274c879f0, Xwayland Window Late removed.
[LOG] Callback 558274c87990 -> 558274c87988, Xwayland Window Late removed.
[LOG] Unmapped was not focused, ignoring a refocus.
[LOG] Destroying the SubSurface tree of unmapped window [Window 558274c875c0: title: "xeyes"]
[LOG] Callback 558273a01fd8 -> 558273a01fd0, SurfaceTreeNode removed.
[LOG] Callback 558273a02040 -> 558273a02038, SurfaceTreeNode removed.
[LOG] Callback 558273a01f70 -> 558273a01f68, SurfaceTreeNode removed.
[LOG] SurfaceTree Node removed
[LOG] Callback 558274c87c00 -> 558274c87bf8, Toplevel removed.
[LOG] Callback 558274c87b98 -> 558274c87b90, Toplevel removed.
[LOG] Callback 558274c87c68 -> 558274c87c60, Toplevel removed.
[LOG] Callback 558274c87e20 -> 558274c87e18, CWLSurface removed.
[LOG] CWLSurface 558274c87de0 called destroy()
[LOG] Callback 558274c876b8 -> 558274c876b0, CWindow removed.
[LOG] Callback 558274c87650 -> 558274c87648, XWayland Window removed.
[LOG] [Window 558274cb67c0: title: "Customize Look and Feel", class: Lxappearance] unmapped
[LOG] Unregistered late callbacks XWL
[LOG] Callback 558274cb6a58 -> 558274cb6a50, XWayland Window Late removed.
[LOG] Callback 558274cb6cc8 -> 558274cb6cc0, XWayland Window Late removed.
[LOG] Callback 558274cb6988 -> 558274cb6980, XWayland Window Late removed.
[LOG] Callback 558274cb6bf8 -> 558274cb6bf0, Xwayland Window Late removed.
[LOG] Callback 558274cb6b90 -> 558274cb6b88, Xwayland Window Late removed.
[ERR] Orphaned Node [Node 558274c30c00: workspace: 1, pos: [0.00, 0.00], size: [960.00, 1080.00], window: 558274ca41e0]!!
[ERR] Orphaned Node [Node 558273c1d620: workspace: 1, pos: [960.00, 0.00], size: [960.00, 540.00], window: 558274ce9ea0]!!
[ERR] Orphaned Node [Node 5582737a4a90: workspace: 1, pos: [960.00, 540.00], size: [960.00, 540.00], window: 558273bd0600]!!
[LOG] Unmapped was not focused, ignoring a refocus.
[LOG] Destroying the SubSurface tree of unmapped window [Window 558274cb67c0: title: "Customize Look and Feel"]
[LOG] Callback 558274c9bac8 -> 558274c9bac0, SurfaceTreeNode removed.
[LOG] Callback 558274c9bb30 -> 558274c9bb28, SurfaceTreeNode removed.
[LOG] Callback 558274c9ba60 -> 558274c9ba58, SurfaceTreeNode removed.
[LOG] SurfaceTree Node removed
[LOG] Callback 558274cb6e00 -> 558274cb6df8, Toplevel removed.
[LOG] Callback 558274cb6d98 -> 558274cb6d90, Toplevel removed.
[LOG] Callback 558274cb6e68 -> 558274cb6e60, Toplevel removed.
[LOG] Callback 558274cb7020 -> 558274cb7018, CWLSurface removed.
[LOG] CWLSurface 558274cb6fe0 called destroy()
[LOG] Callback 558274cb68b8 -> 558274cb68b0, CWindow removed.
[LOG] Callback 558274cb6850 -> 558274cb6848, XWayland Window removed.
[LOG] Registered signal for owner 5582737b3c48: 558273951400 -> 5582737b3c60 (owner: CWLSurface)
[LOG] CWLSurface 5582737b3c48 called init()
[LOG] Callback 5582737b3c88 -> 5582737b3c80, CWLSurface removed.
[LOG] CWLSurface 5582737b3c48 called destroy()
[LOG] Registered signal for owner 5582737b3c48: 558273951400 -> 5582737b3c60 (owner: CWLSurface)
[LOG] CWLSurface 5582737b3c48 called init()
[LOG] [Window 558274cdde80: title: "vinegar.go - Code - OSS", class: code-oss] unmapped
[LOG] Unregistered late callbacks XDG
[LOG] Callback 558274cddea8 -> 558274cddea0, XDG Window Late removed.
[LOG] Callback 558274cde048 -> 558274cde040, XDG Window Late removed.
[LOG] Callback 558274cde180 -> 558274cde178, XDG Window Late removed.
[LOG] Callback 558274cde2b8 -> 558274cde2b0, XDG Window Late removed.
[LOG] Callback 558274cde250 -> 558274cde248, XDG Window Late removed.
[LOG] Callback 558274cde1e8 -> 558274cde1e0, XDG Window Late removed.
[LOG] Callback 558274cde320 -> 558274cde318, XDG Window Late removed.
[LOG] Callback 558274cde118 -> 558274cde110, XDG Window Late removed.
[LOG] Removing last node (dwindle)
[LOG] Unmapped was not focused, ignoring a refocus.
[LOG] Destroying the SubSurface tree of unmapped window [Window 558274cdde80: title: "vinegar.go - Code - OSS"]
[LOG] Callback 558274cca588 -> 558274cca580, SurfaceTreeNode removed.
[LOG] Callback 558274cca5f0 -> 558274cca5e8, SurfaceTreeNode removed.
[LOG] Callback 558274cca520 -> 558274cca518, SurfaceTreeNode removed.
[LOG] SurfaceTree Node removed
[LOG] Callback 558274cde4c0 -> 558274cde4b8, Toplevel removed.
[LOG] Callback 558274cde458 -> 558274cde450, Toplevel removed.
[LOG] Callback 558274cde528 -> 558274cde520, Toplevel removed.
[LOG] Callback 558274cde6e0 -> 558274cde6d8, CWLSurface removed.
[LOG] CWLSurface 558274cde6a0 called destroy()
[LOG] Callback 558274cddf78 -> 558274cddf70, CWindow removed.
[LOG] [Window 558274cdde80: title: "vinegar.go - Code - OSS", class: ] destroyed, queueing.
[LOG] Callback 558274cddf10 -> 558274cddf08, XDG Window removed.
[LOG] Callback 558274cddfe0 -> 558274cddfd8, XDG Window removed.
[ERR] onWindowRemovedTiling node null?
[WARN] Attempted to render frame on inactive session!
[LOG] Callback 5582737b3c88 -> 5582737b3c80, CWLSurface removed.
[LOG] CWLSurface 5582737b3c48 called destroy()
[LOG] Registered signal for owner 5582737b3c48: 558273951400 -> 5582737b3c60 (owner: CWLSurface)
[LOG] CWLSurface 5582737b3c48 called init()
[WARN] Attempted to render frame on inactive session!
[LOG] [Window 558274cb9e80: title: "", class: ] destroyed, queueing.
[LOG] XWayland class raw: null
[LOG] Callback 558274cb9fe0 -> 558274cb9fd8, XWayland Window removed.
[LOG] Callback 558274cba3f0 -> 558274cba3e8, XWayland Window removed.
[LOG] Callback 558274cba590 -> 558274cba588, XWayland Window removed.
[LOG] Callback 558274cba5f8 -> 558274cba5f0, XWayland Window removed.
[LOG] Callback 558274cba660 -> 558274cba658, XWayland Window removed.
[ERR] onWindowRemovedTiling node null?
[LOG] Unmapped [Window 558274cb9e80: title: ""] removed instantly
[LOG] [Window 558274cb8500: title: "", class: ] destroyed, queueing.
[LOG] XWayland class raw: null
[LOG] Callback 558274cb8660 -> 558274cb8658, XWayland Window removed.
[LOG] Callback 558274cb8a70 -> 558274cb8a68, XWayland Window removed.
[LOG] Callback 558274cb8c10 -> 558274cb8c08, XWayland Window removed.
[LOG] Callback 558274cb8c78 -> 558274cb8c70, XWayland Window removed.
[LOG] Callback 558274cb8ce0 -> 558274cb8cd8, XWayland Window removed.
[ERR] onWindowRemovedTiling node null?
[LOG] Unmapped [Window 558274cb8500: title: ""] removed instantly
[LOG] [Window 558274cb67c0: title: "Customize Look and Feel", class: ] destroyed, queueing.
[LOG] XWayland class raw: Lxappearance
[LOG] Callback 558274cb6920 -> 558274cb6918, XWayland Window removed.
[LOG] Callback 558274cb6d30 -> 558274cb6d28, XWayland Window removed.
[LOG] Callback 558274cb6ed0 -> 558274cb6ec8, XWayland Window removed.
[LOG] Callback 558274cb6f38 -> 558274cb6f30, XWayland Window removed.
[LOG] Callback 558274cb6fa0 -> 558274cb6f98, XWayland Window removed.
[ERR] onWindowRemovedTiling node null?
[LOG] [Window 558274cac560: title: "", class: ] destroyed, queueing.
[LOG] XWayland class raw: null
[LOG] Callback 558274cac6c0 -> 558274cac6b8, XWayland Window removed.
[LOG] Callback 558274cacad0 -> 558274cacac8, XWayland Window removed.
[LOG] Callback 558274cacc70 -> 558274cacc68, XWayland Window removed.
[LOG] Callback 558274caccd8 -> 558274caccd0, XWayland Window removed.
[LOG] Callback 558274cacd40 -> 558274cacd38, XWayland Window removed.
[ERR] onWindowRemovedTiling node null?
[LOG] Unmapped [Window 558274cac560: title: ""] removed instantly
[LOG] [Window 558274c875c0: title: "xeyes", class: ] destroyed, queueing.
[LOG] XWayland class raw: XEyes
[LOG] Callback 558274c87720 -> 558274c87718, XWayland Window removed.
[LOG] Callback 558274c87b30 -> 558274c87b28, XWayland Window removed.
[LOG] Callback 558274c87cd0 -> 558274c87cc8, XWayland Window removed.
[LOG] Callback 558274c87d38 -> 558274c87d30, XWayland Window removed.
[LOG] Callback 558274c87da0 -> 558274c87d98, XWayland Window removed.
[LOG] Searching for matching rules for kitty (title: ~/a/Hyprland)
[LOG] Window 558273bd0600 set title to ~/a/Hyprland

@vaxerski
Copy link
Member Author

can you do https://wiki.hyprland.org/Crashes-and-Bugs/#building-the-wayland-stack-with-asan ?

I know it's tedious but this seems like a memory issue

@phonetic112
Copy link
Contributor

phonetic112 commented Oct 31, 2023

can you do https://wiki.hyprland.org/Crashes-and-Bugs/#building-the-wayland-stack-with-asan ?

I know it's tedious but this seems like a memory issue

Can't build hyprland:

...
/usr/bin/ld: hyprctl/CMakeFiles/hyprctl.dir/main.cpp.o: in function `__gnu_cxx::__normal_iterator<char*, std::span<char, 18446744073709551615ul> >::operator++(int)':
/usr/include/c++/13.2.1/bits/stl_iterator.h:1117:(.text._ZN9__gnu_cxx17__normal_iteratorIPcSt4spanIcLm18446744073709551615EEEppEi[_ZN9__gnu_cxx17__normal_iteratorIPcSt4spanIcLm18446744073709551615EEEppEi]+0x31): undefined reference to `__asan_option_detect_stack_use_after_return'
/usr/bin/ld: /usr/include/c++/13.2.1/bits/stl_iterator.h:1117:(.text._ZN9__gnu_cxx17__normal_iteratorIPcSt4spanIcLm18446744073709551615EEEppEi[_ZN9__gnu_cxx17__normal_iteratorIPcSt4spanIcLm18446744073709551615EEEppEi]+0x3e): undefined reference to `__asan_stack_malloc_1'
/usr/bin/ld: /usr/include/c++/13.2.1/bits/stl_iterator.h:1118:(.text._ZN9__gnu_cxx17__normal_iteratorIPcSt4spanIcLm18446744073709551615EEEppEi[_ZN9__gnu_cxx17__normal_iteratorIPcSt4spanIcLm18446744073709551615EEEppEi]+0xcb): undefined reference to `__asan_report_load8'
/usr/bin/ld: /usr/include/c++/13.2.1/bits/stl_iterator.h:1118:(.text._ZN9__gnu_cxx17__normal_iteratorIPcSt4spanIcLm18446744073709551615EEEppEi[_ZN9__gnu_cxx17__normal_iteratorIPcSt4spanIcLm18446744073709551615EEEppEi]+0x104): undefined reference to `__asan_report_store8'
/usr/bin/ld: /usr/include/c++/13.2.1/bits/stl_iterator.h:1118:(.text._ZN9__gnu_cxx17__normal_iteratorIPcSt4spanIcLm18446744073709551615EEEppEi[_ZN9__gnu_cxx17__normal_iteratorIPcSt4spanIcLm18446744073709551615EEEppEi]+0x13c): undefined reference to `__asan_report_load8'
/usr/bin/ld: hyprctl/CMakeFiles/hyprctl.dir/main.cpp.o: in function `__gnu_cxx::__normal_iterator<char*, std::span<char, 18446744073709551615ul> >::operator*() const':
/usr/include/c++/13.2.1/bits/stl_iterator.h:1100:(.text._ZNK9__gnu_cxx17__normal_iteratorIPcSt4spanIcLm18446744073709551615EEEdeEv[_ZNK9__gnu_cxx17__normal_iteratorIPcSt4spanIcLm18446744073709551615EEEdeEv]+0x2f): undefined reference to `__asan_report_load8'
collect2: error: ld returned 1 exit status
[21/91] Building CXX object CMakeFiles/Hyprland.dir/cmake_pch.hxx.gch
ninja: build stopped: subcommand failed.

@vaxerski
Copy link
Member Author

oops. Sec.

@vaxerski
Copy link
Member Author

should be fixed.

@phonetic112
Copy link
Contributor

phonetic112 commented Oct 31, 2023

It doesnt let me start xwayland programs, so I can't cause a crash, but here's the log for waybar on reconnect:

terminate called after throwing an instance of 'std::runtime_error'
  what():  * Line 5, Column 18
  Syntax error: value, object or array expected.

I get address boundary error when starting xeyes or any other xwayland thing

@vaxerski
Copy link
Member Author

vaxerski commented Oct 31, 2023

what if you manually start xwayland from a terminal with the ASAN env?

Also maybe you forgot the env = ASAN_OPTIONS,?

@phonetic112
Copy link
Contributor

phonetic112 commented Oct 31, 2023

I started xwayland and got a crash immediately

I did put the ASAN_OPTIONS in my config

@vaxerski
Copy link
Member Author

vaxerski commented Oct 31, 2023

good, means it's working. Post an asan log just like in the directions :)

@phonetic112
Copy link
Contributor

Log

=================================================================
==31662==ERROR: AddressSanitizer: heap-use-after-free on address 0x622000012c98 at pc 0x55bac42c714d bp 0x7ffeffb4ad30 sp 0x7ffeffb4ad20
READ of size 8 at 0x622000012c98 thread T0
    #0 0x55bac42c714c in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const /usr/include/c++/13.2.1/bits/basic_string.h:223
    #1 0x55bac4341587 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::data() /usr/include/c++/13.2.1/bits/basic_string.h:2609
    #2 0x55bac432d72a in std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::basic_format_arg<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) /usr/include/c++/13.2.1/format:3030
    #3 0x55bac43548e4 in std::__format::_Arg_value<std::basic_format_context<std::__format::_Sink_iter<char>, char> > std::__format::_Arg_store<std::basic_format_context<std::__format::_Sink_iter<char>, char>, unsigned long long, std::basic_string_view<char, std::char_traits<char> > >::_S_make_elt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) /usr/include/c++/13.2.1/format:3271
    #4 0x55bac43336b8 in std::__format::_Arg_store<std::basic_format_context<std::__format::_Sink_iter<char>, char>, unsigned long long, std::basic_string_view<char, std::char_traits<char> > >::_Arg_store<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) /usr/include/c++/13.2.1/format:3282
    #5 0x55bac43336b8 in auto std::make_format_args<std::basic_format_context<std::__format::_Sink_iter<char>, char>, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(unsigned long&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) /usr/include/c++/13.2.1/format:3331
    #6 0x55bac43336b8 in std::__format::_Sink_iter<char> std::format_to<std::__format::_Sink_iter<char>, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::__format::_Sink_iter<char>, std::basic_format_string<char, std::type_identity<unsigned long>::type, std::type_identity<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>::type>, unsigned long&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) /usr/include/c++/13.2.1/format:3778
    #7 0x55bac431fdee in auto std::formatter<CWindow*, char>::format<std::basic_format_context<std::__format::_Sink_iter<char>, char> >(CWindow* const&, std::basic_format_context<std::__format::_Sink_iter<char>, char>&) const /home/lucas/applications/Hyprland/Hyprland/src/Window.hpp:421
    #8 0x55bac4354b40 in void std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle::_S_format<CWindow* const>(std::basic_format_parse_context<char>&, std::basic_format_context<std::__format::_Sink_iter<char>, char>&, void const*) /usr/include/c++/13.2.1/format:2804
    #9 0x55bac43e1189 in std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle::format(std::basic_format_parse_context<char>&, std::basic_format_context<std::__format::_Sink_iter<char>, char>&) const /usr/include/c++/13.2.1/format:2833
    #10 0x55bac43e1189 in auto std::__format::_Formatting_scanner<std::__format::_Sink_iter<char>, char>::_M_format_arg(unsigned long)::{lambda(auto:1&)#1}::operator()<std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle>(std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle&) const /usr/include/c++/13.2.1/format:3576
    #11 0x55bac43e1b71 in decltype(auto) std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::_M_visit<std::__format::_Formatting_scanner<std::__format::_Sink_iter<char>, char>::_M_format_arg(unsigned long)::{lambda(auto:1&)#1}>(std::__format::_Formatting_scanner<std::__format::_Sink_iter<char>, char>::_M_format_arg(unsigned long)::{lambda(auto:1&)#1}&&, std::__format::_Arg_t) /usr/include/c++/13.2.1/format:3088
    #12 0x55bac43e1ce9 in decltype(auto) std::visit_format_arg<std::__format::_Formatting_scanner<std::__format::_Sink_iter<char>, char>::_M_format_arg(unsigned long)::{lambda(auto:1&)#1}, std::basic_format_context<std::__format::_Sink_iter<char>, char> >(std::__format::_Formatting_scanner<std::__format::_Sink_iter<char>, char>::_M_format_arg(unsigned long)::{lambda(auto:1&)#1}&&, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >) /usr/include/c++/13.2.1/format:3111
    #13 0x55bac43e1f10 in std::__format::_Formatting_scanner<std::__format::_Sink_iter<char>, char>::_M_format_arg(unsigned long) /usr/include/c++/13.2.1/format:3570
    #14 0x55bac42cf7d0 in std::__format::_Scanner<char>::_M_on_replacement_field() /usr/include/c++/13.2.1/format:3535
    #15 0x55bac42cabc7 in std::__format::_Scanner<char>::_M_scan() (/home/lucas/applications/Hyprland/Hyprland/build/Hyprland+0x44bbc7) (BuildId: ee06ea6ecebe714ec16f2433d932557fdcf92893)
    #16 0x55bac42fe122 in std::__format::_Sink_iter<char> std::__format::__do_vformat_to<std::__format::_Sink_iter<char>, char, std::basic_format_context<std::__format::_Sink_iter<char>, char> >(std::__format::_Sink_iter<char>, std::basic_string_view<char, std::char_traits<char> >, std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<char>, char> > const&, std::locale const*) /usr/include/c++/13.2.1/format:3652
    #17 0x55bac42c3575 in std::__format::_Sink_iter<char> std::vformat_to<std::__format::_Sink_iter<char> >(std::__format::_Sink_iter<char>, std::basic_string_view<char, std::char_traits<char> >, std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<char>, char> >) /usr/include/c++/13.2.1/format:3682
    #18 0x55bac42c3575 in std::vformat[abi:cxx11](std::basic_string_view<char, std::char_traits<char> >, std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<char>, char> >) /usr/include/c++/13.2.1/format:3709
    #19 0x55bac42ec868 in void Debug::log<CWindow*&>(LogLevel, std::basic_format_string<char, std::type_identity<CWindow*&>::type>, CWindow*&) /home/lucas/applications/Hyprland/Hyprland/src/debug/Log.hpp:70
    #20 0x55bac45bb9d5 in Events::listener_destroyWindow(void*, void*) /home/lucas/applications/Hyprland/Hyprland/src/events/Windows.cpp:855
    #21 0x55bac441f562 in void std::__invoke_impl<void, void (*&)(void*, void*), void*, void*>(std::__invoke_other, void (*&)(void*, void*), void*&&, void*&&) /usr/include/c++/13.2.1/bits/invoke.h:61
    #22 0x55bac441d0ea in std::enable_if<is_invocable_r_v<void, void (*&)(void*, void*), void*, void*>, void>::type std::__invoke_r<void, void (*&)(void*, void*), void*, void*>(void (*&)(void*, void*), void*&&, void*&&) /usr/include/c++/13.2.1/bits/invoke.h:111
    #23 0x55bac44198f8 in std::_Function_handler<void (void*, void*), void (*)(void*, void*)>::_M_invoke(std::_Any_data const&, void*&&, void*&&) /usr/include/c++/13.2.1/bits/std_function.h:290
    #24 0x55bac4644289 in std::function<void (void*, void*)>::operator()(void*, void*) const /usr/include/c++/13.2.1/bits/std_function.h:591
    #25 0x55bac46412e9 in CHyprWLListener::emit(void*) /home/lucas/applications/Hyprland/Hyprland/src/helpers/WLListener.cpp:59
    #26 0x55bac46407ee in handleWrapped(wl_listener*, void*) /home/lucas/applications/Hyprland/Hyprland/src/helpers/WLListener.cpp:13
    #27 0x7fe76055a2bf in wl_signal_emit_mutable ../src/wayland-server.c:2243
    #28 0x7fe75fb8944c in destroy_xdg_toplevel ../types/xdg_shell/wlr_xdg_toplevel.c:521
    #29 0x7fe75fb841f8 in destroy_xdg_surface_role_object ../types/xdg_shell/wlr_xdg_surface.c:436
    #30 0x7fe75fb84482 in destroy_xdg_surface ../types/xdg_shell/wlr_xdg_surface.c:468
    #31 0x7fe75fb81776 in xdg_client_handle_resource_destroy ../types/xdg_shell/wlr_xdg_shell.c:70
    #32 0x7fe76055565e in destroy_resource ../src/wayland-server.c:732
    #33 0x7fe76056d7a1 in for_each_helper ../src/wayland-util.c:416
    #34 0x7fe76056d830 in wl_map_for_each ../src/wayland-util.c:430
    #35 0x7fe760555d87 in wl_client_destroy ../src/wayland-server.c:928
    #36 0x7fe7605541f1 in wl_client_connection_data ../src/wayland-server.c:343
    #37 0x7fe76055d146 in wl_event_source_fd_dispatch ../src/event-loop.c:112
    #38 0x7fe760561ee4 in wl_event_loop_dispatch ../src/event-loop.c:1104
    #39 0x7fe760557fa5 in wl_display_run ../src/wayland-server.c:1493
    #40 0x55bac428b0ac in CCompositor::startCompositor() /home/lucas/applications/Hyprland/Hyprland/src/Compositor.cpp:531
    #41 0x55bac46b6a9c in main /home/lucas/applications/Hyprland/Hyprland/src/main.cpp:105
    #42 0x7fe75ef58ccf  (/usr/lib/libc.so.6+0x27ccf) (BuildId: 8bfe03f6bf9b6a6e2591babd0bbc266837d8f658)
    #43 0x7fe75ef58d89 in __libc_start_main (/usr/lib/libc.so.6+0x27d89) (BuildId: 8bfe03f6bf9b6a6e2591babd0bbc266837d8f658)
    #44 0x55bac42801d4 in _start (/home/lucas/applications/Hyprland/Hyprland/build/Hyprland+0x4011d4) (BuildId: ee06ea6ecebe714ec16f2433d932557fdcf92893)

0x622000012c98 is located 2968 bytes inside of 5376-byte region [0x622000012100,0x622000013600)
freed by thread T0 here:
    #0 0x7fe75fee311a in operator delete(void*, unsigned long) /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_new_delete.cpp:164
    #1 0x55bac433515a in std::default_delete<CWindow>::operator()(CWindow*) const /usr/include/c++/13.2.1/bits/unique_ptr.h:99
    #2 0x55bac43216fa in std::unique_ptr<CWindow, std::default_delete<CWindow> >::~unique_ptr() /usr/include/c++/13.2.1/bits/unique_ptr.h:404
    #3 0x55bac43513b7 in void std::destroy_at<std::unique_ptr<CWindow, std::default_delete<CWindow> > >(std::unique_ptr<CWindow, std::default_delete<CWindow> >*) /usr/include/c++/13.2.1/bits/stl_construct.h:88
    #4 0x55bac43412ec in void std::_Destroy<std::unique_ptr<CWindow, std::default_delete<CWindow> > >(std::unique_ptr<CWindow, std::default_delete<CWindow> >*) (/home/lucas/applications/Hyprland/Hyprland/build/Hyprland+0x4c22ec) (BuildId: ee06ea6ecebe714ec16f2433d932557fdcf92893)
    #5 0x55bac432d2bd in void std::_Destroy_aux<false>::__destroy<std::unique_ptr<CWindow, std::default_delete<CWindow> >*>(std::unique_ptr<CWindow, std::default_delete<CWindow> >*, std::unique_ptr<CWindow, std::default_delete<CWindow> >*) (/home/lucas/applications/Hyprland/Hyprland/build/Hyprland+0x4ae2bd) (BuildId: ee06ea6ecebe714ec16f2433d932557fdcf92893)
    #6 0x55bac43196bc in void std::_Destroy<std::unique_ptr<CWindow, std::default_delete<CWindow> >*>(std::unique_ptr<CWindow, std::default_delete<CWindow> >*, std::unique_ptr<CWindow, std::default_delete<CWindow> >*) (/home/lucas/applications/Hyprland/Hyprland/build/Hyprland+0x49a6bc) (BuildId: ee06ea6ecebe714ec16f2433d932557fdcf92893)
    #7 0x55bac4304081 in std::vector<std::unique_ptr<CWindow, std::default_delete<CWindow> >, std::allocator<std::unique_ptr<CWindow, std::default_delete<CWindow> > > >::_M_erase_at_end(std::unique_ptr<CWindow, std::default_delete<CWindow> >*) (/home/lucas/applications/Hyprland/Hyprland/build/Hyprland+0x485081) (BuildId: ee06ea6ecebe714ec16f2433d932557fdcf92893)
    #8 0x55bac431f623 in std::vector<std::unique_ptr<CWindow, std::default_delete<CWindow> >, std::allocator<std::unique_ptr<CWindow, std::default_delete<CWindow> > > >::_M_erase(__gnu_cxx::__normal_iterator<std::unique_ptr<CWindow, std::default_delete<CWindow> >*, std::vector<std::unique_ptr<CWindow, std::default_delete<CWindow> >, std::allocator<std::unique_ptr<CWindow, std::default_delete<CWindow> > > > >, __gnu_cxx::__normal_iterator<std::unique_ptr<CWindow, std::default_delete<CWindow> >*, std::vector<std::unique_ptr<CWindow, std::default_delete<CWindow> >, std::allocator<std::unique_ptr<CWindow, std::default_delete<CWindow> > > > >) (/home/lucas/applications/Hyprland/Hyprland/build/Hyprland+0x4a0623) (BuildId: ee06ea6ecebe714ec16f2433d932557fdcf92893)
    #9 0x55bac4308bc6 in std::vector<std::unique_ptr<CWindow, std::default_delete<CWindow> >, std::allocator<std::unique_ptr<CWindow, std::default_delete<CWindow> > > >::erase(__gnu_cxx::__normal_iterator<std::unique_ptr<CWindow, std::default_delete<CWindow> > const*, std::vector<std::unique_ptr<CWindow, std::default_delete<CWindow> >, std::allocator<std::unique_ptr<CWindow, std::default_delete<CWindow> > > > >, __gnu_cxx::__normal_iterator<std::unique_ptr<CWindow, std::default_delete<CWindow> > const*, std::vector<std::unique_ptr<CWindow, std::default_delete<CWindow> >, std::allocator<std::unique_ptr<CWindow, std::default_delete<CWindow> > > > >) (/home/lucas/applications/Hyprland/Hyprland/build/Hyprland+0x489bc6) (BuildId: ee06ea6ecebe714ec16f2433d932557fdcf92893)
    #10 0x55bac42b8329 in erase_if<std::unique_ptr<CWindow>, std::allocator<std::unique_ptr<CWindow> >, CCompositor::removeWindowFromVectorSafe(CWindow*)::<lambda(std::unique_ptr<CWindow>&)> > /usr/include/c++/13.2.1/vector:119
    #11 0x55bac428c384 in CCompositor::removeWindowFromVectorSafe(CWindow*) /home/lucas/applications/Hyprland/Hyprland/src/Compositor.cpp:596
    #12 0x55bac45bb994 in Events::listener_destroyWindow(void*, void*) /home/lucas/applications/Hyprland/Hyprland/src/events/Windows.cpp:854
    #13 0x55bac441f562 in void std::__invoke_impl<void, void (*&)(void*, void*), void*, void*>(std::__invoke_other, void (*&)(void*, void*), void*&&, void*&&) /usr/include/c++/13.2.1/bits/invoke.h:61
    #14 0x55bac441d0ea in std::enable_if<is_invocable_r_v<void, void (*&)(void*, void*), void*, void*>, void>::type std::__invoke_r<void, void (*&)(void*, void*), void*, void*>(void (*&)(void*, void*), void*&&, void*&&) /usr/include/c++/13.2.1/bits/invoke.h:111
    #15 0x55bac44198f8 in std::_Function_handler<void (void*, void*), void (*)(void*, void*)>::_M_invoke(std::_Any_data const&, void*&&, void*&&) /usr/include/c++/13.2.1/bits/std_function.h:290
    #16 0x55bac4644289 in std::function<void (void*, void*)>::operator()(void*, void*) const /usr/include/c++/13.2.1/bits/std_function.h:591
    #17 0x55bac46412e9 in CHyprWLListener::emit(void*) /home/lucas/applications/Hyprland/Hyprland/src/helpers/WLListener.cpp:59
    #18 0x55bac46407ee in handleWrapped(wl_listener*, void*) /home/lucas/applications/Hyprland/Hyprland/src/helpers/WLListener.cpp:13
    #19 0x7fe76055a2bf in wl_signal_emit_mutable ../src/wayland-server.c:2243
    #20 0x7fe75fb8944c in destroy_xdg_toplevel ../types/xdg_shell/wlr_xdg_toplevel.c:521
    #21 0x7fe75fb841f8 in destroy_xdg_surface_role_object ../types/xdg_shell/wlr_xdg_surface.c:436
    #22 0x7fe75fb84482 in destroy_xdg_surface ../types/xdg_shell/wlr_xdg_surface.c:468
    #23 0x7fe75fb81776 in xdg_client_handle_resource_destroy ../types/xdg_shell/wlr_xdg_shell.c:70
    #24 0x7fe76055565e in destroy_resource ../src/wayland-server.c:732
    #25 0x7fe76056d7a1 in for_each_helper ../src/wayland-util.c:416
    #26 0x7fe76056d830 in wl_map_for_each ../src/wayland-util.c:430
    #27 0x7fe760555d87 in wl_client_destroy ../src/wayland-server.c:928
    #28 0x7fe7605541f1 in wl_client_connection_data ../src/wayland-server.c:343
    #29 0x7fe76055d146 in wl_event_source_fd_dispatch ../src/event-loop.c:112

previously allocated by thread T0 here:
    #0 0x7fe75fee2002 in operator new(unsigned long) /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_new_delete.cpp:95
    #1 0x55bac45cdc50 in std::__detail::_MakeUniq<CWindow>::__single_object std::make_unique<CWindow>() /usr/include/c++/13.2.1/bits/unique_ptr.h:1070
    #2 0x55bac45c3df3 in Events::listener_newXDGSurface(wl_listener*, void*) /home/lucas/applications/Hyprland/Hyprland/src/events/Windows.cpp:1161
    #3 0x7fe76055a2bf in wl_signal_emit_mutable ../src/wayland-server.c:2243
    #4 0x7fe75fb837b6 in xdg_surface_role_commit ../types/xdg_shell/wlr_xdg_surface.c:313
    #5 0x7fe75fb90561 in surface_commit_state ../types/wlr_compositor.c:496
    #6 0x7fe75fb906a2 in surface_handle_commit ../types/wlr_compositor.c:518
    #7 0x7fe75ed534f5  (/usr/lib/libffi.so.8+0x74f5) (BuildId: 63c5f01a2f43d3d62204d550edf8277ffbfd6931)

SUMMARY: AddressSanitizer: heap-use-after-free /usr/include/c++/13.2.1/bits/basic_string.h:223 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const
Shadow bytes around the buggy address:
  0x622000012a00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x622000012a80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x622000012b00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x622000012b80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x622000012c00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x622000012c80: fd fd fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd
  0x622000012d00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x622000012d80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x622000012e00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x622000012e80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x622000012f00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==31662==ABORTING

@vaxerski
Copy link
Member Author

top! fixed. Rebuild with asan and do the same. Rinse and repeat. Post logs until there is no crash :)

@phonetic112
Copy link
Contributor

top! fixed. Rebuild with asan and do the same. Rinse and repeat. Post logs until there is no crash :)

do I checkout unsafe blah blah or nah
I get Cmake error

@vaxerski
Copy link
Member Author

vaxerski commented Oct 31, 2023

stay on this MR, just git pull. If there are any errors, make clear and then run the two cmake commands from the wiki to build

@phonetic112
Copy link
Contributor

phonetic112 commented Oct 31, 2023

stay on this MR, just git pull. If there are any errors, make clear and then run the two cmake commands from the wiki to build

I cant build:

CMake Error: Unable to (re)create the private pkgRedirects directory:
/build/CMakeFiles/pkgRedirects

nvm im dumb

@phonetic112
Copy link
Contributor

phonetic112 commented Oct 31, 2023

ok Xwayland doesn't crash but waybar still does, same error

And now opening xeyes gives: Error: Can't open display:

@vaxerski
Copy link
Member Author

vaxerski commented Oct 31, 2023

open xeyes with DISPLAY=:0

What about the sleep/hibernate/whatever crash?

@phonetic112
Copy link
Contributor

open xeyes with DISPLAY=:0

What about the sleep/hibernate/whatever crash?

Error: Can't open display: :0

No sleep crash yet

@vaxerski
Copy link
Member Author

I'll let @rszyma report back then after the latest commit

@phonetic112
Copy link
Contributor

phonetic112 commented Oct 31, 2023

I tried building in normal debug and it looks like it's fixed, but it spawns my mouse outside of the workspace that I reconnect on. It fixes it when I drag it back from the void.

Also I think the right mouse boundary of the screen broke, it's causing some weird bugs with the workspaces

@vaxerski
Copy link
Member Author

Also I think the right mouse boundary of the screen broke, it's causing some weird bugs with the workspaces

lolwut, can you check hyprctl monitors? If it contains HEADLESS-1 thats a bug

@phonetic112
Copy link
Contributor

phonetic112 commented Oct 31, 2023

Also I think the right mouse boundary of the screen broke, it's causing some weird bugs with the workspaces

lolwut, can you check hyprctl monitors? If it contains HEADLESS-1 thats a bug

ye it does, i guess it's treating it as a second monitor

@vaxerski
Copy link
Member Author

oopsie daisy >////<

@vaxerski
Copy link
Member Author

can you grep the log and check whether the Leaving unsafe state log gets printed?

@phonetic112
Copy link
Contributor

can you grep the log and check whether the Leaving unsafe state log gets printed?

Got nothing.

@vaxerski
Copy link
Member Author

vaxerski commented Nov 1, 2023

yeah, but what about without ASan?

@phonetic112
Copy link
Contributor

yeah, but what about without ASan?

That's what I'm doing right now. Should I try with asan?

@vaxerski
Copy link
Member Author

vaxerski commented Nov 1, 2023

no, hm, odd. You were supposed to launch hyprland normally where xwayland worked? like you could launch x apps? You should launch exactly in that state, with only adding the aforementioned env to the cmdline

@phonetic112
Copy link
Contributor

phonetic112 commented Nov 1, 2023

no, hm, odd. You were supposed to launch hyprland normally where xwayland worked? like you could launch x apps? You should launch exactly in that state, with only adding the aforementioned env to the cmdline

Yes I just launched into my main build (on 99d7e47) with the WLR_XWAYLAND thing.

I ran the script from the terminal instead:
xwaylandlog.txt

@vaxerski
Copy link
Member Author

vaxerski commented Nov 1, 2023

thanks, that helps

@vaxerski
Copy link
Member Author

vaxerski commented Nov 1, 2023

@phonetic112 @rszyma xwayland crash should be fixed. Please test.

@brettalcox
Copy link
Contributor

@vaxerski seems to be working for me so far! Put the computer to sleep with Waybar and Steam active and upon waking, everything was as it was before. Same with locking screen and turning monitors off

@vaxerski
Copy link
Member Author

vaxerski commented Nov 1, 2023

great, I'll wait for @rszyma and if they give an ok I'll merge this and close the original issue

@andresilva
Copy link
Contributor

It still crashes for me, nothing running except two alacritty terminals: hyprlandCrashReport15017.txt

I don't have an asan-enabled build and can't easily follow the instructions in the wiki because nixos.

@andresilva
Copy link
Contributor

Fixed with this patch: update-all-outputs-patch.txt

@andresilva
Copy link
Contributor

andresilva commented Nov 1, 2023

Waybar itself crashes for me (not too problematic since it's restarted by systemd), could be a bug in Waybar itself. Hyprland has not crashed so far and neither any other app that crashed before (on xwayland or electron).

Waybar crashes here: https://github.com/Alexays/Waybar/blob/master/src/modules/hyprland/workspaces.cpp#L297-L311
Requesting workspaces from Hyprland.

},{
    "id": 3,
    "name": "3",
    "monitor": "?",
    "monitorID": undefined,
    "windows": 3,
    "hasfullscreen": false,
    "lastwindow": "0x4d27c70",
    "lastwindowtitle": "andre: while [[ $? == 0 ]]; do; hyprctl -j workspaces >>| workspaces.log; done"
},{

Maybe because Hyprland is returning undefined for monitorID? Should be null instead I guess.

@rszyma
Copy link
Contributor

rszyma commented Nov 1, 2023

It still crashes for me, nothing running except two alacritty terminals: hyprlandCrashReport15017.txt

Same for me. Identical crash log. Just waybar or xeyes enough to cause the crash.

Fixed with this patch: update-all-outputs-patch.txt

I tried this patch too, and it seems to fix everything! Including waybar.

@rszyma
Copy link
Contributor

rszyma commented Nov 1, 2023

I found a different issue with xwayland, maybe related to this the previous ones that this PR adresses:

  1. suspend
  2. wake up
  3. open xeyes

Result:
Instead of opening main display, xeyes seem to open out-of-screen to the left. Right after opening, a new xeyes window still has focus so I can press shortcut to maximize it, and then it pops out on main screen and maximizes there.

It happens only with xeyes, and only after a suspend/wakeup cycle.

Should I create a new issue instead of blocking this PR?

@andresilva
Copy link
Contributor

andresilva commented Nov 1, 2023

I tried this patch too, and it seems to fix everything! Including waybar.

If waybar is not crashing for you I assume you're not using the hyprland/workspaces module.

monitor-undefined-json-patch.txt

This patch helps with the waybar crash, but it crashes elsewhere now (when processing moveworkspace event). Still haven't figured out why.

@vaxerski
Copy link
Member Author

vaxerski commented Nov 1, 2023

right, missed nullcheck my bad! Please check now

@rszyma
Copy link
Contributor

rszyma commented Nov 1, 2023

If waybar is not crashing for you I assume you're not using the hyprland/workspaces module.

yep, not using hyprland/workspaces

@andresilva
Copy link
Contributor

@vaxerski

monitor-undefined-json-patch.txt

Can you also include this patch? Otherwise we return invalid JSON ("undefined" is not a valid JSON type).

@vaxerski
Copy link
Member Author

vaxerski commented Nov 1, 2023

done

@vaxerski
Copy link
Member Author

vaxerski commented Nov 1, 2023

Since issues are solved, I'll merge this

@vaxerski vaxerski merged commit 21e9313 into main Nov 1, 2023
19 checks passed
@brettalcox
Copy link
Contributor

not entirely sure if related to this change or not, but since pulling this in, having swaylock segfault after resume when display is turned off

Nov 01 17:39:45 gentoo kernel: swaylock[2060]: segfault at 18 ip 00007f03408b4545 sp 00007ffeeaa0fac8 error 4 in libwayland-client.so.0.22.0[7f03408af000+6000] likely on CPU 13 (core 24, socket 0)

@brettalcox
Copy link
Contributor

(gdb) bt
#0  0x00007f0ba9e79545 in wl_list_insert () at /usr/lib64/libwayland-client.so.0
#1  0x00007f0ba9e74665 in  () at /usr/lib64/libwayland-client.so.0
#2  0x00007f0ba9e750ee in wl_proxy_marshal_array_flags () at /usr/lib64/libwayland-client.so.0
#3  0x00007f0ba9e753d5 in wl_proxy_marshal_flags () at /usr/lib64/libwayland-client.so.0
#4  0x0000563c41d742aa in  ()
#5  0x00007f0ba95d20aa in  () at /usr/lib64/libffi.so.8
#6  0x00007f0ba95d156b in  () at /usr/lib64/libffi.so.8
#7  0x00007f0ba95d1c3d in ffi_call () at /usr/lib64/libffi.so.8
#8  0x00007f0ba9e788f6 in  () at /usr/lib64/libwayland-client.so.0
#9  0x00007f0ba9e74be9 in  () at /usr/lib64/libwayland-client.so.0
#10 0x00007f0ba9e76544 in wl_display_dispatch_queue_pending () at /usr/lib64/libwayland-client.so.0
#11 0x00007f0ba9e76aff in wl_display_roundtrip_queue () at /usr/lib64/libwayland-client.so.0
#12 0x00007f0ba95d20aa in  () at /usr/lib64/libffi.so.8
#13 0x00007f0ba95d156b in  () at /usr/lib64/libffi.so.8
#14 0x00007f0ba95d1c3d in ffi_call () at /usr/lib64/libffi.so.8
#15 0x00007f0ba9e788f6 in  () at /usr/lib64/libwayland-client.so.0
#16 0x00007f0ba9e74be9 in  () at /usr/lib64/libwayland-client.so.0
#17 0x00007f0ba9e76544 in wl_display_dispatch_queue_pending () at /usr/lib64/libwayland-client.so.0
#18 0x0000563c41d74070 in  ()
#19 0x0000563c41d73b37 in  ()
#20 0x0000563c41d72201 in  ()
#21 0x00007f0ba9c71f3a in  () at /usr/lib64/libc.so.6
#22 0x00007f0ba9c71ff5 in __libc_start_main () at /usr/lib64/libc.so.6
#23 0x0000563c41d725e1 in  ()`

if it helps

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

Successfully merging this pull request may close these issues.

None yet

5 participants