Subject: bug#24013: 25.0.95; Emacs 25.x uses up all memory and needs to be killed

From: Eli Zaretskii <[email-masked]>
Date: Sun, 17 Jul 2016 17:19:46 +0300

> From: Achim Gratz <[email-masked]>
> Date: Sun, 17 Jul 2016 14:39:33 +0200
> 
> To reproduce, set a mark (C-Space) somewhere in the file.  Then
> extend/shrink the selection region by doing Shift-PgUp / Shift-PgDwn,
> going back and forth several times.  Once you've crossed a portion of
> the file that has the "foreign" line endings, as soon as you take your
> finger off the Shift key Emacs becomes unresponsive (the cursor
> vanishes).  Several seconds later it starts allocating memory in an
> apparently exponential fashion until it has exhausted both physical and
> swap, while maxing out one CPU core.  The process must be killed.
> 
> Trying the same recipe with Emacs 24.5 yields a short phase of
> unresponsiveness with the cursor vanished, then it returns with an error
> message "Timed out waiting for property-notify event".

That error message is related to X selections.  Does the problem go
away if you disable putting the selected text into the X selections?
If it does, do you have some agent running that manages X selections?

Also, what is your value of selection-coding-system?

Thanks.