GNU bug report logs - #5851
24.0.50; first character after opening quote often gets eaten in CC modes

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs,cc-mode; Reported by: Paul Pogonyshev <pogonyshev@HIDDEN>; dated Tue, 6 Apr 2010 20:23:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 5851 <at> debbugs.gnu.org:


Received: (at 5851) by debbugs.gnu.org; 22 Feb 2011 21:41:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 22 16:41:25 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Przz2-0006ek-SI
	for submit <at> debbugs.gnu.org; Tue, 22 Feb 2011 16:41:25 -0500
Received: from mailout-de.gmx.net ([213.165.64.23])
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <pogonyshev@HIDDEN>) id 1Przyz-0006eV-2u
	for 5851 <at> debbugs.gnu.org; Tue, 22 Feb 2011 16:41:22 -0500
Received: (qmail invoked by alias); 22 Feb 2011 21:41:14 -0000
Received: from unknown (EHLO gonzo.localnet) [91.149.173.100]
	by mail.gmx.net (mp053) with SMTP; 22 Feb 2011 22:41:14 +0100
X-Authenticated: #16844820
X-Provags-ID: V01U2FsdGVkX1/PCOJ9IefPJN3LImrahIcyIbM/r/IfXydHz17Os7
	D1zvlGa6hBBVWp
From: Paul Pogonyshev <pogonyshev@HIDDEN>
To: 5851 <at> debbugs.gnu.org
Subject: Re: 24.0.50;
	first character after opening quote often gets eaten in CC modes
Date: Tue, 22 Feb 2011 23:39:31 +0200
User-Agent: KMail/1.13.5 (Linux/2.6.37-1-amd64; KDE/4.4.5; x86_64; ; )
References: <201004062321.07973.pogonyshev@HIDDEN>
In-Reply-To: <201004062321.07973.pogonyshev@HIDDEN>
MIME-Version: 1.0
Message-Id: <201102222339.31284.pogonyshev@HIDDEN>
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 5851
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.4 (/)

FWIW the bug is still present.  I get this backtrace (2011-02-19
build):

    (error "Invalid search bound (wrong side of point)")
      signal(error ("Invalid search bound (wrong side of point)"))
      byte-code("b\210\302	@	A\"\207" [start err signal] 3)
      c-syntactic-re-search-forward("[;{}]" 8510 end)
      c-before-change-check-<>-operators(6462 6462)
      #[(fn) "	\n\"\207" [fn beg end] 3](c-before-change-check-<>-operators)
      mapc(#[(fn) "	\n\"\207" [fn beg end] 3] (c-extend-region-for-CPP c-before-change-check-<>-operators))
      c-before-change(6462 6462)
      self-insert-command(1)
      call-interactively(self-insert-command nil nil)

I cannot find a reliable way to reproduce, but it happens often
enough.  Apparently, buffers not touched in quite a while are more
prone.  I.e. open a C++ file and leave it alone for 5 minutes.  Then
switch to the buffer and type outside any string a double quote
following by any other character --- the second character will likely
get eaten with an error as above.  M-x toggle-debug-on-error helps
spotting it.

Paul




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN:
bug#5851; Package emacs,cc-mode. Full text available.
bug reassigned from package 'emacs' to 'emacs,cc-mode'. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Apr 2010 20:23:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 16:23:00 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NzFIa-00014f-0q
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2010 16:23:00 -0400
Received: from mx10.gnu.org ([199.232.76.166])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <pogonyshev@HIDDEN>) id 1NzFIX-00014a-Ui
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2010 16:22:59 -0400
Received: from lists.gnu.org ([199.232.76.165]:60351)
	by monty-python.gnu.org with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60)
	(envelope-from <pogonyshev@HIDDEN>) id 1NzFIT-0003xe-Fd
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2010 16:22:53 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NzFIS-0004FJ-VP
	for bug-gnu-emacs@HIDDEN; Tue, 06 Apr 2010 16:22:53 -0400
Received: from [140.186.70.92] (port=60990 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NzFIR-0004EO-8b
	for bug-gnu-emacs@HIDDEN; Tue, 06 Apr 2010 16:22:52 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_WEB,
	T_RP_MATCHES_RCVD, 
	T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.0
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <pogonyshev@HIDDEN>) id 1NzFIP-0001X5-UG
	for bug-gnu-emacs@HIDDEN; Tue, 06 Apr 2010 16:22:51 -0400
Received: from mail.gmx.net ([213.165.64.20]:51367)
	by eggs.gnu.org with smtp (Exim 4.69)
	(envelope-from <pogonyshev@HIDDEN>) id 1NzFIO-0001Wm-T9
	for bug-gnu-emacs@HIDDEN; Tue, 06 Apr 2010 16:22:49 -0400
Received: (qmail invoked by alias); 06 Apr 2010 20:22:45 -0000
Received: from unknown (EHLO gonzo.localnet) [91.149.173.2]
	by mail.gmx.net (mp058) with SMTP; 06 Apr 2010 22:22:45 +0200
X-Authenticated: #16844820
X-Provags-ID: V01U2FsdGVkX1+XUEJHuBqXuAORGEmJvDwUBFA2b/HNVU6tmFf34g
	Q3m2TGaxJ3QRGp
From: Paul Pogonyshev <pogonyshev@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.0.50;
	first character after opening quote often gets eaten in CC modes
Date: Tue, 6 Apr 2010 23:21:07 +0300
User-Agent: KMail/1.12.4 (Linux/2.6.29-2-686; KDE/4.3.4; i686; ; )
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-Id: <201004062321.07973.pogonyshev@HIDDEN>
X-Y-GMX-Trusted: 0
X-FuHaFi: 0.44
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6,
	seldom 2.4 (older, 4)
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@HIDDEN mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug.  If you can, give
a recipe starting from `emacs -Q':

As can be seen from 'recent input' section below, I typed a string in
C++ mode like this:

    "{}

However, due to an error in the Lisp code (byte-code: Invalid search
bound (wrong side of point)), it ended up looking like this:

    "}

i.e. the very first character after the opening quote got eaten and
never inserted into the buffer.

This does not happen always, but often enough.  It has been happening
for quite some time now, i.e. it is not something introduced very
recently.

Paul

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/local/share/emacs/24.0.50/etc/DEBUG.


In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.18.9)
 of 2010-04-04 on gonzo
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: C++/l

Minor modes in effect:
  which-function-mode: t
  show-paren-mode: t
  server-mode: t
  auto-image-file-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
a r & <backspace> * SPC d e l i m i t e r s . SPC <backspace> 
<backspace> , SPC C-e <down> <down> <left> <left> <left> 
<left> d e M-/ [ 0 ] C-M-k C-s C-s C-g <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <M-left> 
<M-right> <right> <right> <right> <right> C-M-k d e 
M-/ [ 1 ] <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <up> <up> <up> <up> <up> <up> <left> <left> 
<left> <left> M-/ [ 0 ] C-M-k <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <M-left> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <left> <left> 
C-M-k d e M-/ [ 1 ] C-x C-s C-s p r i n t _ r C-w C-s 
C-s C-s <M-right> <M-right> <end> <left> <left> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<C-left> <C-left> <C-left> <C-left> " [ ] " , SPC C-x 
C-s C-x C-f C-g C-x C-f s e t <return> <M-right> <M-right> 
<M-left> " { } " , SPC <tab> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> C-x C-s C-x C-f 
m a <right> <return> <down> C-SPC <C-down> C-w <C-down> 
<C-down> <C-down> <C-down> <C-down> <C-down> <C-down> 
<C-down> <C-down> <C-up> <C-up> <C-up> <up> <M-left> 
<M-left> <M-left> <M-left> " { } <S-backspace> { } 
" , SPC C-x C-s <M-S-f9> <f5> <f5> <M-left> <M-left> 
<M-left> <M-left> c o n s t SPC c h a r * SPC M-/ , 
SPC C-x C-s <M-S-f9> C-e <f5> <end> <M-left> <M-left> 
<M-left> <M-left> " { } " , SPC <M-S-f9> y <f5> <end> 
<M-left> <M-left> <M-left> <M-left> " { } M-x r e p 
o r <tab> <return>

Recent messages:
Wrote /home/paul/mct/tests/map.cpp
(No files need saving)
Compilation exited abnormally with code 2
Saving file /home/paul/mct/tests/common.hpp...
Wrote /home/paul/mct/tests/common.hpp
(No files need saving)
Compilation exited abnormally with code 2
Saving file /home/paul/mct/tests/map.cpp...
Wrote /home/paul/mct/tests/map.cpp
Compilation exited abnormally with code 2
byte-code: Invalid search bound (wrong side of point)

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr message sendmail rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug grep newcomment dabbrev multi-isearch vc-bzr sha1 hex-util
cc-mode cc-fonts easymenu cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs compile comint ring which-func imenu eldoc saveplace
paren server ido cus-start cus-load thumbs image-file dired regexp-opt
advice help-fns advice-preload tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)





Acknowledgement sent to Paul Pogonyshev <pogonyshev@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5851; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.