From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#58954: 28.2; ibuffer.el out of range error on lots of buffers? Date: Wed, 2 Nov 2022 06:03:01 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4912"; mail-complaints-to="usenet@ciao.gmane.io" To: Chris Hecker , 58954@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 02 14:05:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oqDQd-00012d-BG for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 02 Nov 2022 14:05:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqDPZ-0008CD-7C; Wed, 02 Nov 2022 09:04:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqDPW-0008BK-84 for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2022 09:04:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqDPV-0003xj-TN for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2022 09:04:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqDPV-0003pW-O8 for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2022 09:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Nov 2022 13:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58954 X-GNU-PR-Package: emacs Original-Received: via spool by 58954-submit@debbugs.gnu.org id=B58954.166739419014657 (code B ref 58954); Wed, 02 Nov 2022 13:04:01 +0000 Original-Received: (at 58954) by debbugs.gnu.org; 2 Nov 2022 13:03:10 +0000 Original-Received: from localhost ([127.0.0.1]:45136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqDOf-0003oK-RT for submit@debbugs.gnu.org; Wed, 02 Nov 2022 09:03:10 -0400 Original-Received: from mail-oa1-f49.google.com ([209.85.160.49]:36577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqDOe-0003o5-Aq for 58954@debbugs.gnu.org; Wed, 02 Nov 2022 09:03:08 -0400 Original-Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-13bef14ea06so20244319fac.3 for <58954@debbugs.gnu.org>; Wed, 02 Nov 2022 06:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :from:to:cc:subject:date:message-id:reply-to; bh=OkaiZ7XUJTx0X4RtkK7ZnTIccVXe5d4EtguRkaUF12c=; b=UlwF26JzSMmhsExxXTtmv2KNaHPkTOsWV6oMKpdlnZF9x0NVTtdS1nGyMI3r3Xkxwo Mi8mkUeNJZYjC/nl2fWTegPW83FiFrsMTNk4UzFVgzile3qw45KxKZS2Aj+3IGdJ0kr+ 39YuIcSM7lt+c+nr+OLeqhcS7nYsm79bOW8gRuR76xjmFNuX5a1488/9n/XIabz2w5Ti 8aJX/TN2rn/9s1JFRdeBRKZO95lN8PBzK74E7B+JynZverCguqS3Qt5x4Q2fm8RGmnbf XG3g3gJJX6erlbbEc4nyms43li/H8NewwJC3XqvURsfhEsW9Xi2n+LGwnGo0nIVjlOwQ uGHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OkaiZ7XUJTx0X4RtkK7ZnTIccVXe5d4EtguRkaUF12c=; b=SOymNPEd5/cPbY5g42eKobuxyOnlhaGQM316aIqK/LB5fu6e7YCBfpjxbI56EUX4/s +cRbQ7n4xDkLhb6fH25ZueBpMg1n7yLKLT9pKRTLd9DxNTqfzzdC8lEZGhLMYjdlu0HW M8GLXFejPPQc1HADhI5iAJaVcLcMxETROKKllMVwR+C0ziG4Ik3fc+d35cFj5oDWTIjr VXAxqhRTL5rpJdAA9NvO3NVIcl81XsvezNoH0nIlwACutKGlkzI11px+BqSMbGZn/cfr 6uyqJ+GdBtTcT6ylCdCha9BZdV4htmaHluaQ2+sTaFLuUfFkp62Jmt6a6EjRNz0WTeSm t+cg== X-Gm-Message-State: ACrzQf2YH9lNnu4IcXIODHY5skeRaRQtD5lSXvyr8JFRSiIBKIaYLHOj 52dIj4rggulaxR1FrbKiFPkwC6AN9hxp3yKtBMcZfVlG X-Google-Smtp-Source: AMsMyM6jyyfOJHXCi8uMrvmGaj+T9WcpEkw2yvdvCwsQ+yRPSehd345isn/bHNJ1JrncRhT4cXwUKzGBC+pw9VIIc08= X-Received: by 2002:a05:6870:c0d5:b0:13a:fb98:713d with SMTP id e21-20020a056870c0d500b0013afb98713dmr24436270oad.199.1667394182447; Wed, 02 Nov 2022 06:03:02 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 2 Nov 2022 06:03:01 -0700 In-Reply-To: X-Hashcash: 1:20:221102:checker@d6.com::cxSdvHowPOhjEBS4:2tJH X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246862 Archived-At: "Chris Hecker" writes: > I was getting Args out of range: #, 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?