djpohly / dwl

dwm for Wayland - ARCHIVE: development has moved to Codeberg
https://codeberg.org/dwl/dwl
Other
1.93k stars 283 forks source link

segfault when opening xdg clients on wlroots commit bd5c4f4a #479

Closed fictitiousexistence closed 11 months ago

fictitiousexistence commented 1 year ago

Info

dwl version: wlroots-next wlroots version: git commit bd5c4f4a https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/bd5c4f4a4a79743df77db40d18eb32686312f320

Description

Howdy!

I ran into an issue after updating wlroots to the latest git version where dwl crashes when opening just about any program (I can open bemenu).

The only output I see is:

BUG In pixman_region32_init_rect: Invalid rectangle passed Set a breakpoint on '_pixman_log_error' to debug

I started going backwards and recompiling wlroots with the different recent commits. I landed on commit e5300c22 being the last one that dwl works on and commit bd5c4f4a is where things break.

I did test this with a fresh unaltered pull of the wlroots-next :)

Lemme know if I can do anything to troubleshoot, cause I dunno where to start :D

Thanks.

fictitiousexistence commented 1 year ago

Oh, forgot to mention Hyprland does not have any issue with the latest wlroots commit.

sevz17 commented 1 year ago

Please attach a backtrace, if possible also enable debug symbols on wlroots.

fictitiousexistence commented 1 year ago

@sevz17 Never done this before so not 100% sure I did it all right. But I recompiled wlroots & dwl with the -ggdb flag and used gdb.

I ran gdb dwl then run -s librewolf-bin <&- The output I got was:

WL-1 floating
WL-1 selmon 0
WL-1 tags 0 1 0 0
WL-1 layout
[Detaching after fork from child process 30251]

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
0x00007ffff7f1f7da in wlr_xdg_toplevel_set_wm_capabilities () from /usr/lib64/libwlroots.so.12
fictitiousexistence commented 1 year ago

Ran the same thing again after compiling wayland with debug and then ran bt.

(gdb) bt
#0  0x00007ffff7f1f7da in wlr_xdg_toplevel_set_wm_capabilities (toplevel=0x5555558a26b0, caps=4)
    at ../wlroots-9999/types/xdg_shell/wlr_xdg_toplevel.c:604
#1  0x000055555555e335 in createnotify ()
#2  0x00007ffff7ea0a0c in wl_signal_emit_mutable (signal=<optimized out>, data=data@entry=0x5555558e7640)
    at ../wayland-9999/src/wayland-server.c:2243
#3  0x00007ffff7f1e0a2 in xdg_surface_role_commit (wlr_surface=0x5555558e7290)
    at ../wlroots-9999/types/xdg_shell/wlr_xdg_surface.c:309
#4  0x00007ffff7f21628 in surface_commit_state (surface=0x5555558e7290, next=0x5555558e7410)
    at ../wlroots-9999/types/wlr_compositor.c:496
#5  0x00007ffff796d0aa in ffi_call_unix64 () at /var/tmp/portage/dev-libs/libffi-3.4.4-r1/work/libffi-3.4.4/src/x86/unix64.S:104
#6  0x00007ffff796c56b in ffi_call_int (cif=cif@entry=0x7fffffffd700, fn=fn@entry=0x7ffff7f21980 <surface_handle_commit>,
    rvalue=<optimized out>, rvalue@entry=0x0, avalue=<optimized out>, closure=closure@entry=0x0)
    at /var/tmp/portage/dev-libs/libffi-3.4.4-r1/work/libffi-3.4.4/src/x86/ffi64.c:673
#7  0x00007ffff796cc3d in ffi_call (cif=cif@entry=0x7fffffffd700, fn=0x7ffff7f21980 <surface_handle_commit>,
    rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fffffffd7d0)
    at /var/tmp/portage/dev-libs/libffi-3.4.4-r1/work/libffi-3.4.4/src/x86/ffi64.c:710
#8  0x00007ffff7ea4a11 in wl_closure_invoke (closure=0x5555558e0a90, flags=<optimized out>, target=<optimized out>, opcode=6,
    data=<optimized out>) at ../wayland-9999/src/connection.c:1025
#9  0x00007ffff7e9fc3a in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0x5555558e0c90)
    at ../wayland-9999/src/wayland-server.c:438
#10 0x00007ffff7ea2a52 in wl_event_loop_dispatch (loop=0x555555568450, timeout=<optimized out>, timeout@entry=-1)
    at ../wayland-9999/src/event-loop.c:1104
#11 0x00007ffff7ea0445 in wl_display_run (display=0x555555568360) at ../wayland-9999/src/wayland-server.c:1493
#12 0x000055555555b6cb in main ()
sevz17 commented 1 year ago

Oh, can you run grep wlr_xdg_shell_create dwl.c?, it should be at least

fictitiousexistence commented 1 year ago

@sevz17

Did your sentence get cut off?

λ › grep -n wlr_xdg_shell_create dwl.c                                                                    dwlfresh/dwl wlroots-next
2263:   xdg_shell = wlr_xdg_shell_create(dpy, 6);
sevz17 commented 1 year ago

Did your sentence get cut off?

Oh, looks like I was more asleep than I thought :).

λ › grep -n wlr_xdg_shell_create dwl.c                                                                    dwlfresh/dwl wlroots-next
2263: xdg_shell = wlr_xdg_shell_create(dpy, 6);

This is pretty strange, I think the backtrace you sent is about an assertion failed about the xdg_shell version not being high enough (at least v5), but it says it has v6.

Can you send another backtrace?, but this time run bt full in gdb.

fictitiousexistence commented 1 year ago

@sevz17 Here you go. Thanks.

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
0x00007ffff7f1f7da in wlr_xdg_toplevel_set_wm_capabilities () from /usr/lib64/libwlroots.so.12
(gdb)
(gdb) bt full
#0  0x00007ffff7f1f7da in wlr_xdg_toplevel_set_wm_capabilities () from /usr/lib64/libwlroots.so.12
No symbol table info available.
#1  0x000055555555e869 in createnotify (listener=<optimized out>, data=0x5555558e61d0) at dwl.c:993
        xdg_surface = 0x5555558e61d0
        c = 0x5555558e6470
        l = 0x0
#2  0x00007ffff7ea0a0c in wl_signal_emit_mutable (signal=<optimized out>, data=0x5555558e61d0) at ../wayland-9999/src/wayland-server.c:2243
        pos = 0x5555555639f0 <_l.19>
        l = 0x5555555639f0 <_l.19>
        cursor = {link = {prev = 0x5555555639f0 <_l.19>, next = 0x7fffffffd4f0}, notify = 0x7ffff7e9e730 <handle_noop>}
        end = {link = {prev = 0x7fffffffd4d0, next = 0x555555632710}, notify = 0x7ffff7e9e730 <handle_noop>}
#3  0x00007ffff7f1e0a2 in xdg_surface_role_commit () from /usr/lib64/libwlroots.so.12
No symbol table info available.
#4  0x00007ffff7f21628 in surface_commit_state () from /usr/lib64/libwlroots.so.12
No symbol table info available.
#5  0x00007ffff796d0aa in ffi_call_unix64 () at /var/tmp/portage/dev-libs/libffi-3.4.4-r1/work/libffi-3.4.4/src/x86/unix64.S:104
No locals.
#6  0x00007ffff796c56b in ffi_call_int (cif=cif@entry=0x7fffffffd7c0, fn=fn@entry=0x7ffff7f21980 <surface_handle_commit>, rvalue=<optimized out>, rvalue@entry=0x0, avalue=<optimized out>,
    closure=closure@entry=0x0) at /var/tmp/portage/dev-libs/libffi-3.4.4-r1/work/libffi-3.4.4/src/x86/ffi64.c:673
        classes = {X86_64_INTEGER_CLASS, 32767, 4294957040, 32767}
        stack = <optimized out>
        argp = <optimized out>
        arg_types = <optimized out>
        gprcount = 2
        ssecount = <optimized out>
        ngpr = 1
        nsse = 0
        i = <optimized out>
        avn = <optimized out>
        flags = <optimized out>
        reg_args = <optimized out>
#7  0x00007ffff796cc3d in ffi_call (cif=cif@entry=0x7fffffffd7c0, fn=0x7ffff7f21980 <surface_handle_commit>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fffffffd890)
    at /var/tmp/portage/dev-libs/libffi-3.4.4-r1/work/libffi-3.4.4/src/x86/ffi64.c:710
        arg_types = 0x7fffffffd7e0
        i = <optimized out>
        nargs = 2
        max_reg_struct_size = <optimized out>
#8  0x00007ffff7ea4a11 in wl_closure_invoke (closure=0x5555558e0a90, flags=<optimized out>, target=<optimized out>, opcode=6, data=<optimized out>) at ../wayland-9999/src/connection.c:1025
        count = 0
        cif = {abi = FFI_UNIX64, nargs = 2, arg_types = 0x7fffffffd7e0, rtype = 0x7ffff796e180 <ffi_type_void>, bytes = 0, flags = 0}
        ffi_types = {0x7ffff796e060 <ffi_type_pointer>, 0x7ffff796e060 <ffi_type_pointer>, 0x7ffff796e0e0 <ffi_type_uint32>, 0x7ffff7cba4cc, 0x21, 0x10, 0x7ffff7df2dc0, 0xe00000001, 0x7fffffffdc50, 0xd8,
          0x555555b230a0, 0xaf60, 0x7ffff7df2c80, 0x0, 0x7ffff7eab2b0 <wl_surface_requests+144>, 0x7ffff7cbbfa4 <calloc+212>, 0x0, 0x555500000000, 0x7ffff7ea737f, 0x7ffff7eab2b0 <wl_surface_requests+144>, 0x0,
          0x5555558e09b0}
        ffi_args = {0x7fffffffd7a0, 0x7fffffffd7a8, 0x5555558e0aa8, 0xb05dcf48f9123700, 0x5555558a1520, 0x8, 0x5555558e0b60, 0x0, 0x8, 0x7ffff7ea42d3 <wl_connection_demarshal+163>, 0x5555558e0a90,
          0x5555558e1210, 0x5555558e0b60, 0x8ffffff88, 0x558e0b6c, 0x7ffff7eab2b0 <wl_surface_requests+144>, 0x5555558e09b0, 0x7ffff7ea4729 <wl_closure_lookup_objects+57>, 0x5555558e3220,
          0x7ffff7e9e780 <log_closure+64>, 0x7ffff7eab2b0 <wl_surface_requests+144>, 0x558e0980}
        implementation = <optimized out>
#9  0x00007ffff7e9fc3a in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0x5555558e0980) at ../wayland-9999/src/wayland-server.c:438
        client = <optimized out>
        connection = 0x5555558e1210
--Type <RET> for more, q to quit, c to continue without paging--
        resource = 0x5555558a1520
        object = 0x5555558a1520
        closure = 0x5555558e0a90
        message = 0x7ffff7eab2b0 <wl_surface_requests+144>
        p = {19, 524294}
        resource_flags = <optimized out>
        opcode = 6
        size = <optimized out>
        since = <optimized out>
        len = <optimized out>
#10 0x00007ffff7ea2a52 in wl_event_loop_dispatch (loop=0x555555567450, timeout=<optimized out>, timeout@entry=-1) at ../wayland-9999/src/event-loop.c:1104
        ep = {{events = 1, data = {ptr = 0x55555589c0e0, fd = 1435091168, u32 = 1435091168, u64 = 93824995672288}}, {events = 0, data = {ptr = 0xa30, fd = 2608, u32 = 2608, u64 = 2608}}, {events = 4178720512,
            data = {ptr = 0xf7e9e730b05dcf48, fd = -1336029368, u32 = 2958937928, u64 = 17864063593245167432}}, {events = 32767, data = {ptr = 0x124, fd = 292, u32 = 292, u64 = 292}}, {events = 4294958128,
            data = {ptr = 0x558e121000007fff, fd = 32767, u32 = 32767, u64 = 6164884799845597183}}, {events = 21845, data = {ptr = 0x7fffffffdb10, fd = -9456, u32 = 4294957840, u64 = 140737488345872}}, {
            events = 1, data = {ptr = 0x558e221800000000, fd = 0, u32 = 0, u64 = 6164902426391347200}}, {events = 21845, data = {ptr = 0x7ffff7ea32ea <wl_connection_flush+378>, fd = -135646486, u32 = 4159320810,
              u64 = 140737352708842}}, {events = 4294958032, data = {ptr = 0xffffdb5000000cec, fd = 3308, u32 = 3308, u64 = 18446703735376710892}}, {events = 32767, data = {ptr = 0x5555558e4228, fd = 1435386408,
              u32 = 1435386408, u64 = 93824995967528}}, {events = 292, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 4294957904, data = {
              ptr = 0x100007fff, fd = 32767, u32 = 32767, u64 = 4295000063}}, {events = 0, data = {ptr = 0x7fffffffdb70, fd = -9360, u32 = 4294957936, u64 = 140737488345968}}, {events = 20, data = {ptr = 0x0,
              fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0xb05dcf48f9123700, fd = -116246784, u32 = 4178720512, u64 = 12708541635832723200}}, {events = 1435381508, data = {ptr = 0x12400005555,
              fd = 21845, u32 = 21845, u64 = 1254130472277}}, {events = 0, data = {ptr = 0x1, fd = 1, u32 = 1, u64 = 1}}, {events = 4159751416, data = {ptr = 0x1400007fff, fd = 32767, u32 = 32767,
              u64 = 85899378687}}, {events = 0, data = {ptr = 0x100000001, fd = 1, u32 = 1, u64 = 4294967297}}, {events = 36, data = {ptr = 0x558958f040590000, fd = 1079574528, u32 = 1079574528,
              u64 = 6163555353928204288}}, {events = 21845, data = {ptr = 0x555555632a40, fd = 1432562240, u32 = 1432562240, u64 = 93824993143360}}, {events = 0, data = {ptr = 0x40590000, fd = 1079574528,
              u32 = 1079574528, u64 = 1079574528}}, {events = 1079574528, data = {ptr = 0x7ffff7f238f8 <cursor_warp_unchecked+216>, fd = -135120648, u32 = 4159846648, u64 = 140737353234680}}, {events = 0,
            data = {ptr = 0x40590000, fd = 1079574528, u32 = 1079574528, u64 = 1079574528}}, {events = 1079574528, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x40590000,
              fd = 1079574528, u32 = 1079574528, u64 = 1079574528}}, {events = 1079574528, data = {ptr = 0xb05dcf48f9123700, fd = -116246784, u32 = 4178720512, u64 = 12708541635832723200}}, {events = 1432560544,
            data = {ptr = 0x55632a4000005555, fd = 21845, u32 = 21845, u64 = 6152807970284524885}}, {events = 21845, data = {ptr = 0x7fffffffdc30, fd = -9168, u32 = 4294958128, u64 = 140737488346160}}, {
            events = 4178720512, data = {ptr = 0xffffdde8b05dcf48, fd = -1336029368, u32 = 2958937928, u64 = 18446706590193930056}}, {events = 32767, data = {ptr = 0x5555558e0980, fd = 1435371904,
              u32 = 1435371904, u64 = 93824995953024}}}
        source = <optimized out>
        i = 0
        count = <optimized out>
        has_timers = <optimized out>
        use_timeout = false
        now = {tv_sec = 1056964608, tv_nsec = 0}
        end = <optimized out>
#11 0x00007ffff7ea0445 in wl_display_run (display=0x555555567360) at ../wayland-9999/src/wayland-server.c:1493
No locals.
#12 0x000055555555fa90 in run (startup_cmd=startup_cmd@entry=0x7fffffffe2ba "wayst") at dwl.c:1992
        socket = 0x5555556333a9 "wayland-1"
#13 0x000055555555fc99 in main (argc=3, argv=0x7fffffffddc8) at dwl.c:2868
        startup_cmd = 0x7fffffffe2ba "wayst"
        c = <optimized out>
fictitiousexistence commented 1 year ago

@sevz17 heyya. Does that debug output look like what you wanted? Thanks.

sevz17 commented 1 year ago

@fictitiousexistence, I'm sorry I completely forgot, thank you for reminding me.

Is it possible to you to send the backtrace with a wlroots build with debug symbols?

and what commit of dwl are you using?

fictitiousexistence commented 1 year ago

@sevz17 Im just running git clone https://github.com/djpohly/dwl.git -b wlroots-next

Does this look any better? I followed https://wiki.gentoo.org/wiki/Debugging to enable debugsymbols/sources on wlroots/wayland/libffi

#0  0x00007ffff7f1f91a in wlr_xdg_toplevel_set_wm_capabilities (toplevel=0x5555558a2590, caps=caps@entry=4)
    at ../wlroots-9999/types/xdg_shell/wlr_xdg_toplevel.c:604
        __PRETTY_FUNCTION__ = "wlr_xdg_toplevel_set_wm_capabilities"
#1  0x000055555555e305 in createnotify (listener=<optimized out>, data=0x5555558e7770) at dwl.c:987
        xdg_surface = <optimized out>
        c = <optimized out>
        l = <optimized out>
#2  0x00007ffff7ea0a0c in wl_signal_emit_mutable (signal=<optimized out>, data=data@entry=0x5555558e7770)
    at ../wayland-9999/src/wayland-server.c:2243
        pos = 0x5555555649d0 <_l.19>
        l = 0x5555555649d0 <_l.19>
        cursor = {link = {prev = 0x5555555649d0 <_l.19>, next = 0x7fffffffd3f0}, notify = 0x7ffff7e9e730 <handle_noop>}
        end = {link = {prev = 0x7fffffffd3d0, next = 0x555555633700}, notify = 0x7ffff7e9e730 <handle_noop>}
#3  0x00007ffff7f1e1e2 in xdg_surface_role_commit (wlr_surface=0x5555558e73c0)
    at ../wlroots-9999/types/xdg_shell/wlr_xdg_surface.c:309
        surface = 0x5555558e7770
        __PRETTY_FUNCTION__ = "xdg_surface_role_commit"
#4  0x00007ffff7f21768 in surface_commit_state (surface=0x5555558e73c0, next=0x5555558e7540)
    at ../wlroots-9999/types/wlr_compositor.c:496
        __PRETTY_FUNCTION__ = "surface_commit_state"
        invalid_buffer = <optimized out>
        subsurface = 0x5555558e75b8
#5  0x00007ffff796d0aa in ffi_call_unix64 () at /usr/src/debug/dev-libs/libffi-3.4.4-r1/libffi-3.4.4/src/x86/unix64.S:104
No locals.
#6  0x00007ffff796c56b in ffi_call_int (cif=cif@entry=0x7fffffffd6c0, fn=fn@entry=0x7ffff7f21ac0 <surface_handle_commit>,
    rvalue=<optimized out>, rvalue@entry=0x0, avalue=<optimized out>, closure=closure@entry=0x0)
    at /usr/src/debug/dev-libs/libffi-3.4.4-r1/libffi-3.4.4/src/x86/ffi64.c:673
        classes = {X86_64_INTEGER_CLASS, 32767, 4294956784, 32767}
        stack = <optimized out>
        argp = <optimized out>
        arg_types = <optimized out>
        gprcount = 2
        ssecount = <optimized out>
        ngpr = 1
        nsse = 0
        i = <optimized out>
        avn = <optimized out>
        flags = <optimized out>
        reg_args = <optimized out>
#7  0x00007ffff796cc3d in ffi_call (cif=cif@entry=0x7fffffffd6c0, fn=0x7ffff7f21ac0 <surface_handle_commit>,
    rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fffffffd790)
    at /usr/src/debug/dev-libs/libffi-3.4.4-r1/libffi-3.4.4/src/x86/ffi64.c:710
        arg_types = 0x7fffffffd6e0
        i = <optimized out>
        nargs = 2
        max_reg_struct_size = <optimized out>
#8  0x00007ffff7ea4a11 in wl_closure_invoke (closure=0x555555a73ff0, flags=<optimized out>, target=<optimized out>, opcode=6,
    data=<optimized out>) at ../wayland-9999/src/connection.c:1025
        count = 0
        cif = {abi = FFI_UNIX64, nargs = 2, arg_types = 0x7fffffffd6e0, rtype = 0x7ffff796e180 <ffi_type_void>, bytes = 0,
          flags = 0}
        ffi_types = {0x7ffff796e060 <ffi_type_pointer>, 0x7ffff796e060 <ffi_type_pointer>, 0x7ffff796e0e0 <ffi_type_uint32>,
          0x7ffff7cba4cc, 0x21, 0x10, 0x555555a73fe0, 0xe00000001, 0x7fffffffdb50, 0xd8, 0x555555b242c0, 0xad40, 0x7ffff7df2c80,
          0x0, 0x7ffff7eab2b0 <wl_surface_requests+144>, 0x7ffff7cbbfa4 <calloc+212>, 0x0, 0x0, 0x7ffff7ea737f,
          0x7ffff7eab2b0 <wl_surface_requests+144>, 0x0, 0x555555a73720}
        ffi_args = {0x7fffffffd6a0, 0x7fffffffd6a8, 0x5555558e1fe8, 0x86642c5e0ecc1f00, 0x5555558a2110, 0x8, 0x555555a740c0, 0x0,
          0x8, 0x7ffff7ea42d3 <wl_connection_demarshal+163>, 0x555555a73ff0, 0x5555558e2750, 0x555555a740c0, 0x8ffffff88,
          0x55a740cc, 0x7ffff7eab2b0 <wl_surface_requests+144>, 0x555555a73720, 0x7ffff7ea4729 <wl_closure_lookup_objects+57>,
          0x5555558e4760, 0x7ffff7e9e780 <log_closure+64>, 0x7ffff7eab2b0 <wl_surface_requests+144>, 0x55a736f0}
        implementation = <optimized out>
#9  0x00007ffff7e9fc3a in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0x555555a736f0)
    at ../wayland-9999/src/wayland-server.c:438
        client = <optimized out>
        connection = 0x5555558e2750
        resource = 0x5555558a2110
        object = 0x5555558a2110
        closure = 0x555555a73ff0
        message = 0x7ffff7eab2b0 <wl_surface_requests+144>
        p = {19, 524294}
        resource_flags = <optimized out>
        opcode = 6
        size = <optimized out>
        since = <optimized out>
        len = <optimized out>
#10 0x00007ffff7ea2a52 in wl_event_loop_dispatch (loop=0x555555568450, timeout=<optimized out>, timeout@entry=-1)
    at ../wayland-9999/src/event-loop.c:1104
        ep = {{events = 1, data = {ptr = 0x55555589cfa0, fd = 1435094944, u32 = 1435094944, u64 = 93824995676064}}, {events = 0,
            data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 248258304, data = {ptr = 0xf7e9e73086642c5e,
              fd = -2040255394, u32 = 2254711902, u64 = 17864063592540941406}}, {events = 32767, data = {ptr = 0x124, fd = 292,
              u32 = 292, u64 = 292}}, {events = 4294957872, data = {ptr = 0x558e275000007fff, fd = 32767, u32 = 32767,
              u64 = 6164908164467687423}}, {events = 21845, data = {ptr = 0x7fffffffda10, fd = -9712, u32 = 4294957584,
              u64 = 140737488345616}}, {events = 1, data = {ptr = 0x558e375800000000, fd = 0, u32 = 0,
              u64 = 6164925791013437440}}, {events = 21845, data = {ptr = 0x7ffff7ea32ea <wl_connection_flush+378>,
              fd = -135646486, u32 = 4159320810, u64 = 140737352708842}}, {events = 4294957776, data = {ptr = 0xffffda5000000cec,
              fd = 3308, u32 = 3308, u64 = 18446702635865083116}}, {events = 32767, data = {ptr = 0x5555558e5768, fd = 1435391848,
              u32 = 1435391848, u64 = 93824995972968}}, {events = 292, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0,
            data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 4294957648, data = {ptr = 0x100007fff, fd = 32767,
              u32 = 32767, u64 = 4295000063}}, {events = 0, data = {ptr = 0x7fffffffda70, fd = -9616, u32 = 4294957680,
              u64 = 140737488345712}}, {events = 20, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {
              ptr = 0x86642c5e0ecc1f00, fd = 248258304, u32 = 248258304, u64 = 9683913881240215296}}, {events = 1435386948,
            data = {ptr = 0x12400005555, fd = 21845, u32 = 21845, u64 = 1254130472277}}, {events = 0, data = {ptr = 0x1, fd = 1,
              u32 = 1, u64 = 1}}, {events = 4159751992, data = {ptr = 0x1400007fff, fd = 32767, u32 = 32767, u64 = 85899378687}}, {
            events = 0, data = {ptr = 0x100000001, fd = 1, u32 = 1, u64 = 4294967297}}, {events = 36, data = {
              ptr = 0x5589959040590000, fd = 1079574528, u32 = 1079574528, u64 = 6163622011820638208}}, {events = 21845, data = {
              ptr = 0x555555633a30, fd = 1432566320, u32 = 1432566320, u64 = 93824993147440}}, {events = 0, data = {
              ptr = 0x40590000, fd = 1079574528, u32 = 1079574528, u64 = 1079574528}}, {events = 1079574528, data = {
              ptr = 0x7ffff7f23a98 <cursor_warp_unchecked+216>, fd = -135120232, u32 = 4159847064, u64 = 140737353235096}}, {
            events = 0, data = {ptr = 0x40590000, fd = 1079574528, u32 = 1079574528, u64 = 1079574528}}, {events = 1079574528,
            data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x40590000, fd = 1079574528,
              u32 = 1079574528, u64 = 1079574528}}, {events = 1079574528, data = {ptr = 0x86642c5e0ecc1f00, fd = 248258304,
              u32 = 248258304, u64 = 9683913881240215296}}, {events = 0, data = {ptr = 0x55633a3040590000, fd = 1079574528,
              u32 = 1079574528, u64 = 6152825494830645248}}, {events = 21845, data = {ptr = 0x7fffffffdb30, fd = -9424,
              u32 = 4294957872, u64 = 140737488345904}}, {events = 248258304, data = {ptr = 0x55564ca086642c5e, fd = -2040255394,
              u32 = 2254711902, u64 = 6149186593554181214}}, {events = 21845, data = {ptr = 0x555555a736f0, fd = 1437021936,
              u32 = 1437021936, u64 = 93824997603056}}}
        source = <optimized out>
        i = 0
        count = <optimized out>
        has_timers = <optimized out>
        use_timeout = false
        now = {tv_sec = 1056964608, tv_nsec = 0}
        end = <optimized out>
#11 0x00007ffff7ea0445 in wl_display_run (display=0x555555568360) at ../wayland-9999/src/wayland-server.c:1493
No locals.
#12 0x000055555555b69b in run (startup_cmd=0x7fffffffe273 "wayst") at dwl.c:1988
        socket = <optimized out>
        socket = <optimized out>
        piperw = <optimized out>
#13 main (argc=<optimized out>, argv=<optimized out>) at dwl.c:2868
        startup_cmd = <optimized out>
        c = <optimized out>
sevz17 commented 1 year ago

Yeah, that's perfect.

The problem is what I thought, although I don't know why it causes trouble for you and not for me.

sevz17 commented 1 year ago

Can you test this?

diff --git a/client.h b/client.h
index 80152cc..7cbf0e4 100644
--- a/client.h
+++ b/client.h
@@ -358,8 +358,8 @@ client_set_suspended(Client *c, int suspended)
        return;
    }
 #endif
-
-   wlr_xdg_toplevel_set_suspended(c->surface.xdg->toplevel, suspended);
+   if (c->surface.xdg->client->shell->version >= XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION)
+       wlr_xdg_toplevel_set_suspended(c->surface.xdg->toplevel, suspended);
 }

 static inline struct wlr_surface *
diff --git a/dwl.c b/dwl.c
index 4bcd310..1e725ff 100644
--- a/dwl.c
+++ b/dwl.c
@@ -984,8 +984,9 @@ createnotify(struct wl_listener *listener, void *data)
    c->surface.xdg = xdg_surface;
    c->bw = borderpx;

-   wlr_xdg_toplevel_set_wm_capabilities(xdg_surface->toplevel,
-           WLR_XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN);
+   if (xdg_surface->client->shell->version >= XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION)
+       wlr_xdg_toplevel_set_wm_capabilities(xdg_surface->toplevel,
+               WLR_XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN);

    LISTEN(&xdg_surface->surface->events.commit, &c->commit, commitnotify);
    LISTEN(&xdg_surface->surface->events.map, &c->map, mapnotify);
fictitiousexistence commented 1 year ago

Here you go, looked like the same thing?

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault.
0x00007ffff7f207da in wlr_xdg_toplevel_set_wm_capabilities (toplevel=0x5555558a33b0, caps=caps@entry=4) at ../wlroots-9999/types/xdg_shell/wlr_xdg_toplevel.c:604
604     assert(toplevel->base->client->shell->version >=
#0  0x00007ffff7f207da in wlr_xdg_toplevel_set_wm_capabilities (toplevel=0x5555558a33b0, caps=caps@entry=4) at ../wlroots-9999/types/xdg_shell/wlr_xdg_toplevel.c:604
        __PRETTY_FUNCTION__ = "wlr_xdg_toplevel_set_wm_capabilities"
#1  0x000055555555e48e in createnotify (listener=<optimized out>, data=0x5555558e8280) at dwl.c:992
        xdg_surface = <optimized out>
        c = <optimized out>
        l = <optimized out>
#2  0x00007ffff7ea1a0c in wl_signal_emit_mutable (signal=<optimized out>, data=data@entry=0x5555558e8280) at ../wayland-9999/src/wayland-server.c:2243
        pos = 0x5555555649d0 <_l.19>
        l = 0x5555555649d0 <_l.19>
        cursor = {link = {prev = 0x5555555649d0 <_l.19>, next = 0x7fffffffd3f0}, notify = 0x7ffff7e9f730 <handle_noop>}
        end = {link = {prev = 0x7fffffffd3d0, next = 0x555555633e70}, notify = 0x7ffff7e9f730 <handle_noop>}
#3  0x00007ffff7f1f0a2 in xdg_surface_role_commit (wlr_surface=0x5555558e7ed0) at ../wlroots-9999/types/xdg_shell/wlr_xdg_surface.c:309
        surface = 0x5555558e8280
        __PRETTY_FUNCTION__ = "xdg_surface_role_commit"
#4  0x00007ffff7f22628 in surface_commit_state (surface=0x5555558e7ed0, next=0x5555558e8050) at ../wlroots-9999/types/wlr_compositor.c:496
        __PRETTY_FUNCTION__ = "surface_commit_state"
        invalid_buffer = <optimized out>
        subsurface = 0x5555558e80c8
#5  0x00007ffff796e0aa in ffi_call_unix64 () at /usr/src/debug/dev-libs/libffi-3.4.4-r1/libffi-3.4.4/src/x86/unix64.S:104
No locals.
#6  0x00007ffff796d56b in ffi_call_int (cif=cif@entry=0x7fffffffd6c0, fn=fn@entry=0x7ffff7f22980 <surface_handle_commit>, rvalue=<optimized out>, rvalue@entry=0x0, avalue=<optimized out>, closure=closure@entry=0x0) at /usr/src/debug/dev-libs/libffi-3.4.4-r1/libffi-3.4.4/src/x86/ffi64.c:673
        classes = {X86_64_INTEGER_CLASS, 32767, 4294956784, 32767}
        stack = <optimized out>
        argp = <optimized out>
        arg_types = <optimized out>
        gprcount = 2
        ssecount = <optimized out>
        ngpr = 1
        nsse = 0
        i = <optimized out>
        avn = <optimized out>
        flags = <optimized out>
        reg_args = <optimized out>
#7  0x00007ffff796dc3d in ffi_call (cif=cif@entry=0x7fffffffd6c0, fn=0x7ffff7f22980 <surface_handle_commit>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fffffffd790) at /usr/src/debug/dev-libs/libffi-3.4.4-r1/libffi-3.4.4/src/x86/ffi64.c:710
        arg_types = 0x7fffffffd6e0
        i = <optimized out>
        nargs = 2
        max_reg_struct_size = <optimized out>
#8  0x00007ffff7ea5a11 in wl_closure_invoke (closure=0x5555558e7330, flags=<optimized out>, target=<optimized out>, opcode=6, data=<optimized out>) at ../wayland-9999/src/connection.c:1025
        count = 0
        cif = {abi = FFI_UNIX64, nargs = 2, arg_types = 0x7fffffffd6e0, rtype = 0x7ffff796f180 <ffi_type_void>, bytes = 0, flags = 0}
        ffi_types = {0x7ffff796f060 <ffi_type_pointer>, 0x7ffff796f060 <ffi_type_pointer>, 0x7ffff796f0e0 <ffi_type_uint32>, 0x7ffff7cbb4cc, 0x1e, 0x20, 0x7ffff7df3dd0, 0xe00000001, 0x7fffffffdb50, 0xd8, 0x555555b24cb0, 0xa350, 0x7ffff7df3c80, 0x0, 0x7ffff7eac2b0 <wl_surface_requests+144>, 0x7ffff7cbcfa4 <calloc+212>, 0x0, 0x555500000000, 0x7ffff7ea837f, 0x7ffff7eac2b0 <wl_surface_requests+144>, 0x0, 0x5555558942b0}
        ffi_args = {0x7fffffffd6a0, 0x7fffffffd6a8, 0x5555558e7348, 0x10e4a16e2331c900, 0x5555558a2e10, 0x8, 0x5555558e7400, 0x0, 0x8, 0x7ffff7ea52d3 <wl_connection_demarshal+163>, 0x5555558e7330, 0x5555558e27e0, 0x5555558e7400, 0x8ffffff88, 0x558e740c, 0x7ffff7eac2b0 <wl_surface_requests+144>, 0x5555558942b0, 0x7ffff7ea5729 <wl_closure_lookup_objects+57>, 0x5555558e47f0, 0x7ffff7e9f780 <log_closure+64>, 0x7ffff7eac2b0 <wl_surface_requests+144>, 0x55894280}
        implementation = <optimized out>
#9  0x00007ffff7ea0c3a in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0x555555894280) at ../wayland-9999/src/wayland-server.c:438
        client = <optimized out>
        connection = 0x5555558e27e0
        resource = 0x5555558a2e10
        object = 0x5555558a2e10
        closure = 0x5555558e7330
        message = 0x7ffff7eac2b0 <wl_surface_requests+144>
        p = {19, 524294}
        resource_flags = <optimized out>
        opcode = 6
        size = <optimized out>
        since = <optimized out>
        len = <optimized out>
#10 0x00007ffff7ea3a52 in wl_event_loop_dispatch (loop=0x555555568450, timeout=<optimized out>, timeout@entry=-1) at ../wayland-9999/src/event-loop.c:1104
        ep = {{events = 1, data = {ptr = 0x5555558b0fd0, fd = 1435176912, u32 = 1435176912, u64 = 93824995758032}}, {events = 1, data = {ptr = 0x5555558b0fd0, fd = 1435176912, u32 = 1435176912, u64 = 93824995758032}}, {events = 590465280, data = {ptr = 0xf7e9f73010e4a16e, fd = 283418990, u32 = 283418990, u64 = 17864081182755692910}}, {events = 32767, data = {ptr = 0x124, fd = 292, u32 = 292, u64 = 292}}, {events = 4294957872, data = {ptr = 0x558e27e000007fff, fd = 32767, u32 = 32767, u64 = 6164908782942978047}}, {events = 21845, data = {ptr = 0x7fffffffda10, fd = -9712, u32 = 4294957584, u64 = 140737488345616}}, {events = 1, data = {ptr = 0x558e37e800000000, fd = 0, u32 = 0, u64 = 6164926409488728064}}, {events = 21845, data = {ptr = 0x7ffff7ea42ea <wl_connection_flush+378>, fd = -135642390, u32 = 4159324906, u64 = 140737352712938}}, {events = 4294957776, data = {ptr = 0xffffda5000000cec, fd = 3308, u32 = 3308, u64 = 18446702635865083116}}, {events = 32767, data = {ptr = 0x5555558e57f8, fd = 1435391992, u32 = 1435391992, u64 = 93824995973112}}, {events = 292, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 4294957648, data = {ptr = 0x100007fff, fd = 32767, u32 = 32767, u64 = 4295000063}}, {events = 0, data = {ptr = 0x7fffffffda70, fd = -9616, u32 = 4294957680, u64 = 140737488345712}}, {events = 20, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x10e4a16e2331c900, fd = 590465280, u32 = 590465280, u64 = 1217275293705816320}}, {events = 1435387092, data = {ptr = 0x12400005555, fd = 21845, u32 = 21845, u64 = 1254130472277}}, {events = 0, data = {ptr = 0x1, fd = 1, u32 = 1, u64 = 1}}, {events = 4159755512, data = {ptr = 0x1400007fff, fd = 32767, u32 = 32767, u64 = 85899378687}}, {events = 0, data = {ptr = 0x100000001, fd = 1, u32 = 1, u64 = 4294967297}}, {events = 36, data = {ptr = 0x5589a1b040590000, fd = 1079574528, u32 = 1079574528, u64 = 6163635343399124992}}, {events = 21845, data = {ptr = 0x5555556341a0, fd = 1432568224, u32 = 1432568224, u64 = 93824993149344}}, {events = 0, data = {ptr = 0x40590000, fd = 1079574528, u32 = 1079574528, u64 = 1079574528}}, {events = 1079574528, data = {ptr = 0x7ffff7f248f8 <cursor_warp_unchecked+216>, fd = -135116552, u32 = 4159850744, u64 = 140737353238776}}, {events = 0, data = {ptr = 0x40590000, fd = 1079574528, u32 = 1079574528, u64 = 1079574528}}, {events = 1079574528, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x40590000, fd = 1079574528, u32 = 1079574528, u64 = 1079574528}}, {events = 1079574528, data = {ptr = 0x10e4a16e2331c900, fd = 590465280, u32 = 590465280, u64 = 1217275293705816320}}, {events = 0, data = {ptr = 0x556341a040590000, fd = 1079574528, u32 = 1079574528, u64 = 6152833672448376832}}, {events = 21845, data = {ptr = 0x7fffffffdb30, fd = -9424, u32 = 4294957872, u64 = 140737488345904}}, {events = 590465280, data = {ptr = 0x55564ca010e4a16e, fd = 283418990, u32 = 283418990, u64 = 6149186591582888302}}, {events = 21845, data = {ptr = 0x555555894280, fd = 1435058816, u32 = 1435058816, u64 = 93824995639936}}}
        source = <optimized out>
        i = 0
        count = <optimized out>
        has_timers = <optimized out>
        use_timeout = false
        now = {tv_sec = 1056964608, tv_nsec = 0}
        end = <optimized out>
#11 0x00007ffff7ea1445 in wl_display_run (display=0x555555568360) at ../wayland-9999/src/wayland-server.c:1493
No locals.
#12 0x000055555555b69b in run (startup_cmd=0x7fffffffe275 "wayst") at dwl.c:1993
        socket = <optimized out>
        socket = <optimized out>
        piperw = <optimized out>
#13 main (argc=<optimized out>, argv=<optimized out>) at dwl.c:2873
        startup_cmd = <optimized out>
        c = <optimized out>
sevz17 commented 1 year ago

With the diff applied?, yeah it's pretty similar.

Can you run (in gdb):

frame 0
p toplevel->base->client->shell->version
p *toplevel->base->client->shell
p *toplevel->base->client
p *toplevel->base
p toplevel-base
p *toplevel

and send the output?

Also, after seeing the first backtrace, I should have asked you to run the previous commands instead of the ping-pong of messages, sorry. (an assertion failed raises SIGABRT, it not segfaults)

fictitiousexistence commented 1 year ago

@sevz17

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault. 0x00007ffff7f1da0a in wlr_xdg_toplevel_set_wm_capabilities (toplevel=0x55555589d350, caps=caps@entry=4) at ../wlroots-9999/types/xdg_shell/wlr_xdg_toplevel.c:601 601 assert(toplevel->base->client->shell->version >=

0 0x00007ffff7f1da0a in wlr_xdg_toplevel_set_wm_capabilities (toplevel=0x55555589d350, caps=caps@entry=4) at ../wlroots-9999/types/xdg_shell/wlr_xdg_toplevel.c:601

601 assert(toplevel->base->client->shell->version >= Cannot access memory at address 0xfffb2058e9f78950 Cannot access memory at address 0xfffb2058e9f78948 $1 = {shell = 0xfffb2058e9f78948, resource = 0x841f0f, client = 0x468b54478904468b, surfaces = {prev = 0x846b60f5c47890c, next = 0x4810468b48584788}, link = {prev = 0x401f0fc3604789, next = 0x894800000024be55}, ping_serial = 1096106469, ping_timer = 0x83485300000001bf} $2 = {client = 0x7ffff7f1cb40 , resource = 0x7ffff7f1d5d0 , surface = 0x7ffff7f1d4b0 , link = {prev = 0x7ffff7f1d450 , next = 0x7ffff7f1d320 }, role = (unknown: 0xf7f1d210), role_resource = 0x7ffff7f1d0b0 , {toplevel = 0x7ffff7f1d080 , popup = 0x7ffff7f1d080 }, popups = {prev = 0x7ffff7f1d050 , next = 0x7ffff7f1d020 }, added = 240, configured = 207, configure_idle = 0x7ffff7f1cf30 , scheduled_serial = 4159819488, configure_list = {prev = 0x7ffff7f1ceb0 , next = 0x0}, current = {configure_serial = 0, geometry = {x = 0, y = -135143600, width = 32767, height = -135143552}}, pending = {configure_serial = 32767, geometry = {x = 0, y = 0, width = 0, height = 0}}, initialized = false, initial_commit = false, events = {destroy = {listener_list = {prev = 0x0, next = 0x0}}, ping_timeout = {listener_list = {prev = 0x0, next = 0x7ffff7f1e0e0 }}, new_popup = {listener_list = {prev = 0x7ffff7f1e120 , next = 0x0}}, configure = {listener_list = {prev = 0x0, next = 0x0}}, ack_configure = {listener_list = {prev = 0x0, next = 0x0}}}, data = 0x0, client_mapped = 96, role_resource_destroy = {link = {prev = 0x0, next = 0x0}, notify = 0x7ffff7f1e320 }} No symbol "base" in current context. $3 = {resource = 0x7ffff7f9e6a0 , base = 0x7ffff7fa47e0 , parent = 0x11, parent_unmap = {link = {prev = 0x0, next = 0x0}, notify = 0x0}, current = {maximized = 128, fullscreen = 211, resizing = 137, activated = 85, suspended = 85, tiled = 1435095936, width = 21845, height = 1437032576, max_width = 21845, max_height = 1435411632, min_width = 21845, min_height = 2}, pending = {maximized = false, fullscreen = false, resizing = false, activated = false, suspended = false, tiled = 0, width = 1435411592, height = 21845, max_width = 1435411592, max_height = 21845, min_width = 1435096000, min_height = 21845}, scheduled = {fields = 1435096000, maximized = 85, fullscreen = 85, resizing = false, activated = false, suspended = false, tiled = 0, width = 145, height = 0, bounds = {width = 0, height = 0}, wm_capabilities = 0}, requested = {maximized = true, minimized = false, fullscreen = false, fullscreen_output = 0x34, fullscreen_output_destroy = {link = {prev = 0x0, next = 0x0}, notify = 0x1}}, title = 0x24 <error: Cannot access memory at address 0x24>, app_id = 0x55555589bdf0 "", events = {request_maximize = {listener_list = {prev = 0x400000001, next = 0x0}}, request_fullscreen = {listener_list = {prev = 0x0, next = 0x0}}, request_minimize = {listener_list = {prev = 0x0, next = 0x4f}}, request_move = {listener_list = {prev = 0x55555589be80, next = 0x400000001}}, request_resize = {listener_list = {prev = 0x1d1, next = 0x555000dca4ad}}, request_show_window_menu = {listener_list = {prev = 0xd7395486562692fc, next = 0x3138393737626439}}, set_parent = {listener_list = {prev = 0x3531623730623363, next = 0x3232343534656465}}, set_title = {listener_list = {prev = 0x36345f766e610065, next = 0x7fff08003632}}, set_app_id = {listener_list = {prev = 0x0, next = 0x5d03a1d01d7}}}}

fictitiousexistence commented 1 year ago

@sevz17 Whoops, sorry that was with a fresh pull and not with the diff.

Here's with the diff:

Thread 1 "dwl" received signal SIGSEGV, Segmentation fault. 0x00007ffff7f1da0a in wlr_xdg_toplevel_set_wm_capabilities (toplevel=0x5555558a3620, caps=caps@entry=4) at ../wlroots-9999/types/xdg_shell/wlr_xdg_toplevel.c:601 601 assert(toplevel->base->client->shell->version >=

0 0x00007ffff7f1da0a in wlr_xdg_toplevel_set_wm_capabilities (toplevel=0x5555558a3620, caps=caps@entry=4) at ../wlroots-9999/types/xdg_shell/wlr_xdg_toplevel.c:601

601 assert(toplevel->base->client->shell->version >= Cannot access memory at address 0xfffb2058e9f78950 Cannot access memory at address 0xfffb2058e9f78948 $1 = {shell = 0xfffb2058e9f78948, resource = 0x841f0f, client = 0x468b54478904468b, surfaces = {prev = 0x846b60f5c47890c, next = 0x4810468b48584788}, link = {prev = 0x401f0fc3604789, next = 0x894800000024be55}, ping_serial = 1096106469, ping_timer = 0x83485300000001bf} $2 = {client = 0x7ffff7f1cb40 , resource = 0x7ffff7f1d5d0 , surface = 0x7ffff7f1d4b0 , link = {prev = 0x7ffff7f1d450 , next = 0x7ffff7f1d320 }, role = (unknown: 0xf7f1d210), role_resource = 0x7ffff7f1d0b0 , {toplevel = 0x7ffff7f1d080 , popup = 0x7ffff7f1d080 }, popups = {prev = 0x7ffff7f1d050 , next = 0x7ffff7f1d020 }, added = 240, configured = 207, configure_idle = 0x7ffff7f1cf30 , scheduled_serial = 4159819488, configure_list = {prev = 0x7ffff7f1ceb0 , next = 0x0}, current = {configure_serial = 0, geometry = {x = 0, y = -135143600, width = 32767, height = -135143552}}, pending = {configure_serial = 32767, geometry = {x = 0, y = 0, width = 0, height = 0}}, initialized = false, initial_commit = false, events = {destroy = {listener_list = {prev = 0x0, next = 0x0}}, ping_timeout = {listener_list = {prev = 0x0, next = 0x7ffff7f1e0e0 }}, new_popup = {listener_list = {prev = 0x7ffff7f1e120 , next = 0x0}}, configure = {listener_list = {prev = 0x0, next = 0x0}}, ack_configure = {listener_list = {prev = 0x0, next = 0x0}}}, data = 0x0, client_mapped = 96, role_resource_destroy = {link = {prev = 0x0, next = 0x0}, notify = 0x7ffff7f1e320 }} No symbol "base" in current context. $3 = {resource = 0x7ffff7f9e6a0 , base = 0x7ffff7fa47e0 , parent = 0x11, parent_unmap = {link = {prev = 0x0, next = 0x0}, notify = 0x0}, current = {maximized = 80, fullscreen = 54, resizing = 138, activated = 85, suspended = 85, tiled = 1435121232, width = 21845, height = 1435411184, max_width = 21845, max_height = 1437016336, min_width = 21845, min_height = 2}, pending = {maximized = false, fullscreen = false, resizing = false, activated = false, suspended = false, tiled = 0, width = 1437016296, height = 21845, max_width = 1437016296, max_height = 21845, min_width = 1435121296, min_height = 21845}, scheduled = {fields = 1435121296, maximized = 85, fullscreen = 85, resizing = false, activated = false, suspended = false, tiled = 0, width = 145, height = 0, bounds = {width = 0, height = 0}, wm_capabilities = 0}, requested = {maximized = true, minimized = false, fullscreen = false, fullscreen_output = 0x6f, fullscreen_output_destroy = {link = {prev = 0x0, next = 0x0}, notify = 0x1}}, title = 0x4f <error: Cannot access memory at address 0x4f>, app_id = 0x0, events = {request_maximize = {listener_list = {prev = 0x0, next = 0x0}}, request_fullscreen = {listener_list = {prev = 0x0, next = 0x0}}, request_minimize = {listener_list = {prev = 0x0, next = 0x0}}, request_move = {listener_list = {prev = 0x0, next = 0x0}}, request_resize = {listener_list = {prev = 0x91, next = 0x7ffff7fa1240 }}, request_show_window_menu = {listener_list = {prev = 0x7ffff7fa5660 , next = 0x16}}, set_parent = {listener_list = {prev = 0x7ffff7f3c140 , next = 0x0}}, set_title = {listener_list = {prev = 0x0, next = 0x5555558a3770}}, set_app_id = {listener_list = {prev = 0x5555558a3770, next = 0x5555558ea2f0}}}}

sevz17 commented 1 year ago

Memory corruption?

@fictitiousexistence, can you run this? (but this time append "-Og -ggdb3" to you CFLAGS in dwl): the patch I attached earlier is not necessary, and while you are at it can you also run dwl with the new flag -d and send me the stderr?

bt full
frame 1
p *xdg_surface
p xdg_surface->role_resource
p *xdg_surface->toplevel
p xdg_surface->initialized
p xdg_surface->initial_commit
p *xdg_surface->client
p *xdg_surface->client->shell
fictitiousexistence commented 11 months ago

@sevz17

Im so sorry I did not see you responded, either didn't get or completely missed the email.

I just pulled the wlroot-next branch again and it's all working again.

I still have the old one that still crashes. Do you still need me to run the steps from your last post?

Thanks!!

sevz17 commented 11 months ago

@sevz17

Im so sorry I did not see you responded, either didn't get or completely missed the email.

No worries

I just pulled the wlroot-next branch again and it's all working again.

Nice (*smiles happily at the feeling of having a bug fixed without doing anything*)

I still have the old one that still crashes. Do you still need me to run the steps from your last post?

Nah, if it's working again then we can safely close this issue (although if you are curious about why it crashes you can send me what I asked)