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

Crash in Xwayland support when built against libc++ #1477

Closed
jbeich opened this issue Feb 3, 2023 · 4 comments
Closed

Crash in Xwayland support when built against libc++ #1477

jbeich opened this issue Feb 3, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@jbeich
Copy link
Contributor

jbeich commented Feb 3, 2023

Affects libc++ at least from LLVM 14-16.

Clang backtrace
$ export CC=clang CXX=clang++ CXXFLAGS=-stdlib=libc++
$ meson setup /tmp/hyprland_build
$ meson compile -C /tmp/hyprland_build
$ meson install -C /tmp/hyprland_build 

$ Hyprland -c /dev/null &
$ DISPLAY=:0 glxgears
[...]
00:00:09.926 [xwayland/server.c:108] Starting Xwayland on :0
New XWayland Surface created (class (null)).
Registered signal for owner 753c1c00: 4fc1efe0 -> 753c1c80 (owner: XWayland Window)
Registered signal for owner 753c1c00: 4fc1eff0 -> 753c1d00 (owner: XWayland Window)
Registered signal for owner 753c1c00: 4fc1ef60 -> 753c1d80 (owner: XWayland Window)
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
(EE) failed to read Wayland events: Broken pipe
XIO:  fatal IO error 2 (No such file or directory) on X server ":0"
      after 41 requests (41 known processed) with 0 events remaining.
[1]   Segmentation fault      Hyprland

* thread #1, name = 'Hyprland', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
    frame #0: 0x00000008357afe84 libc.so.7`strlen + 84
libc.so.7`strlen:
->  0x8357afe84 <+84>: movq   (%rdi), %r11
    0x8357afe87 <+87>: leaq   (%r11,%r8), %rcx
    0x8357afe8b <+91>: notq   %r11
    0x8357afe8e <+94>: andq   %r11, %rcx
(lldb) bt
* thread #1, name = 'Hyprland', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
  * frame #0: 0x00000008357afe84 libc.so.7`strlen + 84
    frame #1: 0x0000000000334455 Hyprland`std::__1::__constexpr_strlen[abi:v160000](__str=0x0000000000000000) at cstring:114:10
    frame #2: 0x00000000003343b5 Hyprland`std::__1::char_traits<char>::length(__s=0x0000000000000000) at char_traits.h:220:12
    frame #3: 0x0000000000332604 Hyprland`std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_string[abi:v160000]<std::nullptr_t>(this=Summary Unavailable, __s=0x0000000000000000) at string:882:17
    frame #4: 0x00000000003ddc13 Hyprland`CHyprXWaylandManager::getAppIDClass(this=0x000000084faf28c0, pWindow=0x00000008753c1c00) at XWaylandManager.cpp:117:24
    frame #5: 0x000000000049df55 Hyprland`CWindow::createToplevelHandle(this=0x00000008753c1c00) at Window.cpp:134:88
    frame #6: 0x0000000000402576 Hyprland`Events::listener_mapWindow(owner=0x00000008753c1c00, data=0x000000084fc1ee00) at Windows.cpp:70:14
    frame #7: 0x00000000003ac80b Hyprland`decltype(std::declval<void (*&)(void*, void*)>()(std::declval<void*>(), std::declval<void*>())) std::__1::__invoke[abi:v160000]<void (*&)(void*, void*), void*, void*>(__f=0x00000008753c1cb8, __args=0x000000082127f6c0, __args=0x000000082127f6b8) at invoke.h:394:23
    frame #8: 0x00000000003ac7b5 Hyprland`void std::__1::__invoke_void_return_wrapper<void, true>::__call<void (*&)(void*, void*), void*, void*>(__args=0x00000008753c1cb8, __args=0x000000082127f6c0, __args=0x000000082127f6b8) at invoke.h:487:9
    frame #9: 0x00000000003ac77d Hyprland`std::__1::__function::__alloc_func<void (*)(void*, void*), std::__1::allocator<void (*)(void*, void*)>, void (void*, void*)>::operator()[abi:v160000](this=0x00000008753c1cb8, __arg=0x000000082127f6c0, __arg=0x000000082127f6b8) at function.h:185:16
    frame #10: 0x00000000003ab949 Hyprland`std::__1::__function::__func<void (*)(void*, void*), std::__1::allocator<void (*)(void*, void*)>, void (void*, void*)>::operator()(this=0x00000008753c1cb0, __arg=0x000000082127f6c0, __arg=0x000000082127f6b8) at function.h:356:12
    frame #11: 0x0000000000528112 Hyprland`std::__1::__function::__value_func<void (void*, void*)>::operator()[abi:v160000](this=0x00000008753c1cb0, __args=0x000000082127f6c0, __args=0x000000082127f6b8) const at function.h:510:16
    frame #12: 0x0000000000527cc3 Hyprland`std::__1::function<void (void*, void*)>::operator()(this= Function = Events::listener_mapWindow(void*, void*) , __arg=0x00000008753c1c00, __arg=0x000000084fc1ee00) const at function.h:1156:12
    frame #13: 0x00000000005277d8 Hyprland`CHyprWLListener::emit(this=0x00000008753c1c80, data=0x000000084fc1ee00) at WLListener.cpp:52:5
    frame #14: 0x00000000005277a9 Hyprland`handleWrapped(listener=0x00000008753c1c80, data=0x000000084fc1ee00) at WLListener.cpp:9:21
    frame #15: 0x0000000823d8ee2a libwayland-server.so.0`wl_signal_emit_mutable(signal=0x000000084fc1efe0, data=0x000000084fc1ee00) at wayland-server.c:2179:3
    frame #16: 0x00000000005e83fe Hyprland`xwayland_surface_set_mapped(xsurface=0x000000084fc1ee00, mapped=true) at xwm.c:852:3
    frame #17: 0x00000000005eb70f Hyprland`xwayland_surface_handle_commit(listener=0x000000084fc1ee78, data=0x000000084fb57480) at xwm.c:863:2
    frame #18: 0x0000000823d8ee2a libwayland-server.so.0`wl_signal_emit_mutable(signal=0x000000084fb57748, data=0x000000084fb57480) at wayland-server.c:2179:3
    frame #19: 0x00000000005aba86 Hyprland`surface_commit_state(surface=0x000000084fb57480, next=0x000000084fb57600) at wlr_compositor.c:500:2
    frame #20: 0x00000000005ad207 Hyprland`surface_handle_commit(client=0x000000088c4f62c0, resource=0x00000008754cf080) at wlr_compositor.c:519:3
    frame #21: 0x00000008371d861a libffi.so.8`ffi_call_unix64 at unix64.S:104
    frame #22: 0x00000008371d78b2 libffi.so.8`ffi_call_int(cif=0x000000082127fa40, fn=(Hyprland`surface_handle_commit at wlr_compositor.c:510), rvalue=0x0000000000000000, avalue=0x000000082127fa70, closure=0x0000000000000000) at ffi64.c:673:3
    frame #23: 0x00000008371d7422 libffi.so.8`ffi_call(cif=0x000000082127fa40, fn=(Hyprland`surface_handle_commit at wlr_compositor.c:510), rvalue=0x0000000000000000, avalue=0x000000082127fa70) at ffi64.c:710:3
    frame #24: 0x0000000823d94aa8 libwayland-server.so.0`wl_closure_invoke(closure=0x000000088c57ce00, flags=2, target=0x00000008754cf080, opcode=6, data=0x000000088c4f62c0) at connection.c:1025:2
    frame #25: 0x0000000823d8c6dd libwayland-server.so.0`wl_client_connection_data(fd=23, mask=1, data=0x000000088c4f62c0) at wayland-server.c:437:4
    frame #26: 0x0000000823d908c7 libwayland-server.so.0`wl_event_source_fd_dispatch(source=0x000000084fbabf00, ep=0x000000082127fcf0) at event-loop.c:112:9
    frame #27: 0x0000000823d91fd4 libwayland-server.so.0`wl_event_loop_dispatch(loop=0x000000084fb2b320, timeout=-1) at event-loop.c:1027:4
    frame #28: 0x0000000823d8dc6f libwayland-server.so.0`wl_display_run(display=0x000000084fb7e000) at wayland-server.c:1431:3
    frame #29: 0x0000000000472c48 Hyprland`CCompositor::startCompositor(this=0x000000084fb54380) at Compositor.cpp:419:5
    frame #30: 0x00000000003e7a77 Hyprland`main(argc=1, argv=0x00000008212801b8) at main.cpp:65:20
    frame #31: 0x0000000000332000 Hyprland`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1_c.c:75:7
(lldb) f 4
frame #4: 0x00000000003ddc13 Hyprland`CHyprXWaylandManager::getAppIDClass(this=0x000000084faf28c0, pWindow=0x00000008753c1c00) at XWaylandManager.cpp:117:24
   114                  if (!pWindow->m_bMappedX11 || !pWindow->m_bIsMapped)
   115                      return "unmanaged X11";
   116
-> 117                  return std::string(pWindow->m_uSurface.xwayland->_class);
   118              }
   119          } else if (pWindow->m_uSurface.xdg) {
   120              if (pWindow->m_uSurface.xdg->toplevel) {
(lldb) p *pWindow->m_uSurface.xwayland
(wlr_xwayland_surface) $1 = {
  window_id = 4194306
  xwm = 0x000000087560a400
  surface_id = 0
  serial = 1
  link = {
    prev = 0x000000087560a608
    next = 0x000000087560a608
  }
  stack_link = {
    prev = 0x000000087560a618
    next = 0x000000087560a618
  }
  unpaired_link = {
    prev = 0x000000084fc1ee40
    next = 0x000000084fc1ee40
  }
  surface = 0x000000084fb57480
  surface_addon = {
    impl = 0x00000000005f63f8
    owner = 0x0000000000000000
    link = {
      prev = 0x000000084fb57788
      next = 0x00000008755cf190
    }
  }
  surface_commit = {
    link = {
      prev = 0x000000084fb57748
      next = 0x000000082127f830
    }
    notify = 0x00000000005eb6d0 (Hyprland`xwayland_surface_handle_commit at xwm.c:860)
  }
  surface_precommit = {
    link = {
      prev = 0x000000082127f830
      next = 0x000000082127f818
    }
    notify = 0x00000000005eb720 (Hyprland`xwayland_surface_handle_precommit at xwm.c:866)
  }
  x = 0
  y = 0
  width = 300
  height = 300
  saved_width = 0
  saved_height = 0
  override_redirect = false
  mapped = true
  title = 0x000000087564eea0 "glxgears"
  _class = 0x0000000000000000
  instance = 0x0000000000000000
  role = 0x0000000000000000
  startup_id = 0x0000000000000000
  pid = 3872
  has_utf8_title = false
  children = {
    prev = 0x000000084fc1eee8
    next = 0x000000084fc1eee8
  }
  parent = nullptr
  parent_link = {
    prev = 0x000000084fc1ef00
    next = 0x000000084fc1ef00
  }
  window_type = 0x0000000000000000
  window_type_len = 0
  protocols = 0x0000000000000000
  protocols_len = 0
  decorations = 0
  hints = nullptr
  size_hints = 0x00000008748d0c90
  pinging = false
  ping_timer = 0x00000008755cf100
  modal = false
  fullscreen = false
  maximized_vert = false
  maximized_horz = false
  minimized = false
  has_alpha = false
  events = {
    destroy = {
      listener_list = {
        prev = 0x00000008753c1d80
        next = 0x00000008753c1d80
      }
    }
    request_configure = {
      listener_list = {
        prev = 0x000000084fc1ef70
        next = 0x000000084fc1ef70
      }
    }
    request_move = {
      listener_list = {
        prev = 0x000000084fc1ef80
        next = 0x000000084fc1ef80
      }
    }
    request_resize = {
      listener_list = {
        prev = 0x000000084fc1ef90
        next = 0x000000084fc1ef90
      }
    }
    request_minimize = {
      listener_list = {
        prev = 0x000000084fc1efa0
        next = 0x000000084fc1efa0
      }
    }
    request_maximize = {
      listener_list = {
        prev = 0x000000084fc1efb0
        next = 0x000000084fc1efb0
      }
    }
    request_fullscreen = {
      listener_list = {
        prev = 0x000000084fc1efc0
        next = 0x000000084fc1efc0
      }
    }
    request_activate = {
      listener_list = {
        prev = 0x000000084fc1efd0
        next = 0x000000084fc1efd0
      }
    }
    map = {
      listener_list = {
        prev = 0x000000082127f758
        next = 0x00000008753c1c80
      }
    }
    unmap = {
      listener_list = {
        prev = 0x00000008753c1d00
        next = 0x00000008753c1d00
      }
    }
    set_title = {
      listener_list = {
        prev = 0x000000084fc1f000
        next = 0x000000084fc1f000
      }
    }
    set_class = {
      listener_list = {
        prev = 0x000000084fc1f010
        next = 0x000000084fc1f010
      }
    }
    set_role = {
      listener_list = {
        prev = 0x000000084fc1f020
        next = 0x000000084fc1f020
      }
    }
    set_parent = {
      listener_list = {
        prev = 0x000000084fc1f030
        next = 0x000000084fc1f030
      }
    }
    set_pid = {
      listener_list = {
        prev = 0x000000084fc1f040
        next = 0x000000084fc1f040
      }
    }
    set_startup_id = {
      listener_list = {
        prev = 0x000000084fc1f050
        next = 0x000000084fc1f050
      }
    }
    set_window_type = {
      listener_list = {
        prev = 0x000000084fc1f060
        next = 0x000000084fc1f060
      }
    }
    set_hints = {
      listener_list = {
        prev = 0x000000084fc1f070
        next = 0x000000084fc1f070
      }
    }
    set_decorations = {
      listener_list = {
        prev = 0x000000084fc1f080
        next = 0x000000084fc1f080
      }
    }
    set_override_redirect = {
      listener_list = {
        prev = 0x000000084fc1f090
        next = 0x000000084fc1f090
      }
    }
    set_geometry = {
      listener_list = {
        prev = 0x000000084fc1f0a0
        next = 0x000000084fc1f0a0
      }
    }
    ping_timeout = {
      listener_list = {
        prev = 0x000000084fc1f0b0
        next = 0x000000084fc1f0b0
      }
    }
  }
  data = 0x0000000000000000
}
GCC backtrace
$ export CC=gcc CXX=g++ CXXFLAGS=-stdlib=libc++
$ meson setup /tmp/hyprland_build
$ meson compile -C /tmp/hyprland_build
$ meson install -C /tmp/hyprland_build 

$ Hyprland -c /dev/null &
$ DISPLAY=:0 glxgears
[...]
00:00:08.395 [xwayland/server.c:108] Starting Xwayland on :0
New XWayland Surface created (class (null)).
Registered signal for owner dfcdc00: 2d34fe0 -> dfcdc80 (owner: XWayland Window)
Registered signal for owner dfcdc00: 2d34ff0 -> dfcdd00 (owner: XWayland Window)
Registered signal for owner dfcdc00: 2d34f60 -> dfcdd80 (owner: XWayland Window)
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
(EE) failed to read Wayland events: Broken pipe
XIO:  fatal IO error 2 (No such file or directory) on X server ":0"
      after 41 requests (41 known processed) with 0 events remaining.
[1]   Segmentation fault      Hyprland

(gdb) bt
#0  0x00000008019c7e84 in strlen () at /lib/libc.so.7
#1  0x000000000041a36c in std::__1::__constexpr_strlen[abi:v160000](char const*) (__str=0x0)
    at /usr/include/c++/v1/cstring:114
#2  std::__1::char_traits<char>::length(char const*) (__s=0x0)
    at /usr/include/c++/v1/__string/char_traits.h:220
#3  0x00000000005d67ef in _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC4B7v160000IDnEEPKc
    (__s=0x0, this=0x7fffffff1630) at /usr/include/c++/v1/string:882
#4  CHyprXWaylandManager::getAppIDClass(CWindow*) (this=0x802c088c0, pWindow=0x80dfcdc00) at ../src/managers/XWaylandManager.cpp:117
#5  0x00000000008e5699 in CWindow::createToplevelHandle() (this=0x80dfcdc00) at ../src/Window.cpp:134
#6  0x0000000000629b39 in Events::listener_mapWindow(void*, void*) (owner=0x80dfcdc00, data=0x802d34e00)
    at ../src/events/Windows.cpp:70
#7  0x000000000059f0c0 in std::__1::__invoke[abi:v160000]<void (*&)(void*, void*), void*, void*>(void (*&)(void*, void*), void*&&, void*&&) (__f=@0x80dfcdcb8: 0x6289ca <Events::listener_mapWindow(void*, void*)>)
    at /usr/include/c++/v1/__functional/invoke.h:394
#8  std::__1::__invoke_void_return_wrapper<void, true>::__call<void (*&)(void*, void*), void*, void*>(void (*&)(void*, void*), void*&&, void*&&) () at /usr/include/c++/v1/__functional/invoke.h:487
#9  0x000000000059efe0 in std::__1::__function::__alloc_func<void (*)(void*, void*), std::__1::allocator<void (*)(void*, void*)>, void (void*, void*)>::operator()[abi:v160000](void*&&, void*&&)
    (__arg#1=@0x7fffffffb108: 0x802d34e00, __arg#0=@0x7fffffffb110: 0x80dfcdc00, this=0x80dfcdcb8)
    at /usr/include/c++/v1/__functional/function.h:185
#10 std::__1::__function::__func<void (*)(void*, void*), std::__1::allocator<void (*)(void*, void*)>, void (void*, void*)>::operator()(void*&&, void*&&) (this=0x80dfcdcb0, __arg#0=@0x7fffffffb110: 0x80dfcdc00, __arg#1=@0x7fffffffb108: 0x802d34e00)
    at /usr/include/c++/v1/__functional/function.h:356
#11 0x0000000000c4da05 in std::__1::__function::__value_func<void (void*, void*)>::operator()[abi:v160000](void*&&, void*&&) const
    (__args#1=@0x7fffffffb108: 0x802d34e00, __args#0=@0x7fffffffb110: 0x80dfcdc00, this=0x80dfcdcb0)
    at /usr/include/c++/v1/__functional/function.h:510
#12 std::__1::function<void (void*, void*)>::operator()(void*, void*) const
    (this=0x80dfcdcb0, __arg#0=0x80dfcdc00, __arg#1=0x802d34e00)
    at /usr/include/c++/v1/__functional/function.h:1156
#13 0x0000000000c4d355 in CHyprWLListener::emit(void*) (this=0x80dfcdc80, data=0x802d34e00) at ../src/helpers/WLListener.cpp:52
#14 0x0000000000c4cce3 in handleWrapped(wl_listener*, void*) (listener=0x80dfcdc80, data=0x802d34e00)
    at ../src/helpers/WLListener.cpp:9
#15 0x00000008010cfe2a in wl_signal_emit_mutable (signal=0x802d34fe0, data=0x802d34e00) at ../src/wayland-server.c:2179
#16 0x0000000000d9f581 in xwayland_surface_set_mapped (xsurface=0x802d34e00, mapped=true) at ../subprojects/wlroots/xwayland/xwm.c:852
#17 0x0000000000d9f5f3 in xwayland_surface_handle_commit (listener=0x802d34e78, data=0x802c6d480)
    at ../subprojects/wlroots/xwayland/xwm.c:863
#18 0x00000008010cfe2a in wl_signal_emit_mutable (signal=0x802c6d748, data=0x802c6d480) at ../src/wayland-server.c:2179
#19 0x0000000000d6c837 in surface_commit_state (surface=0x802c6d480, next=0x802c6d600)
    at ../subprojects/wlroots/types/wlr_compositor.c:500
#20 0x0000000000d6c8ed in surface_handle_commit (client=0x810c552c0, resource=0x810c24f80)
    at ../subprojects/wlroots/types/wlr_compositor.c:519
#21 0x0000000801c9b61a in ffi_call_unix64 () at ../src/x86/unix64.S:104
#22 0x0000000801c9a8b2 in ffi_call_int
    (cif=0x7fffffffb4d0, fn=0xd6c85c <surface_handle_commit>, rvalue=0x0, avalue=0x7fffffffb500, closure=0x0) at ../src/x86/ffi64.c:673
#23 0x0000000801c9a422 in ffi_call (cif=0x7fffffffb4d0, fn=0xd6c85c <surface_handle_commit>, rvalue=0x0, avalue=0x7fffffffb500)
    at ../src/x86/ffi64.c:710
#24 0x00000008010d5aa8 in wl_closure_invoke (closure=0x810d51ee0, flags=2, target=0x810c24f80, opcode=6, data=0x810c552c0)
    at ../src/connection.c:1025
#25 0x00000008010cd6dd in wl_client_connection_data (fd=24, mask=1, data=0x810c552c0) at ../src/wayland-server.c:437
#26 0x00000008010d18c7 in wl_event_source_fd_dispatch (source=0x802cc1f00, ep=0x7fffffffb780) at ../src/event-loop.c:112
#27 0x00000008010d2fd4 in wl_event_loop_dispatch (loop=0x802c41320, timeout=-1) at ../src/event-loop.c:1027
#28 0x00000008010cec6f in wl_display_run (display=0x802c94000) at ../src/wayland-server.c:1431
#29 0x00000000007c1435 in CCompositor::startCompositor() (this=0x802c6a380) at ../src/Compositor.cpp:419
#30 0x00000000005ec5b9 in main(int, char**) (argc=1, argv=0x7fffffffea28) at ../src/main.cpp:65
(gdb) f 4
#4  CHyprXWaylandManager::getAppIDClass (this=0x802c088c0, pWindow=0x80dfcdc00) at ../src/managers/XWaylandManager.cpp:117
117                     return std::string(pWindow->m_uSurface.xwayland->_class);
(gdb) p *pWindow->m_uSurface.xwayland
$1 = {window_id = 4194306, xwm = 0x80e216400, surface_id = 0, serial = 1, link = {prev = 0x80e216608, next = 0x80e216608},
  stack_link = {prev = 0x80e216618, next = 0x80e216618}, unpaired_link = {prev = 0x802d34e40, next = 0x802d34e40},
  surface = 0x802c6d480, surface_addon = {impl = 0x1081d70 <surface_addon_impl>, owner = 0x0, link = {prev = 0x802c6d788,
      next = 0x80e1db310}}, surface_commit = {link = {prev = 0x802c6d748, next = 0x7fffffffb2c0},
    notify = 0xd9f5b2 <xwayland_surface_handle_commit>}, surface_precommit = {link = {prev = 0x7fffffffb2c0, next = 0x7fffffffb2a8},
    notify = 0xd9f5f6 <xwayland_surface_handle_precommit>}, x = 0, y = 0, width = 300, height = 300, saved_width = 0,
  saved_height = 0, override_redirect = false, mapped = true, title = 0x80e24a850 "glxgears", _class = 0x0, instance = 0x0,
  role = 0x0, startup_id = 0x0, pid = 10331, has_utf8_title = false, children = {prev = 0x802d34ee8, next = 0x802d34ee8},
  parent = 0x0, parent_link = {prev = 0x802d34f00, next = 0x802d34f00}, window_type = 0x0, window_type_len = 0, protocols = 0x0,
  protocols_len = 0, decorations = 0, hints = 0x0, size_hints = 0x80dcbec90, pinging = false, ping_timer = 0x80e1db280, modal = false,
  fullscreen = false, maximized_vert = false, maximized_horz = false, minimized = false, has_alpha = false, events = {destroy = {
      listener_list = {prev = 0x80dfcdd80, next = 0x80dfcdd80}}, request_configure = {listener_list = {prev = 0x802d34f70,
        next = 0x802d34f70}}, request_move = {listener_list = {prev = 0x802d34f80, next = 0x802d34f80}}, request_resize = {
      listener_list = {prev = 0x802d34f90, next = 0x802d34f90}}, request_minimize = {listener_list = {prev = 0x802d34fa0,
        next = 0x802d34fa0}}, request_maximize = {listener_list = {prev = 0x802d34fb0, next = 0x802d34fb0}}, request_fullscreen = {
      listener_list = {prev = 0x802d34fc0, next = 0x802d34fc0}}, request_activate = {listener_list = {prev = 0x802d34fd0,
        next = 0x802d34fd0}}, map = {listener_list = {prev = 0x7fffffffb1e8, next = 0x80dfcdc80}}, unmap = {listener_list = {
        prev = 0x80dfcdd00, next = 0x80dfcdd00}}, set_title = {listener_list = {prev = 0x802d35000, next = 0x802d35000}}, set_class = {
      listener_list = {prev = 0x802d35010, next = 0x802d35010}}, set_role = {listener_list = {prev = 0x802d35020,
        next = 0x802d35020}}, set_parent = {listener_list = {prev = 0x802d35030, next = 0x802d35030}}, set_pid = {listener_list = {
        prev = 0x802d35040, next = 0x802d35040}}, set_startup_id = {listener_list = {prev = 0x802d35050, next = 0x802d35050}},
    set_window_type = {listener_list = {prev = 0x802d35060, next = 0x802d35060}}, set_hints = {listener_list = {prev = 0x802d35070,
        next = 0x802d35070}}, set_decorations = {listener_list = {prev = 0x802d35080, next = 0x802d35080}}, set_override_redirect = {
      listener_list = {prev = 0x802d35090, next = 0x802d35090}}, set_geometry = {listener_list = {prev = 0x802d350a0,
        next = 0x802d350a0}}, ping_timeout = {listener_list = {prev = 0x802d350b0, next = 0x802d350b0}}}, data = 0x0}
@jbeich jbeich added the bug Something isn't working label Feb 3, 2023
@vaxerski
Copy link
Member

vaxerski commented Feb 3, 2023

patch.txt

try this patch

@jbeich
Copy link
Contributor Author

jbeich commented Feb 3, 2023

I confirm, after applying the patch X11 apps no longer crash Hyprland. Tested at least glxgears, vkcube-xcb, glmark2, rpcs3, firefox.

@jbeich
Copy link
Contributor Author

jbeich commented Feb 3, 2023

It also fixes crash with Wayland apps like vkcube-wayland which don't set app_id.

@vaxerski
Copy link
Member

vaxerski commented Feb 3, 2023

yeah. Fixed.

gnu c++ just throws an std::logic_error on attempting to init std::string with a nullptr thats why the try catch.

@vaxerski vaxerski closed this as completed Feb 3, 2023
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

2 participants