Subject: 23.1.50; Emacs crashes with line-prefix text properties and outline

From: Carsten Dominik <[email-masked]>
Date: Tue, 11 Aug 2009 19:38:40 +0200

Emacs can be repeatedly crashed by using a combination of `outline-mode'
and line-prefix text properties.  The crash happens when a call to
`(hide-sublevels 1)' makes anything currently visible in an Emacs window
invisible, while the text in the window has line-prefix text properties.

Here is a way to reproduce this bug:

Put the following text into a file and open the file in Emacs:

   -*- mode: outline -*-

----------------------8x------------8x----------------8x----------------8x
* my test 
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a

(add-text-properties (point-min) (point-max) '(line-prefix "  "))
(hide-sublevels 1)
----------------------8x------------8x----------------8x----------------8x

The number of lines must be large enough so that scrolling to the end of
the buffer will move the outline headline "my test" out of view.

To reproduce the crash, visit the test file with Emacs, make sure that
it is in outline-mode.  Then scroll down and evaluate the
add-text-properties form.  Then move one line down and evaluate the
hide-sublevel form.

- Carsten Dominik

In GNU Emacs 23.1.50.1 (i386-apple-darwin9.7.0, X toolkit, Xaw3d scroll bars)
 of 2009-08-04 on carsten-dominiks-macbook-pro.local
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure  '--with-x11''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Outline

Minor modes in effect:
  show-paren-mode: t
  iswitchb-mode: t
  yas/minor-mode: t
  diff-auto-refine-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e p <tab> <backspace> <backspace> e p o r t - 
e m a <tab> <return>

Recent messages:
Loading /Users/dominik/.custom.el (source)...
Loading iswitchb...done
Loading paren...done
Loading /Users/dominik/.custom.el (source)...done
Ido mode enabled
Loading /Users/dominik/lib/emacs/lisp/db-colors.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
crash has auto save data; consider M-x recover-this-file
Loading vc-git...done
Making completion list...

Load-path shadows:
/Users/dominik/lib/git/emacs-w3m/w3mhack hides /Users/dominik/lib/emacs/lisp/w3mhack
/Users/dominik/lib/git/emacs-w3m/w3m hides /Users/dominik/lib/emacs/lisp/w3m
/Users/dominik/lib/git/emacs-w3m/w3m-xmas hides /Users/dominik/lib/emacs/lisp/w3m-xmas
/Users/dominik/lib/git/emacs-w3m/w3m-weather hides /Users/dominik/lib/emacs/lisp/w3m-weather
/Users/dominik/lib/git/emacs-w3m/w3m-util hides /Users/dominik/lib/emacs/lisp/w3m-util
/Users/dominik/lib/git/emacs-w3m/w3m-ucs hides /Users/dominik/lib/emacs/lisp/w3m-ucs
/Users/dominik/lib/git/emacs-w3m/w3m-tabmenu hides /Users/dominik/lib/emacs/lisp/w3m-tabmenu
/Users/dominik/lib/git/emacs-w3m/w3m-symbol hides /Users/dominik/lib/emacs/lisp/w3m-symbol
/Users/dominik/lib/git/emacs-w3m/w3m-search hides /Users/dominik/lib/emacs/lisp/w3m-search
/Users/dominik/lib/git/emacs-w3m/w3m-rss hides /Users/dominik/lib/emacs/lisp/w3m-rss
/Users/dominik/lib/git/emacs-w3m/w3m-proc hides /Users/dominik/lib/emacs/lisp/w3m-proc
/Users/dominik/lib/git/emacs-w3m/w3m-perldoc hides /Users/dominik/lib/emacs/lisp/w3m-perldoc
/Users/dominik/lib/git/emacs-w3m/w3m-namazu hides /Users/dominik/lib/emacs/lisp/w3m-namazu
/Users/dominik/lib/git/emacs-w3m/w3m-lnum hides /Users/dominik/lib/emacs/lisp/w3m-lnum
/Users/dominik/lib/git/emacs-w3m/w3m-image hides /Users/dominik/lib/emacs/lisp/w3m-image
/Users/dominik/lib/git/emacs-w3m/w3m-hist hides /Users/dominik/lib/emacs/lisp/w3m-hist
/Users/dominik/lib/git/emacs-w3m/w3m-form hides /Users/dominik/lib/emacs/lisp/w3m-form
/Users/dominik/lib/git/emacs-w3m/w3m-filter hides /Users/dominik/lib/emacs/lisp/w3m-filter
/Users/dominik/lib/git/emacs-w3m/w3m-favicon hides /Users/dominik/lib/emacs/lisp/w3m-favicon
/Users/dominik/lib/git/emacs-w3m/w3m-dtree hides /Users/dominik/lib/emacs/lisp/w3m-dtree
/Users/dominik/lib/git/emacs-w3m/w3m-cookie hides /Users/dominik/lib/emacs/lisp/w3m-cookie
/Users/dominik/lib/git/emacs-w3m/w3m-ccl hides /Users/dominik/lib/emacs/lisp/w3m-ccl
/Users/dominik/lib/git/emacs-w3m/w3m-bug hides /Users/dominik/lib/emacs/lisp/w3m-bug
/Users/dominik/lib/git/emacs-w3m/w3m-bookmark hides /Users/dominik/lib/emacs/lisp/w3m-bookmark
/Users/dominik/lib/git/emacs-w3m/w3m-antenna hides /Users/dominik/lib/emacs/lisp/w3m-antenna
/Users/dominik/lib/emacs/lisp/auctex/texmathp hides /Users/dominik/lib/emacs/lisp/texmathp
/Users/dominik/lib/emacs/work/org-mode/contrib/lisp/htmlize hides /Users/dominik/lib/emacs/lisp/htmlize
/Users/dominik/lib/emacs/lisp/epg hides /Users/dominik/lib/git/emacs/lisp/epg
/Users/dominik/lib/emacs/lisp/epg-config hides /Users/dominik/lib/git/emacs/lisp/epg-config
/Users/dominik/lib/emacs/lisp/epa hides /Users/dominik/lib/git/emacs/lisp/epa
/Users/dominik/lib/emacs/lisp/epa-mail hides /Users/dominik/lib/git/emacs/lisp/epa-mail
/Users/dominik/lib/emacs/lisp/epa-file hides /Users/dominik/lib/git/emacs/lisp/epa-file
/Users/dominik/lib/emacs/lisp/epa-dired hides /Users/dominik/lib/git/emacs/lisp/epa-dired
/Users/dominik/lib/emacs/lisp/table hides /Users/dominik/lib/git/emacs/lisp/textmodes/table
/Users/dominik/lib/emacs/lisp/remember hides /Users/dominik/lib/git/emacs/lisp/textmodes/remember
/Users/dominik/lib/emacs/lisp/reftex hides /Users/dominik/lib/git/emacs/lisp/textmodes/reftex
/Users/dominik/lib/emacs/lisp/reftex-vars hides /Users/dominik/lib/git/emacs/lisp/textmodes/reftex-vars
/Users/dominik/lib/emacs/lisp/reftex-toc hides /Users/dominik/lib/git/emacs/lisp/textmodes/reftex-toc
/Users/dominik/lib/emacs/lisp/reftex-sel hides /Users/dominik/lib/git/emacs/lisp/textmodes/reftex-sel
/Users/dominik/lib/emacs/lisp/reftex-ref hides /Users/dominik/lib/git/emacs/lisp/textmodes/reftex-ref
/Users/dominik/lib/emacs/lisp/reftex-parse hides /Users/dominik/lib/git/emacs/lisp/textmodes/reftex-parse
/Users/dominik/lib/emacs/lisp/reftex-index hides /Users/dominik/lib/git/emacs/lisp/textmodes/reftex-index
/Users/dominik/lib/emacs/lisp/reftex-global hides /Users/dominik/lib/git/emacs/lisp/textmodes/reftex-global
/Users/dominik/lib/emacs/lisp/reftex-dcr hides /Users/dominik/lib/git/emacs/lisp/textmodes/reftex-dcr
/Users/dominik/lib/emacs/lisp/reftex-cite hides /Users/dominik/lib/git/emacs/lisp/textmodes/reftex-cite
/Users/dominik/lib/emacs/lisp/reftex-auc hides /Users/dominik/lib/git/emacs/lisp/textmodes/reftex-auc
/Users/dominik/lib/emacs/lisp/idlwave hides /Users/dominik/lib/git/emacs/lisp/progmodes/idlwave
/Users/dominik/lib/emacs/lisp/idlw-toolbar hides /Users/dominik/lib/git/emacs/lisp/progmodes/idlw-toolbar
/Users/dominik/lib/emacs/lisp/idlw-shell hides /Users/dominik/lib/git/emacs/lisp/progmodes/idlw-shell
/Users/dominik/lib/emacs/lisp/idlw-help hides /Users/dominik/lib/git/emacs/lisp/progmodes/idlw-help
/Users/dominik/lib/emacs/lisp/idlw-complete-structtag hides /Users/dominik/lib/git/emacs/lisp/progmodes/idlw-complete-structtag
/Users/dominik/lib/emacs/work/org-mode/lisp/org hides /Users/dominik/lib/git/emacs/lisp/org/org
/Users/dominik/lib/emacs/work/org-mode/lisp/org-xoxo hides /Users/dominik/lib/git/emacs/lisp/org/org-xoxo
/Users/dominik/lib/emacs/work/org-mode/lisp/org-wl hides /Users/dominik/lib/git/emacs/lisp/org/org-wl
/Users/dominik/lib/emacs/work/org-mode/lisp/org-w3m hides /Users/dominik/lib/git/emacs/lisp/org/org-w3m
/Users/dominik/lib/emacs/work/org-mode/lisp/org-vm hides /Users/dominik/lib/git/emacs/lisp/org/org-vm
/Users/dominik/lib/emacs/work/org-mode/lisp/org-timer hides /Users/dominik/lib/git/emacs/lisp/org/org-timer
/Users/dominik/lib/emacs/work/org-mode/lisp/org-table hides /Users/dominik/lib/git/emacs/lisp/org/org-table
/Users/dominik/lib/emacs/work/org-mode/lisp/org-src hides /Users/dominik/lib/git/emacs/lisp/org/org-src
/Users/dominik/lib/emacs/work/org-mode/lisp/org-rmail hides /Users/dominik/lib/git/emacs/lisp/org/org-rmail
/Users/dominik/lib/emacs/work/org-mode/lisp/org-remember hides /Users/dominik/lib/git/emacs/lisp/org/org-remember
/Users/dominik/lib/emacs/work/org-mode/lisp/org-publish hides /Users/dominik/lib/git/emacs/lisp/org/org-publish
/Users/dominik/lib/emacs/work/org-mode/lisp/org-protocol hides /Users/dominik/lib/git/emacs/lisp/org/org-protocol
/Users/dominik/lib/emacs/work/org-mode/lisp/org-plot hides /Users/dominik/lib/git/emacs/lisp/org/org-plot
/Users/dominik/lib/emacs/work/org-mode/lisp/org-mouse hides /Users/dominik/lib/git/emacs/lisp/org/org-mouse
/Users/dominik/lib/emacs/work/org-mode/lisp/org-mhe hides /Users/dominik/lib/git/emacs/lisp/org/org-mhe
/Users/dominik/lib/emacs/work/org-mode/lisp/org-mew hides /Users/dominik/lib/git/emacs/lisp/org/org-mew
/Users/dominik/lib/emacs/work/org-mode/lisp/org-macs hides /Users/dominik/lib/git/emacs/lisp/org/org-macs
/Users/dominik/lib/emacs/work/org-mode/lisp/org-mac-message hides /Users/dominik/lib/git/emacs/lisp/org/org-mac-message
/Users/dominik/lib/emacs/work/org-mode/lisp/org-list hides /Users/dominik/lib/git/emacs/lisp/org/org-list
/Users/dominik/lib/emacs/work/org-mode/lisp/org-latex hides /Users/dominik/lib/git/emacs/lisp/org/org-latex
/Users/dominik/lib/emacs/work/org-mode/lisp/org-jsinfo hides /Users/dominik/lib/git/emacs/lisp/org/org-jsinfo
/Users/dominik/lib/emacs/work/org-mode/lisp/org-irc hides /Users/dominik/lib/git/emacs/lisp/org/org-irc
/Users/dominik/lib/emacs/work/org-mode/lisp/org-install hides /Users/dominik/lib/git/emacs/lisp/org/org-install
/Users/dominik/lib/emacs/work/org-mode/lisp/org-inlinetask hides /Users/dominik/lib/git/emacs/lisp/org/org-inlinetask
/Users/dominik/lib/emacs/work/org-mode/lisp/org-info hides /Users/dominik/lib/git/emacs/lisp/org/org-info
/Users/dominik/lib/emacs/work/org-mode/lisp/org-indent hides /Users/dominik/lib/git/emacs/lisp/org/org-indent
/Users/dominik/lib/emacs/work/org-mode/lisp/org-id hides /Users/dominik/lib/git/emacs/lisp/org/org-id
/Users/dominik/lib/emacs/work/org-mode/lisp/org-icalendar hides /Users/dominik/lib/git/emacs/lisp/org/org-icalendar
/Users/dominik/lib/emacs/work/org-mode/lisp/org-html hides /Users/dominik/lib/git/emacs/lisp/org/org-html
/Users/dominik/lib/emacs/work/org-mode/lisp/org-gnus hides /Users/dominik/lib/git/emacs/lisp/org/org-gnus
/Users/dominik/lib/emacs/work/org-mode/lisp/org-footnote hides /Users/dominik/lib/git/emacs/lisp/org/org-footnote
/Users/dominik/lib/emacs/work/org-mode/lisp/org-feed hides /Users/dominik/lib/git/emacs/lisp/org/org-feed
/Users/dominik/lib/emacs/work/org-mode/lisp/org-faces hides /Users/dominik/lib/git/emacs/lisp/org/org-faces
/Users/dominik/lib/emacs/work/org-mode/lisp/org-exp hides /Users/dominik/lib/git/emacs/lisp/org/org-exp
/Users/dominik/lib/emacs/work/org-mode/lisp/org-exp-blocks hides /Users/dominik/lib/git/emacs/lisp/org/org-exp-blocks
/Users/dominik/lib/emacs/work/org-mode/lisp/org-docbook hides /Users/dominik/lib/git/emacs/lisp/org/org-docbook
/Users/dominik/lib/emacs/work/org-mode/lisp/org-compat hides /Users/dominik/lib/git/emacs/lisp/org/org-compat
/Users/dominik/lib/emacs/work/org-mode/lisp/org-colview hides /Users/dominik/lib/git/emacs/lisp/org/org-colview
/Users/dominik/lib/emacs/work/org-mode/lisp/org-clock hides /Users/dominik/lib/git/emacs/lisp/org/org-clock
/Users/dominik/lib/emacs/work/org-mode/lisp/org-bibtex hides /Users/dominik/lib/git/emacs/lisp/org/org-bibtex
/Users/dominik/lib/emacs/work/org-mode/lisp/org-bbdb hides /Users/dominik/lib/git/emacs/lisp/org/org-bbdb
/Users/dominik/lib/emacs/work/org-mode/lisp/org-attach hides /Users/dominik/lib/git/emacs/lisp/org/org-attach
/Users/dominik/lib/emacs/work/org-mode/lisp/org-ascii hides /Users/dominik/lib/git/emacs/lisp/org/org-ascii
/Users/dominik/lib/emacs/work/org-mode/lisp/org-archive hides /Users/dominik/lib/git/emacs/lisp/org/org-archive
/Users/dominik/lib/emacs/work/org-mode/lisp/org-agenda hides /Users/dominik/lib/git/emacs/lisp/org/org-agenda
/Users/dominik/lib/git/emacs/lisp/vc-mcvs hides /Users/dominik/lib/git/emacs/lisp/obsolete/vc-mcvs
/Users/dominik/lib/git/emacs/lisp/resume hides /Users/dominik/lib/git/emacs/lisp/obsolete/resume