bug-auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-AUCTeX] Re: 11.81; 11.81 lock-up


From: Ralf Angeli
Subject: [Bug-AUCTeX] Re: 11.81; 11.81 lock-up
Date: Sun, 02 Oct 2005 20:17:57 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

* Jan-Ake Larsson (2005-09-29) writes:

> When editing a large(ish) file, pressing C-k on a row with a preview
> (?) caused a lockup. Pressing C-g will return the cursor. This has
> occurred in several files. After 'quit any command will cause a
> lockup. Luck that C-x C-s saves before the lockup occurs. Reloading
> the file into the same buffer resets.

Cool!  You found a way to let the kernel kill XEmacs. (c:  If you
leave it running instead of typing `C-g' it will eventually suck up
all memory and get killed.  (At least in my case where I tested it
with a version of circ.tex the content of which I copied and pasted
several times into the buffer.)  It is related to stuff like that:

(let (arg pos)
  (dotimes (i 100000)
    (setq arg (concat arg "foo\n")))
    (while (setq pos (string-match "\\s<.*[\n\r][ \t]*" arg pos))
      (setq arg (replace-match "" t t arg 0))))

But that's only a symptom ...

> Shortened backtrace:
>
> Debugger entered--Lisp error: (quit)
>   preview-canonical-spaces("....")
>   mapcar(preview-canonical-spaces ("...." "$\\pact i$"))
>   preview-relaxed-string=("...." "$\\pact i$")
>   byte-code("..." [text ov extent-object buffer-substring-no-properties 
> extent-start-position extent-end-position 0 preview-delete extent-property 
> preview-state disabled preview-relaxed-string= preview-prechange 
> preview-disable] 6)
>   preview-check-changes()

Problem is that `preview-check-changes' will pass the whole buffer to
`preview-relaxed-string='.  That happens because the extent stored in
`preview-change-list' (and checked in `preview-check-changes') will
become detached once the text it is bound to will get deleted.
Unfortunately a detached extent loses its start and end properties.
This is why the `buffer-substring-no-properties' call in
`preview-check-changes' will get passed nil for both start and end
arguments which results in the whole buffer being returned.

A way to fix this might be to check in `preview-check-changes' if the
extent is detached and delete it in case it is.

-- 
Ralf





reply via email to

[Prev in Thread] Current Thread [Next in Thread]