dmenu-wayland
dmenu-wayland copied to clipboard
Dmenu-wl crashes with mmap failed, but not dmenu
When executing dmenu-wl with some input, it crashes with mmap failed: Invalid argument
. However, this is not the case of dmenu, which runs fine.
I read the documentation of mmap
, and it may fail with this error code when len
is 0. I have probably located the mmap
call that crashes. It's in draw.c, and len
corresponds to size
, which is (I suppose) the size of the menu to be drawn. This size is computed with informations that come from monitors. Thus, I suppose the problem might come from the fact that dmenu
achieves to retrieve information about the monitors, but not dmenu-wl
(which is strange if you ask me, why the version made for xorg should work on wayland, but not the version made for wayland...). Hope it helps.
I suppose that depends on your compositor. WFM.
That was quite some time ago, I don't remember which compositor I used then (probably Gnome or Sway). Anyways, now it works for me too (currently using Sway).
I am using Mutter and I have found that monitor->logical_width
is used before being set thereby causing factor
and width
in dmenu_create_buffer
to be 0
At least for me (Mutter v42.0) the bug looks to stem from in handle_global()
panel->display_info.xdg_output_manager
never being anything other than 0
panel->display_info.xdg_output_manager
is set in a later call to handle_global
than monitors