Subject: Re: bug#69287: 30.0.50; Pasting text from KDE clipboard sometimes crashes Emacs

From: Eli Zaretskii <[email-masked]>
Date: Wed, 21 Feb 2024 17:31:13 +0200

> Cc: [email-masked]
> Date: Wed, 21 Feb 2024 10:58:47 +0100
> From: David Ponce <[email-masked]>
> 
> xdisp.c:21778: Emacs fatal error: assertion failed: w->window_end_valid
> 
> Thread 1 "emacs" hit Breakpoint 1, terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647)
>     at emacs.c:442
> 442       signal (sig, SIG_DFL);
> (gdb) bt
> #0  terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=2147483647) at emacs.c:442
> #1  0x0000000000436698 in die
>     (msg=msg@entry=0x717fce "w->window_end_valid", file=file@entry=0x717900 "xdisp.c", line=line@entry=21778) at alloc.c:8061
> #2  0x0000000000427006 in find_first_unchanged_at_end_row (delta_bytes=<synthetic pointer>, delta=<synthetic pointer>, w=0x1065950)
>     at xdisp.c:21778
> #3  try_window_id (w=w@entry=0x1065950) at xdisp.c:22342
> #4  0x00000000004c2dad in redisplay_window (window=<optimized out>, just_this_one_p=just_this_one_p@entry=true) at xdisp.c:20433
> #5  0x00000000004c563e in redisplay_window_1 (window=window@entry=XIL(0x1065955)) at xdisp.c:18019

Do you have some optional feature enabled that resizes the mini-window
at random points in time?  Like some optional completion package that
sinerts a lot of stuff into the mini-window and thus causes it to
resize?

IOW, we need a reproducible recipe for debugging this assertion
violation.  If you can trigger this from "emacs -Q", it would be even
better.

However, please note that this is assertion violation has nothing
apparent to do with the previous crashes, which were inside GC.