bemenu icon indicating copy to clipboard operation
bemenu copied to clipboard

bemenu crashes under wayland if not sent layer surface configure event fast enough

Open inclement opened this issue 3 years ago • 1 comments

While working on the wlroots-based compositor https://github.com/inclement/vivarium I was having bemenu-run crash occasionally with the message:

wayland: mmap failed

This seems to be because the compositor wasn't sending the layer shell configure event immediately on creation of the new layer surface, but bemenu did still immediately attempt to mmap with the default width,height of 0,0.

I fixed this in the compositor by sending the configure immediately, but this seems to be technically wrong on bemenu's part. There's nothing in the layer shell protocol requiring the first configure to be immediate. That said, the issue won't be hit on sway as it also configures immediately, and maybe this is the case for most/all extant wlroots compositors.

For reference, https://github.com/inclement/vivarium/commit/ee254a91e612fb7995053865669accd2d8286144 is the commit that works around this on the compositor side.

inclement avatar Mar 03 '21 23:03 inclement

Mmapping with 0,0 sounds wrong indeed. Should be fixed

Cloudef avatar Mar 04 '21 07:03 Cloudef