Eli Zaretskii <[email protected]> [13/Mar 4:05pm +02] wrote: > Please show a C-level backtrace to this effect. If that's not > possible "the easy way" (but I wonder why), step with GDB through > redisplay_internal and find the line of code which causes the crash.
I got the crash to happen under gdb and Emacs exits 1 because it loses the display server connection but did not crash. David Bremner <[email protected]> [14/Mar 7:59am +09] wrote: > One observation is that notmuch rather naively generates a buffer name > from the query, so it might be possible to duplicate the problem without > notmuch by generating a very long buffer name (possibly followed by some > operations like pop-buffer-to-same-window). Good hint about setting window titles. If I hack notmuch-search so that it truncates the buffer name to 1000 characters then the problem is no longer reproducible. So that's what's going on. Pip Cet <[email protected]> [14/Mar 11:28am GMT] wrote: > What's your font width (for the font used by sway)? My assumption is > that sway is trying to create a cairo_image_surface displaying that > string, which ends up being wider than 32767 (= MAX_IMAGE_SIZE) pixels, > and sway fails to properly handle the error: I'm not sure. This is the line from my Sway config: font pango:Hack 10 > I agree that Emacs should not pass overly long strings to the window > manager (equivalent), but the "window manager" shouldn't crash the > entire Wayland session because of an overly long string provided by an > application, either. Agreed. > Do we know where the string is passed from Emacs, so we could truncate > it, and what a reasonable limit would be? > > My guess is this is 'pgtk_set_name_internal' in pgtkfns.c, and I'd > suggest a limit of 512 characters. Would you be able to test a patch to > this effect? I would suggest maybe 1024 characters but 512 seems reasonable. I could certainly test such a patch (or write one, I suppose). -- Sean Whitton _______________________________________________ notmuch mailing list -- [email protected] To unsubscribe send an email to [email protected]
