From: Stefan Kangas <stefankangas@gmail.com>
To: Chris Hecker <checker@d6.com>, 58954@debbugs.gnu.org
Subject: bug#58954: 28.2; ibuffer.el out of range error on lots of buffers?
Date: Wed, 2 Nov 2022 06:03:01 -0700 [thread overview]
Message-ID: <CADwFkmkHZQ5qyz2L1uconyOoUNGhencYPZP+2Vx0KCR6qh3fqw@mail.gmail.com> (raw)
In-Reply-To: <em537030e7-c816-4ec7-b864-f2cf6a1afd78@checker-blade15>
"Chris Hecker" <checker@d6.com> writes:
> I was getting Args out of range: #<buffer *Ibuffer*>, 51267, 51313
> when hitting C-x C-b with a ton of buffers open, lots of tramp
> buffers, some eww buffers, etc.
>
> 722 buffers 86533321 669 files, 2 processes
I can't reproduce that here.
> It's too much for me to try to repro for me right now with emacs -Q,
> but hopefully this will help:
>
> I debugged it to line 1980 in release 28.2 ibuffer.el in function
> ibuffer-map-lines:
>
> (delete-region (line-beginning-position)
> (1+ (line-end-position)))
>
> (line-end-position) evaluated to the end of the buffer, so 1+'ing it
> made delete-region error. Changing it to:
>
> (delete-region (line-beginning-position)
> (min (point-max) (1+ (line-end-position))))
>
> made ibuffer work again. I didn't look to closely to know if this was
> the result of some logic error earlier in the function, or if this
> should have a min guard on it normally or what.
The fix looks simple enough, but I'm uneasy about it.
`ibuffer-map-lines' seems to be mapping over buffers in *Ibuffer*, but
the last line in that buffer is not a buffer. I have:
600 buffers 44145326 489 files, 1 process
So my question is why `ibuffer-map-lines' is mapping over that last line
in your case? Could you perhaps try stepping through this function
using edebug to figure out what might be going on?
prev parent reply other threads:[~2022-11-02 13:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 22:39 bug#58954: 28.2; ibuffer.el out of range error on lots of buffers? Chris Hecker
2022-11-02 13:03 ` Stefan Kangas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADwFkmkHZQ5qyz2L1uconyOoUNGhencYPZP+2Vx0KCR6qh3fqw@mail.gmail.com \
--to=stefankangas@gmail.com \
--cc=58954@debbugs.gnu.org \
--cc=checker@d6.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).