From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#9087: Crash reading from minibuffer with icomplete-mode Date: Sat, 07 Jan 2012 12:58:34 +0200 Message-ID: <83zkdzg4o5.fsf@gnu.org> References: <83zkkfhk4c.fsf@gnu.org> <871uwng399.fsf@stupidchicken.com> <87obunjg5w.wl%claudio.bley@gmail.com> <83vcovqeu2.fsf@gnu.org> <84ty4ef5ap.wl%claudio.bley@gmail.com> <83vcopno6r.fsf@gnu.org> <83lipkoo60.fsf@gnu.org> <4F071C36.9020401@gmx.at> <83aa60odt9.fsf@gnu.org> <4F074F3F.9030502@gmx.at> <8362goobf6.fsf@gnu.org> <831urco8rt.fsf@gnu.org> <4F081A28.7080401@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1325933950 24389 80.91.229.12 (7 Jan 2012 10:59:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 7 Jan 2012 10:59:10 +0000 (UTC) Cc: claudio.bley@gmail.com, lekktu@gmail.com, 9087@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 07 11:59:05 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RjTzM-0008Sc-UG for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jan 2012 11:59:05 +0100 Original-Received: from localhost ([::1]:44278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjTzM-0004Jv-7U for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jan 2012 05:59:04 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjTzJ-0004Je-PV for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2012 05:59:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjTzI-0003mD-NT for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2012 05:59:01 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjTzI-0003m9-Kd for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2012 05:59:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RjTzJ-0001aF-K7 for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2012 05:59:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Jan 2012 10:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9087 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9087-submit@debbugs.gnu.org id=B9087.13259339296069 (code B ref 9087); Sat, 07 Jan 2012 10:59:01 +0000 Original-Received: (at 9087) by debbugs.gnu.org; 7 Jan 2012 10:58:49 +0000 Original-Received: from localhost ([127.0.0.1]:47778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjTz7-0001Zq-1T for submit@debbugs.gnu.org; Sat, 07 Jan 2012 05:58:49 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:42789) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjTz4-0001Za-CF for 9087@debbugs.gnu.org; Sat, 07 Jan 2012 05:58:47 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LXF00000D0LJU00@a-mtaout23.012.net.il> for 9087@debbugs.gnu.org; Sat, 07 Jan 2012 12:58:38 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.156.26]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LXF000K1D5MEN80@a-mtaout23.012.net.il>; Sat, 07 Jan 2012 12:58:38 +0200 (IST) In-reply-to: <4F081A28.7080401@gmx.at> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55499 Archived-At: > Date: Sat, 07 Jan 2012 11:10:48 +0100 > From: martin rudalics > CC: claudio.bley@gmail.com, lekktu@gmail.com, 9087@debbugs.gnu.org > > > I can avoid the crash with the patch below. But it defers the > > throwing until Emacs is done whatever it was doing (in this case, > > evaluating byte code). Is this acceptable? If not, what can we do to > > make the throwing more "immediate"? > > Could you shortly explain the possible consequences of applying this > patch 1. The crash is avoided. ;-) 2. The Emacs reaction to input event under throw-on-input is delayed until Emacs actually tries to read input. (It is possible that 2. is actually what needs to happen in this case; I don't know because the exact effects of throw-on-input are not documented anywhere I could find.) > and why the crash doesn't happen in non-compiled code To trigger the crash, immediate_quit should be non-zero, because only then would signal_user_input do a QUIT. immediate_quit is set non-zero by `nth' only when we run byte code that calls it (see bytecode.c around line 1007); the function Fnth, called by non-compiled Lisp code, does not do that. The choice of `nth' is just one possibility to trigger this; you can do it in any code that calls some primitive which sets immediate_quit non-zero.