Loading ...
Sorry, an error occurred while loading the content.

CVS commit of the buffer breaking nxml-mode

Expand Messages
  • Hugo Haas
    Hi. I am experiencing the following issue: sometimes, when after committing a buffer with vc-next-action, Emacs 21.2 gives me an error: rng-clear-cached-state:
    Message 1 of 3 , Nov 12, 2003
    • 0 Attachment
      Hi.

      I am experiencing the following issue: sometimes, when after
      committing a buffer with vc-next-action, Emacs 21.2 gives me an error:

      rng-clear-cached-state: Args out of range: 42202, 83186

      Values for the range vary ("42226, 83236", "42256, 83294", ...), and
      it doesn't happen all the time. As my buffer is fairly big (42k, with
      lots of elements), it looks like an overflow somewhere.

      At this point, nxml-mode stops checking the validity of my buffer. M-x
      nxml-mode makes it work again.

      I experiences this both with nxml-mode 20031018 and 20031031.

      Is there a verbose mode so that I could provide more information about
      this?

      Regards,

      Hugo

      --
      Hugo Haas - http://larve.net/people/hugo/
    • Hugo Haas
      * Hugo Haas [2003-11-12 17:01+0000] ... I have managed to get more information with debug-on-error: Debugger entered--Lisp error:
      Message 2 of 3 , Nov 13, 2003
      • 0 Attachment
        * Hugo Haas <hugo@...> [2003-11-12 17:01+0000]
        > I am experiencing the following issue: sometimes, when after
        > committing a buffer with vc-next-action, Emacs 21.2 gives me an error:
        >
        > rng-clear-cached-state: Args out of range: 42202, 83186
        >
        > Values for the range vary ("42226, 83236", "42256, 83294", ...), and
        > it doesn't happen all the time. As my buffer is fairly big (42k, with
        > lots of elements), it looks like an overflow somewhere.

        I have managed to get more information with debug-on-error:

        Debugger entered--Lisp error: (args-out-of-range 42568 83918)
        remove-text-properties(42568 83918 (rng-state nil))
        rng-clear-cached-state(42568 83918)
        (progn (rng-clear-cached-state start end))
        (unwind-protect (progn (rng-clear-cached-state start end)) (unless modified (restore-buffer-modified-p nil)))
        (let ((modified ...) (inhibit-read-only t) (inhibit-modification-hooks t) (buffer-undo-list t) (deactivate-mark nil) (buffer-file-name nil) (buffer-file-truename nil)) (unwind-protect (progn ...) (unless modified ...)))
        (rng-with-unmodifying-text-property-changes (rng-clear-cached-state start end))
        rng-after-change-function(42568 83918 0)
        insert-file-contents("/home/hugo/WWW/Team/Hugo/schedule.html" t nil nil t)
        revert-buffer(t t t)
        vc-revert-buffer1(t t)
        vc-resynch-window("/home/hugo/WWW/Team/Hugo/schedule.html" t t)
        vc-resynch-buffer("/home/hugo/WWW/Team/Hugo/schedule.html" t t)
        vc-finish-logentry()
        call-interactively(vc-finish-logentry)
        log-edit-done()
        call-interactively(log-edit-done)
        recursive-edit()
        byte-code("[..]" [debugger-buffer debugger-args noninteractive debugger-batch-max-lines middlestart buffer-read-only pop-to-buffer debugger-mode debugger-setup-buffer count-lines 2 "...\n" message buffer-string kill-emacs debug backtrace-debug 3 t debugger-reenable "" nil recursive-edit standard-output inhibit-trace] 3)
        debug(error (void-variable nxml-mode-init))
        eval(nxml-mode-init)
        eval-expression(nxml-mode-init nil)
        * call-interactively(eval-expression)
        execute-extended-command(nil)
        call-interactively(execute-extended-command)

        The file being 42611 bytes long, it seems to want to do operations
        outside of the buffer.

        Regards,

        Hugo

        --
        Hugo Haas - http://larve.net/people/hugo/
      • James Clark
        ... I ve seen this once or twice but have never been able to reliably reproduce it. From looking at the code, I think that it s caused by a bug in Emacs [1]
        Message 3 of 3 , Nov 13, 2003
        • 0 Attachment
          On Thu, 2003-11-13 at 00:01, Hugo Haas wrote:

          > I am experiencing the following issue: sometimes, when after
          > committing a buffer with vc-next-action, Emacs 21.2 gives me an error:
          >
          > rng-clear-cached-state: Args out of range: 42202, 83186

          I've seen this once or twice but have never been able to reliably
          reproduce it. From looking at the code, I think that it's caused by a
          bug in Emacs [1] and that adding

          (when (> end (1+ (buffer-size)))
          (setq start 1)
          (setq end (1+ (buffer-size))))

          at the start of rng-after-change-function should work around it.

          James

          [1] http://mail.gnu.org/archive/html/bug-gnu-emacs/2003-11/msg00060.html
        Your message has been successfully submitted and would be delivered to recipients shortly.