From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.devel Subject: Re: infloop when removing character Date: Fri, 15 Aug 2003 00:35:30 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1060901126 5289 80.91.224.253 (14 Aug 2003 22:45:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2003 22:45:26 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Aug 15 00:45:24 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19nQqS-0007UF-00 for ; Fri, 15 Aug 2003 00:45:24 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19nQrC-00031f-00 for ; Fri, 15 Aug 2003 00:46:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19nQkE-0003e9-FX for emacs-devel@quimby.gnus.org; Thu, 14 Aug 2003 18:38:58 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19nQjK-0001oO-EC for emacs-devel@gnu.org; Thu, 14 Aug 2003 18:38:02 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19nQi8-0006SL-IU for emacs-devel@gnu.org; Thu, 14 Aug 2003 18:37:19 -0400 Original-Received: from [217.13.230.178] (helo=yxa.extundo.com) by monty-python.gnu.org with esmtp (Exim 4.20) id 19nQgv-00036H-D6; Thu, 14 Aug 2003 18:35:33 -0400 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) by yxa.extundo.com (8.12.9/8.12.9) with ESMTP id h7EMZUdj020687; Fri, 15 Aug 2003 00:35:31 +0200 Original-To: rms@gnu.org Mail-Copies-To: nobody X-Payment: hashcash 1.2 0:030814:rms@gnu.org:2ced6b434a71fd87 X-Hashcash: 0:030814:rms@gnu.org:2ced6b434a71fd87 X-Payment: hashcash 1.2 0:030814:emacs-devel@gnu.org:f52f53e4cf3351f2 X-Hashcash: 0:030814:emacs-devel@gnu.org:f52f53e4cf3351f2 In-Reply-To: (Richard Stallman's message of "Thu, 07 Aug 2003 02:05:02 -0400") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.2 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15959 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15959 Richard Stallman writes: > 809 while (--cursor != ceiling_addr && *cursor != '\n') > (gdb) n > 814 if (++count == 0) > > This loop increases count. > > (gdb) p count > $8 = -516 > > Ok. > > Program received signal SIGTSTP, Stopped (user). > 0x08140f15 in scan_newline (start=1086115847, start_byte=513066, limit=1, > limit_byte=1, count=-9641, allow_quit=0) at search.c:809 > 809 while (--cursor != ceiling_addr && *cursor != '\n') > (gdb) p count > $9 = -9641 > > Something made count smaller. Apparently some other code did run. > Can you find out what happened? > > Did the first call to scan_newline return and did it get called again? > Please try using the `finish' command as explained in etc/DEBUG. OK, it has happened again. I noticed some text in the echo area: Error in post-command hook: ... I didn't catch the final part of it, and now Emacs doesn't redisplay itself any more so I cannot read it. It happened when I was composing a mail in Gnus (it occurred in different situations before), and my post-command-hook there is (this is from another session, but I believe it is the same in the hung process too): post-command-hook's value is (t flyspell-post-command-hook) Local in buffer *wide reply to Richard Stallman*; global value is (tooltip-activate-mouse-motions-if-enabled global-font-lock-mode-buffers hl-line-highlight) Below is the 'finish' gdb log. The process is still running in case someone wants me to debug it, although I cannot promise to keep it around for very long. Program received signal SIGTSTP, Stopped (user). 0x08140f17 in scan_newline (start=1086652423, start_byte=476717, limit=1, limit_byte=1, count=-6874, allow_quit=0) at search.c:809 809 while (--cursor != ceiling_addr && *cursor != '\n') (gdb) finish Run till exit from #0 0x08140f17 in scan_newline (start=1086652423, start_byte=476717, limit=1, limit_byte=1, count=-6874, allow_quit=0) at search.c:809 message_dolog (m=0x81a5be4 "", nbytes=-1073753312, nlflag=1, multibyte=0) at xdisp.c:6281 6281 del_range_both (BEG, BEG_BYTE, PT, PT_BYTE, 0); Value returned is $10 = 1 (gdb) finish Run till exit from #0 message_dolog (m=0x81a5be4 "", nbytes=-1073753312, nlflag=1, multibyte=0) at xdisp.c:6281 0x080969b4 in message_log_maybe_newline () at xdisp.c:6146 6146 message_dolog ("", 0, 1, 0); (gdb) finish Run till exit from #0 0x080969b4 in message_log_maybe_newline () at xdisp.c:6146 cmd_error_internal (data=1519920912, context=0xbfffd3d0 "") at keyboard.c:1227 1227 bitch_at_user (); (gdb) finish Run till exit from #0 cmd_error_internal (data=1519920912, context=0xbfffd3d0 "") at keyboard.c:1227 cmd_error (data=1519920912) at keyboard.c:1178 1178 Vquit_flag = Qnil; (gdb) finish Run till exit from #0 cmd_error (data=1519920912) at keyboard.c:1178 internal_condition_case (bfun=0x810bde4 , handlers=405784756, hfun=0x810b9d8 ) at eval.c:1337 1337 } Value returned is $11 = 0 (gdb) finish Run till exit from #0 internal_condition_case ( bfun=0x810bde4 , handlers=405784756, hfun=0x810b9d8 ) at eval.c:1337 0x0810bcba in command_loop_2 () at keyboard.c:1292 1292 val = internal_condition_case (command_loop_1, Qerror, cmd_error); Value returned is $12 = 0 (gdb) finish Run till exit from #0 0x0810bcba in command_loop_2 () at keyboard.c:1292