Subject: bug#43589: 27.1.50; Crash in Org mode buffer when moving point after using outline-hide-other when visual-line-mode and visual line numbers are enabled

From: Simon Pugnet <[email-masked]>
Date: Thu, 24 Sep 2020 22:17:26 +0200

Daniel Martín <[email-masked]> writes:

> Simon, if you can reproduce the problem consistently, could you 
> describe
> in more detail the position of point at each step? Are you 
> copying and
> pasting the sample Org document? Perhaps those implicit 
> assumptions are
> making the problem harder to reproduce. Thanks.

Hello Daniel and Eli,

Here's a more detailed explanation of exactly what I'm dong to 
cause this issue.

1. Execute: emacs -Q
2. In the scratch buffer that opens by default, activate Org mode: 
M-x org-mode
3. Type the following directly into the buffer (3 lines): -

* Heading 1
** Heading 1a
** Heading 1b

4. The point should now be after the "b" in "Heading 1b"
5. Evaluate (M-:) the following: (setq display-line-numbers-type 
'visual)
6. Activate display-line-numbers-mode: M-x 
display-line-numbers-mode
7. Activate visual-line-mode: M-x visual-line-mode
8. Hide other outline headings: M-x outline-hide-other
9. Try to move the point to the previous line: C-p or 
previous-line

If I perform these steps on Emacs 27.1 (GUI or text frame), and 
also the packaged version of Emacs 26.3 on Android (via the Termux 
app), I always get a segmentation fault.

This happens in other Org mode buffers too, including those loaded 
directly from the file system.

I hope that helps!