hyprwm / hyprpicker

A wlroots-compatible Wayland color picker that does not suck.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash on exit when built against libc++

jbeich opened this issue · comments

Affects libc++ at least from LLVM 10-16 (-std=c++2b or -std=c++17).

Clang backtrace
$ export CC=clang CXX=clang++ CXXFLAGS=-stdlib=libc++
$ cmake -G Ninja -B /tmp/hyprpicker_build
$ cmake --build /tmp/hyprpicker_build
$ cmake --install /tmp/hyprpicker_build

$ hyprpicker
<press ESC to exit>
Segmentation fault

* thread #1, name = 'hyprpicker', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)
    frame #0: 0x00000000002111ae hyprpicker`CLayerSurface::~CLayerSurface(this=0x0000000835f2d000) at LayerSurface.cpp:39:37
   36       wl_surface_destroy(pSurface);
   37       zwlr_layer_surface_v1_destroy(pLayerSurface);
   38
-> 39       wl_display_flush(g_pHyprpicker->m_pWLDisplay);
   40   }
(lldb) p g_pHyprpicker
(std::unique_ptr<CHyprpicker, std::default_delete<CHyprpicker> >) $0 = nullptr {
  __ptr_ = {
    std::__1::__compressed_pair_elem<CHyprpicker *, 0, false> = {
      __value_ = nullptr
    }
  }
}
(lldb) bt
* thread #1, name = 'hyprpicker', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)
  * frame #0: 0x00000000002111ae hyprpicker`CLayerSurface::~CLayerSurface(this=0x0000000835f2d000) at LayerSurface.cpp:39:37
    frame #1: 0x000000000020e5fb hyprpicker`std::__1::default_delete<CLayerSurface>::operator(this=0x0000000835eea010, __ptr=0x0000000835f2d000)[abi:v160000](CLayerSurface*) const at unique_ptr.h:65:5
    frame #2: 0x000000000020e57c hyprpicker`std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >::reset[abi:v160000](this=0x0000000835eea010, __p=0x0000000000000000) at unique_ptr.h:297:7
    frame #3: 0x000000000020e519 hyprpicker`std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >::~unique_ptr[abi:v160000](this=0x0000000835eea010) at unique_ptr.h:263:75
    frame #4: 0x000000000020e4f5 hyprpicker`void std::__1::__destroy_at[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, 0>(__loc=0x0000000835eea010) at construct_at.h:66:13
    frame #5: 0x000000000020e4d5 hyprpicker`void std::__1::destroy_at[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, 0>(__loc=0x0000000835eea010) at construct_at.h:91:5
    frame #6: 0x000000000020e4b9 hyprpicker`void std::__1::allocator_traits<std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::destroy[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, void, void>((null)=0x0000000835f13068, __p=0x0000000835eea010) at allocator_traits.h:323:9
    frame #7: 0x000000000020e478 hyprpicker`std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__base_destruct_at_end[abi:v160000](this=0x0000000835f13058, __new_last=0x0000000835eea010) at vector:836:9
    frame #8: 0x000000000020e328 hyprpicker`std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__clear[abi:v160000](this=0x0000000835f13058) at vector:830:29
    frame #9: 0x000000000020e205 hyprpicker`std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__destroy_vector::operator(this=0x0000000820e85ec0)[abi:v160000]() at vector:446:20
    frame #10: 0x000000000020e0d5 hyprpicker`std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::~vector[abi:v160000](this=0x0000000835f13058) at vector:456:67
    frame #11: 0x000000000020e07a hyprpicker`CHyprpicker::~CHyprpicker(this=0x0000000835f13000) at hyprpicker.hpp:15:7
    frame #12: 0x000000000020e01b hyprpicker`std::__1::default_delete<CHyprpicker>::operator(this=0x0000000000219340, __ptr=0x0000000835f13000)[abi:v160000](CHyprpicker*) const at unique_ptr.h:65:5
    frame #13: 0x000000000020df9c hyprpicker`std::__1::unique_ptr<CHyprpicker, std::__1::default_delete<CHyprpicker> >::reset[abi:v160000](this=0x0000000000219340, __p=0x0000000000000000) at unique_ptr.h:297:7
    frame #14: 0x000000000020d8b9 hyprpicker`std::__1::unique_ptr<CHyprpicker, std::__1::default_delete<CHyprpicker> >::~unique_ptr[abi:v160000](this=0x0000000000219340) at unique_ptr.h:263:75
    frame #15: 0x0000000825fd255a libc.so.7`__cxa_finalize + 362
    frame #16: 0x0000000825fd2ae1 libc.so.7`exit + 33
    frame #17: 0x0000000000211bd3 hyprpicker`CHyprpicker::finish(this=0x0000000835f13000, code=0) at hyprpicker.cpp:45:5
    frame #18: 0x000000000020d5b1 hyprpicker`Events::handleKeyboardKey(data=0x0000000835efc280, keyboard=0x0000000835efc500, serial=4847, time=59417495, key=1, state=1) at Events.cpp:268:24
    frame #19: 0x000000082771161a libffi.so.8`ffi_call_unix64 at unix64.S:104
    frame #20: 0x00000008277108b2 libffi.so.8`ffi_call_int(cif=0x0000000820e86260, fn=(hyprpicker`Events::handleKeyboardKey(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int) at Events.cpp:266), rvalue=0x0000000000000000, avalue=0x0000000820e86290, closure=0x0000000000000000) at ffi64.c:673:3
    frame #21: 0x0000000827710422 libffi.so.8`ffi_call(cif=0x0000000820e86260, fn=(hyprpicker`Events::handleKeyboardKey(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int) at Events.cpp:266), rvalue=0x0000000000000000, avalue=0x0000000820e86290) at ffi64.c:710:3
    frame #22: 0x0000000822f4e858 libwayland-client.so.0`wl_closure_invoke(closure=0x0000000835f2bb00, flags=1, target=0x0000000835efc500, opcode=3, data=0x0000000835efc280) at connection.c:1025:2
    frame #23: 0x0000000822f4c0df libwayland-client.so.0`dispatch_event(display=0x0000000835f18000, queue=0x0000000835f180d0) at wayland-client.c:1595:3
    frame #24: 0x0000000822f4af64 libwayland-client.so.0`dispatch_queue(display=0x0000000835f18000, queue=0x0000000835f180d0) at wayland-client.c:1741:3
    frame #25: 0x0000000822f4ad2d libwayland-client.so.0`wl_display_dispatch_queue_pending(display=0x0000000835f18000, queue=0x0000000835f180d0) at wayland-client.c:1983:8
    frame #26: 0x0000000822f4a8fe libwayland-client.so.0`wl_display_dispatch_queue(display=0x0000000835f18000, queue=0x0000000835f180d0) at wayland-client.c:1959:9
    frame #27: 0x0000000822f4afe0 libwayland-client.so.0`wl_display_dispatch(display=0x0000000835f18000) at wayland-client.c:2026:9
    frame #28: 0x0000000000211a69 hyprpicker`CHyprpicker::init(this=0x0000000835f13000) at hyprpicker.cpp:33:26
    frame #29: 0x0000000000215c9a hyprpicker`main(argc=1, argv=0x0000000820e86640, envp=0x0000000820e86650) at main.cpp:65:20
    frame #30: 0x000000000020a2a0 hyprpicker`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1_c.c:75:7
GCC backtrace
$ export CC=gcc CXX=g++ CXXFLAGS=-stdlib=libc++
$ cmake -G Ninja -B /tmp/hyprpicker_build
$ cmake --build /tmp/hyprpicker_build
$ cmake --install /tmp/hyprpicker_build

$ hyprpicker
<press ESC to exit>
Segmentation fault

CLayerSurface::~CLayerSurface (this=0x801a4b000, __in_chrg=<optimized out>) at hyprpicker-fe4535a/src/helpers/LayerSurface.cpp:39
39          wl_display_flush(g_pHyprpicker->m_pWLDisplay);
(gdb) p g_pHyprpicker
$1 = std::unique_ptr<CHyprpicker> = 0x0
(gdb) bt
#0  CLayerSurface::~CLayerSurface (this=0x801a4b000, __in_chrg=<optimized out>) at hyprpicker-fe4535a/src/helpers/LayerSurface.cpp:39
#1  0x000000000040ae2d in std::__1::default_delete<CLayerSurface>::operator()[abi:v160000](CLayerSurface*) const (__ptr=0x801a4b000, this=0x801a08010)
    at /usr/include/c++/v1/__memory/unique_ptr.h:65
#2  std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >::reset[abi:v160000](CLayerSurface*) (__p=0x0, this=0x801a08010)
    at /usr/include/c++/v1/__memory/unique_ptr.h:297
#3  std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >::~unique_ptr[abi:v160000]() (this=0x801a08010, __in_chrg=<optimized out>)
    at /usr/include/c++/v1/__memory/unique_ptr.h:263
#4  std::__1::__destroy_at[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, 0>(std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >*) (__loc=0x801a08010)
    at /usr/include/c++/v1/__memory/construct_at.h:66
#5  std::__1::destroy_at[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, 0>(std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >*) (__loc=0x801a08010)
    at /usr/include/c++/v1/__memory/construct_at.h:91
#6  std::__1::allocator_traits<std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::destroy[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, void, void>(std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > >&, std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >*) (__p=0x801a08010)
    at /usr/include/c++/v1/__memory/allocator_traits.h:323
#7  std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__base_destruct_at_end[abi:v160000](std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >*) (__new_last=0x801a08010, this=0x801a31058) at /usr/include/c++/v1/vector:836
#8  std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__clear[abi:v160000]() (
    this=0x801a31058) at /usr/include/c++/v1/vector:830
#9  std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__destroy_vector::operator()[abi:v160000]() (this=<optimized out>) at /usr/include/c++/v1/vector:446
#10 std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::~vector[abi:v160000]() (
    this=0x801a31058, __in_chrg=<optimized out>) at /usr/include/c++/v1/vector:456
#11 CHyprpicker::~CHyprpicker (this=0x801a31000, __in_chrg=<optimized out>) at hyprpicker-fe4535a/src/helpers/../hyprpicker.hpp:15
#12 0x000000000040aa1a in std::__1::default_delete<CHyprpicker>::operator()[abi:v160000](CHyprpicker*) const (__ptr=0x801a31000, this=0x619b68 <g_pHyprpicker>)
    at /usr/include/c++/v1/__memory/unique_ptr.h:65
#13 std::__1::unique_ptr<CHyprpicker, std::__1::default_delete<CHyprpicker> >::reset[abi:v160000](CHyprpicker*) (__p=0x0, this=0x619b68 <g_pHyprpicker>)
    at /usr/include/c++/v1/__memory/unique_ptr.h:297
#14 std::__1::unique_ptr<CHyprpicker, std::__1::default_delete<CHyprpicker> >::~unique_ptr[abi:v160000]() (this=0x619b68 <g_pHyprpicker>, __in_chrg=<optimized out>)
    at /usr/include/c++/v1/__memory/unique_ptr.h:263
#15 0x0000000800ce555a in __cxa_finalize () from /lib/libc.so.7
#16 0x0000000800ce5ae1 in exit () from /lib/libc.so.7
#17 0x000000000040ed96 in CHyprpicker::finish (this=0x801a31000, code=0) at hyprpicker-fe4535a/src/hyprpicker.cpp:45
#18 0x000000000040a215 in Events::handleKeyboardKey (data=0x801a1a280, keyboard=0x801a1a500, serial=11867, time=60748792, key=1, state=1) at hyprpicker-fe4535a/src/events/Events.cpp:268
#19 0x0000000800faf61a in ffi_call_unix64 () at ../src/x86/unix64.S:104
#20 0x0000000800fae8b2 in ffi_call_int (cif=0x7fffffffd550, fn=0x40a1cb <Events::handleKeyboardKey(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int)>, rvalue=0x0, avalue=0x7fffffffd580, closure=0x0)
    at ../src/x86/ffi64.c:673
#21 0x0000000800fae422 in ffi_call (cif=0x7fffffffd550, fn=0x40a1cb <Events::handleKeyboardKey(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int)>, rvalue=0x0, avalue=0x7fffffffd580) at ../src/x86/ffi64.c:710
#22 0x0000000800674858 in wl_closure_invoke (closure=0x801a49b00, flags=1, target=0x801a1a500, opcode=3, data=0x801a1a280) at ../src/connection.c:1025
#23 0x00000008006720df in dispatch_event (display=0x801a36000, queue=0x801a360d0) at ../src/wayland-client.c:1595
#24 0x0000000800670f64 in dispatch_queue (display=0x801a36000, queue=0x801a360d0) at ../src/wayland-client.c:1741
#25 0x0000000800670d2d in wl_display_dispatch_queue_pending (display=0x801a36000, queue=0x801a360d0) at ../src/wayland-client.c:1983
#26 0x00000008006708fe in wl_display_dispatch_queue (display=0x801a36000, queue=0x801a360d0) at ../src/wayland-client.c:1959
#27 0x0000000800670fe0 in wl_display_dispatch (display=0x801a36000) at ../src/wayland-client.c:2026
#28 0x000000000040eacd in CHyprpicker::init (this=0x801a31000) at hyprpicker-fe4535a/src/hyprpicker.cpp:33
#29 0x0000000000415546 in main (argc=1, argv=0x7fffffffea18, envp=0x7fffffffea28) at hyprpicker-fe4535a/src/main.cpp:65
commented

should be fixed with 7ae1d1d and bec451e

lmk

bec451e snapshot still crashes:

Clang backtrace
$ export CC=clang CXX=clang++ CXXFLAGS=-stdlib=libc++
$ cmake -G Ninja -B /tmp/hyprpicker_build
$ cmake --build /tmp/hyprpicker_build
$ cmake --install /tmp/hyprpicker_build

$ hyprpicker
<press ESC to exit>
Segmentation fault

* thread #1, name = 'hyprpicker', stop reason = signal SIGSEGV: invalid address (fault address: 0x1c)
    frame #0: 0x00000008229f1858 libwayland-client.so.0`wl_map_insert_at(map=0x0000000837b7f080, flags=1, i=3, data=0x0000000000000000) at wayland-util.c:275:16
   272          }
   273
   274          start = entries->data;
-> 275          start[i].data = data;
   276          start[i].next |= (flags & 0x1) << 1;
   277
   278          return 0;
(lldb) bt
* thread #1, name = 'hyprpicker', stop reason = signal SIGSEGV: invalid address (fault address: 0x1c)
  * frame #0: 0x00000008229f1858 libwayland-client.so.0`wl_map_insert_at(map=0x0000000837b7f080, flags=1, i=3, data=0x0000000000000000) at wayland-util.c:275:16
    frame #1: 0x00000008229ec3f1 libwayland-client.so.0`proxy_destroy(proxy=0x0000000837b63140) at wayland-client.c:510:3
    frame #2: 0x00000008229ea226 libwayland-client.so.0`wl_proxy_destroy_caller_locks(proxy=0x0000000837b63140) at wayland-client.c:530:2
    frame #3: 0x00000008229ea5ce libwayland-client.so.0`wl_proxy_marshal_array_flags(proxy=0x0000000837b63140, opcode=0, interface=0x0000000000000000, version=4, flags=1, args=0x000000082072a310) at wayland-client.c:868:3
    frame #4: 0x00000008229ea703 libwayland-client.so.0`wl_proxy_marshal_flags(proxy=0x0000000837b63140, opcode=0, interface=0x0000000000000000, version=4, flags=1) at wayland-client.c:791:9
    frame #5: 0x0000000000211596 hyprpicker`wl_surface_destroy(wl_surface=0x0000000837b63140) at wayland-client-protocol.h:3680:2
    frame #6: 0x00000000002111cd hyprpicker`CLayerSurface::~CLayerSurface(this=0x0000000837b94000) at LayerSurface.cpp:36:5
    frame #7: 0x000000000020e63b hyprpicker`std::__1::default_delete<CLayerSurface>::operator()[abi:v160000](this=0x0000000837b51010, __ptr=0x0000000837b94000) const at unique_ptr.h:65:5
    frame #8: 0x000000000020e5bc hyprpicker`std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface>>::reset[abi:v160000](this=0x0000000837b51010, __p=0x0000000000000000) at unique_ptr.h:297:7
    frame #9: 0x000000000020e559 hyprpicker`std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface>>::~unique_ptr[abi:v160000](this=0x0000000837b51010) at unique_ptr.h:263:75
    frame #10: 0x000000000020e535 hyprpicker`void std::__1::__destroy_at[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface>>, 0>(__loc=0x0000000837b51010) at construct_at.h:66:13
    frame #11: 0x000000000020e515 hyprpicker`void std::__1::destroy_at[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface>>, 0>(__loc=0x0000000837b51010) at construct_at.h:91:5
    frame #12: 0x000000000020e4f9 hyprpicker`void std::__1::allocator_traits<std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface>>>>::destroy[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface>>, void, void>((null)=0x0000000837b7a068, __p=0x0000000837b51010) at allocator_traits.h:323:9
    frame #13: 0x000000000020e4b8 hyprpicker`std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface>>, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface>>>>::__base_destruct_at_end[abi:v160000](this=0x0000000837b7a058 size=1, __new_last=0x0000000837b51010) at vector:836:9
    frame #14: 0x000000000020e368 hyprpicker`std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface>>, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface>>>>::__clear[abi:v160000](this=0x0000000837b7a058 size=1) at vector:830:29
    frame #15: 0x000000000020e245 hyprpicker`std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface>>, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface>>>>::__destroy_vector::operator()[abi:v160000](this=0x000000082072a5c0) at vector:446:20
    frame #16: 0x000000000020e115 hyprpicker`std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface>>, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface>>>>::~vector[abi:v160000](this=0x0000000837b7a058 size=1) at vector:456:67
    frame #17: 0x000000000020e0ba hyprpicker`CHyprpicker::~CHyprpicker(this=0x0000000837b7a000) at hyprpicker.hpp:15:7
    frame #18: 0x000000000020e05b hyprpicker`std::__1::default_delete<CHyprpicker>::operator()[abi:v160000](this=0x0000000000219410, __ptr=0x0000000837b7a000) const at unique_ptr.h:65:5
    frame #19: 0x000000000020dfdc hyprpicker`std::__1::unique_ptr<CHyprpicker, std::__1::default_delete<CHyprpicker>>::reset[abi:v160000](this=0x0000000000219410, __p=0x0000000000000000) at unique_ptr.h:297:7
    frame #20: 0x000000000020d8f9 hyprpicker`std::__1::unique_ptr<CHyprpicker, std::__1::default_delete<CHyprpicker>>::~unique_ptr[abi:v160000](this=0x0000000000219410) at unique_ptr.h:263:75
    frame #21: 0x00000008274a055a libc.so.7`__cxa_finalize + 362
    frame #22: 0x00000008274a0ae1 libc.so.7`exit + 33
    frame #23: 0x0000000000211c8b hyprpicker`CHyprpicker::finish(this=0x0000000837b7a000, code=0) at hyprpicker.cpp:56:5
    frame #24: 0x000000000020d5f1 hyprpicker`Events::handleKeyboardKey(data=0x0000000837b63280, keyboard=0x0000000837b63500, serial=27052, time=64328742, key=1, state=1) at Events.cpp:268:24
    frame #25: 0x0000000828e1361a libffi.so.8`ffi_call_unix64 at unix64.S:104
    frame #26: 0x0000000828e128b2 libffi.so.8`ffi_call_int(cif=0x000000082072a960, fn=(hyprpicker`Events::handleKeyboardKey(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int) at Events.cpp:266), rvalue=0x0000000000000000, avalue=0x000000082072a990, closure=0x0000000000000000) at ffi64.c:673:3
    frame #27: 0x0000000828e12422 libffi.so.8`ffi_call(cif=0x000000082072a960, fn=(hyprpicker`Events::handleKeyboardKey(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int) at Events.cpp:266), rvalue=0x0000000000000000, avalue=0x000000082072a990) at ffi64.c:710:3
    frame #28: 0x00000008229ef858 libwayland-client.so.0`wl_closure_invoke(closure=0x0000000837b92b00, flags=1, target=0x0000000837b63500, opcode=3, data=0x0000000837b63280) at connection.c:1025:2
    frame #29: 0x00000008229ed0df libwayland-client.so.0`dispatch_event(display=0x0000000837b7f000, queue=0x0000000837b7f0d0) at wayland-client.c:1595:3
    frame #30: 0x00000008229ebf64 libwayland-client.so.0`dispatch_queue(display=0x0000000837b7f000, queue=0x0000000837b7f0d0) at wayland-client.c:1741:3
    frame #31: 0x00000008229ebd2d libwayland-client.so.0`wl_display_dispatch_queue_pending(display=0x0000000837b7f000, queue=0x0000000837b7f0d0) at wayland-client.c:1983:8
    frame #32: 0x00000008229eb8fe libwayland-client.so.0`wl_display_dispatch_queue(display=0x0000000837b7f000, queue=0x0000000837b7f0d0) at wayland-client.c:1959:9
    frame #33: 0x00000008229ebfe0 libwayland-client.so.0`wl_display_dispatch(display=0x0000000837b7f000) at wayland-client.c:2026:9
    frame #34: 0x0000000000211ac9 hyprpicker`CHyprpicker::init(this=0x0000000837b7a000) at hyprpicker.cpp:34:26
    frame #35: 0x0000000000215d4a hyprpicker`main(argc=1, argv=0x000000082072ad48, envp=0x000000082072ad58) at main.cpp:65:20
    frame #36: 0x000000000020a2e0 hyprpicker`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1_c.c:75:7
GCC backtrace
$ export CC=gcc CXX=g++ CXXFLAGS=-stdlib=libc++
$ cmake -G Ninja -B /tmp/hyprpicker_build
$ cmake --build /tmp/hyprpicker_build
$ cmake --install /tmp/hyprpicker_build

$ hyprpicker
<press ESC to exit>
Segmentation fault

0x0000000800676858 in wl_map_insert_at (map=0x801a36080, flags=1, i=3, data=0x0) at ../src/wayland-util.c:275
275             start[i].data = data;
(gdb) bt
#0  0x0000000800676858 in wl_map_insert_at (map=0x801a36080, flags=1, i=3, data=0x0) at ../src/wayland-util.c:275
#1  0x00000008006713f1 in proxy_destroy (proxy=0x801a1a140) at ../src/wayland-client.c:510
#2  0x000000080066f226 in wl_proxy_destroy_caller_locks (proxy=0x801a1a140) at ../src/wayland-client.c:530
#3  0x000000080066f5ce in wl_proxy_marshal_array_flags (proxy=0x801a1a140, opcode=0, interface=0x0, version=4, flags=1,
    args=0x7fffffffcaf0) at ../src/wayland-client.c:868
#4  0x000000080066f703 in wl_proxy_marshal_flags (proxy=0x801a1a140, opcode=0, interface=0x0, version=4, flags=1)
    at ../src/wayland-client.c:791
#5  0x000000000040bc2f in wl_surface_destroy (wl_surface=0x801a1a140) at /usr/include/wayland-client-protocol.h:3680
#6  0x000000000040ba9b in CLayerSurface::~CLayerSurface (this=0x801a4b000, __in_chrg=<optimized out>)
    at hyprpicker-bec451e/src/helpers/LayerSurface.cpp:36
#7  0x000000000040ae8d in std::__1::default_delete<CLayerSurface>::operator()[abi:v160000](CLayerSurface*) const (__ptr=0x801a4b000,
    this=0x801a08010) at /usr/include/c++/v1/__memory/unique_ptr.h:65
#8  std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >::reset[abi:v160000](CLayerSurface*) (__p=0x0,
    this=0x801a08010) at /usr/include/c++/v1/__memory/unique_ptr.h:297
#9  std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >::~unique_ptr[abi:v160000]() (this=0x801a08010,
    __in_chrg=<optimized out>) at /usr/include/c++/v1/__memory/unique_ptr.h:263
#10 std::__1::__destroy_at[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, 0>(std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >*) (__loc=0x801a08010)
    at /usr/include/c++/v1/__memory/construct_at.h:66
#11 std::__1::destroy_at[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, 0>(std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >*) (__loc=0x801a08010)
    at /usr/include/c++/v1/__memory/construct_at.h:91
#12 std::__1::allocator_traits<std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::destroy[abi:v160000]<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, void, void>(std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > >&, std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >*) (__p=0x801a08010)
    at /usr/include/c++/v1/__memory/allocator_traits.h:323
#13 std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique--Type <RET> for more, q to quit, c to continue without paging--
_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__base_destruct_at_end[abi:v160000](std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >*) (__new_last=0x801a08010, this=0x801a31058)
    at /usr/include/c++/v1/vector:836
#14 std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__clear[abi:v160000]() (this=0x801a31058)
    at /usr/include/c++/v1/vector:830
#15 std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::__destroy_vector::operator()[abi:v160000]() (this=<optimized out>)
    at /usr/include/c++/v1/vector:446
#16 std::__1::vector<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> >, std::__1::allocator<std::__1::unique_ptr<CLayerSurface, std::__1::default_delete<CLayerSurface> > > >::~vector[abi:v160000]() (this=0x801a31058, __in_chrg=<optimized out>)
    at /usr/include/c++/v1/vector:456
#17 CHyprpicker::~CHyprpicker (this=0x801a31000, __in_chrg=<optimized out>)
    at hyprpicker-bec451e/src/helpers/../hyprpicker.hpp:15
#18 0x000000000040aa7a in std::__1::default_delete<CHyprpicker>::operator()[abi:v160000](CHyprpicker*) const (__ptr=0x801a31000,
    this=0x619c08 <g_pHyprpicker>) at /usr/include/c++/v1/__memory/unique_ptr.h:65
#19 std::__1::unique_ptr<CHyprpicker, std::__1::default_delete<CHyprpicker> >::reset[abi:v160000](CHyprpicker*) (__p=0x0,
    this=0x619c08 <g_pHyprpicker>) at /usr/include/c++/v1/__memory/unique_ptr.h:297
#20 std::__1::unique_ptr<CHyprpicker, std::__1::default_delete<CHyprpicker> >::~unique_ptr[abi:v160000]() (
    this=0x619c08 <g_pHyprpicker>, __in_chrg=<optimized out>)
    at /usr/include/c++/v1/__memory/unique_ptr.h:263
#21 0x0000000800ce555a in __cxa_finalize () from /lib/libc.so.7
#22 0x0000000800ce5ae1 in exit () from /lib/libc.so.7
#23 0x000000000040ee86 in CHyprpicker::finish (this=0x801a31000, code=0)
    at hyprpicker-bec451e/src/hyprpicker.cpp:56
#24 0x000000000040a275 in Events::handleKeyboardKey (data=0x801a1a280, keyboard=0x801a1a500, serial=27878, time=64519108, key=1,
    state=1) at hyprpicker-bec451e/src/events/Events.cpp:268
#25 0x0000000800faf61a in ffi_call_unix64 () at ../src/x86/unix64.S:104
#26 0x0000000800fae8b2 in ffi_call_int (cif=0x7fffffffd550,
    fn=0x40a22b <Events::handleKeyboardKey(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int)>, rvalue=0x0,
    avalue=0x7fffffffd580, closure=0x0) at ../src/x86/ffi64.c:673
#27 0x0000000800fae422 in ffi_call (cif=0x7fffffffd550,
    fn=0x40a22b <Events::handleKeyboardKey(void*, wl_keyboard*, unsigned int, unsigned int, unsigned int, unsigned int)>, rvalue=0x0,
    avalue=0x7fffffffd580) at ../src/x86/ffi64.c:710
#28 0x0000000800674858 in wl_closure_invoke (closure=0x801a49b00, flags=1, target=0x801a1a500, opcode=3, data=0x801a1a280)
    at ../src/connection.c:1025
#29 0x00000008006720df in dispatch_event (display=0x801a36000, queue=0x801a360d0) at ../src/wayland-client.c:1595
#30 0x0000000800670f64 in dispatch_queue (display=0x801a36000, queue=0x801a360d0) at ../src/wayland-client.c:1741
#31 0x0000000800670d2d in wl_display_dispatch_queue_pending (display=0x801a36000, queue=0x801a360d0) at ../src/wayland-client.c:1983
#32 0x00000008006708fe in wl_display_dispatch_queue (display=0x801a36000, queue=0x801a360d0) at ../src/wayland-client.c:1959
#33 0x0000000800670fe0 in wl_display_dispatch (display=0x801a36000) at ../src/wayland-client.c:2026
#34 0x000000000040eb55 in CHyprpicker::init (this=0x801a31000)
    at hyprpicker-bec451e/src/hyprpicker.cpp:34
#35 0x0000000000415636 in main (argc=1, argv=0x7fffffffea10, envp=0x7fffffffea20)
    at hyprpicker-bec451e/src/main.cpp:65
commented

my bad. e4c2672

I confirm, e4c2672 snapshot works fine.