From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=C3=93scar?= Fuentes Newsgroups: gmane.emacs.bugs Subject: bug#7181: 24.0.50; args-out-of-range while reverting C++ header file Date: Sat, 09 Oct 2010 15:39:14 +0200 Message-ID: <87sk0f32pp.fsf@telefonica.net> References: <87zkuo2djr.fsf@telefonica.net> <83wrprn3ou.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1286631729 15356 80.91.229.12 (9 Oct 2010 13:42:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 9 Oct 2010 13:42:09 +0000 (UTC) Cc: 7181@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 09 15:42:07 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P4Zgc-0007pe-B0 for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Oct 2010 15:42:06 +0200 Original-Received: from localhost ([127.0.0.1]:44254 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P4Zgb-0001nK-QB for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Oct 2010 09:42:05 -0400 Original-Received: from [140.186.70.92] (port=49445 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P4ZgV-0001n2-3j for bug-gnu-emacs@gnu.org; Sat, 09 Oct 2010 09:42:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P4ZgT-00036M-OL for bug-gnu-emacs@gnu.org; Sat, 09 Oct 2010 09:41:59 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36327) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P4ZgT-00036E-Mr for bug-gnu-emacs@gnu.org; Sat, 09 Oct 2010 09:41:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P4Zal-00056R-0B; Sat, 09 Oct 2010 09:36:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Oct 2010 13:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7181 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7181-submit@debbugs.gnu.org id=B7181.128663135919602 (code B ref 7181); Sat, 09 Oct 2010 13:36:02 +0000 Original-Received: (at 7181) by debbugs.gnu.org; 9 Oct 2010 13:35:59 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P4Zah-000567-J1 for submit@debbugs.gnu.org; Sat, 09 Oct 2010 09:35:59 -0400 Original-Received: from impaqm1.telefonica.net ([213.4.138.1]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P4Zae-000560-V3 for 7181@debbugs.gnu.org; Sat, 09 Oct 2010 09:35:58 -0400 Original-Received: from IMPmailhost6.adm.correo ([10.20.102.127]) by IMPaqm1.telefonica.net with bizsmtp id GdRJ1f00C2kvMAa01dfFYG; Sat, 09 Oct 2010 15:39:15 +0200 Original-Received: from qcore ([83.52.52.115]) by IMPmailhost6.adm.correo with BIZ IMP id GdfE1f0072V89Bn1mdfESh; Sat, 09 Oct 2010 15:39:15 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" In-Reply-To: <83wrprn3ou.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Oct 2010 10:57:53 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 09 Oct 2010 09:36:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40784 Archived-At: Eli Zaretskii writes: >> emacs -Q >> C-x C-f some-moderately-big-header-file.h >> >> M-x revert-buffer >> Lisp error: (args-out-of-range 580 36722) >> >> The buffer is left semi-reverted, on an edited state. Doing a M-x >> revert-buffer again works ok. >> >> Setting debug-on-error to t shows this: >> >> Debugger entered--Lisp error: (args-out-of-range 580 36722) >> remove-text-properties(580 36722 (category)) > > Can you verify that the problem happens because one or both argument > positions of remove-text-properties don't exist due to the changes? Essentially, the end position which is out of range corresponds to the size of the *previous* contents of the file, not of the current file. For instance: While visiting file ffi.h with size 26675, replace it on disk with another version of 36721 bytes, revert-buffer, (args-out-of-range 580 26676). If we are visiting the long version of ffi.h (the one with 36721 bytes) and replace it on disk with the short version, then (args-out-of-range 580 36722). On both cases the buffer is left with 580 bytes of content, part of them belonging to the beginning of the file and the other part to the end of the file. The first byte missing from the buffer after revert-buffer fails is the first character which differs from one version to another of the file. I'll try to reduce a test case file.