From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#1052: segfault when resuming emacsclient -t in an xterm Date: Tue, 30 Sep 2008 18:06:27 -0400 Message-ID: References: <873ajho96t.fsf@cyd.mit.edu> <200809301818.m8UIIGFf003951@mothra.ics.uci.edu> Reply-To: Stefan Monnier , 1052@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1222813816 27535 80.91.229.12 (30 Sep 2008 22:30:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Sep 2008 22:30:16 +0000 (UTC) Cc: 1052@emacsbugs.donarmstrong.com, Chong Yidong To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 01 00:31:14 2008 connect(): Connection refused 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.50) id 1KknkK-00075V-El for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Oct 2008 00:31:08 +0200 Original-Received: from localhost ([127.0.0.1]:35292 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KknjH-00029f-KS for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Sep 2008 18:30:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KknjD-000293-Ct for bug-gnu-emacs@gnu.org; Tue, 30 Sep 2008 18:29:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KknjC-00028X-6h for bug-gnu-emacs@gnu.org; Tue, 30 Sep 2008 18:29:58 -0400 Original-Received: from [199.232.76.173] (port=57446 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KknjC-00028R-2e for bug-gnu-emacs@gnu.org; Tue, 30 Sep 2008 18:29:58 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:43646) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KknjB-0007is-QF for bug-gnu-emacs@gnu.org; Tue, 30 Sep 2008 18:29:58 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8UMTtII016636; Tue, 30 Sep 2008 15:29:55 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8UMF2AL013094; Tue, 30 Sep 2008 15:15:02 -0700 X-Loop: don@donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 30 Sep 2008 22:15:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1052 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1052-submit@emacsbugs.donarmstrong.com id=B1052.122281239411822 (code B ref 1052); Tue, 30 Sep 2008 22:15:02 +0000 Original-Received: (at 1052) by emacsbugs.donarmstrong.com; 30 Sep 2008 22:06:34 +0000 Original-Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8UM6TEK011815 for <1052@emacsbugs.donarmstrong.com>; Tue, 30 Sep 2008 15:06:31 -0700 Original-Received: from alfajor.home (vpn-132-204-232-132.acd.umontreal.ca [132.204.232.132]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id m8UM6SWo000388; Tue, 30 Sep 2008 18:06:28 -0400 Original-Received: by alfajor.home (Postfix, from userid 20848) id CECBB1C3E8; Tue, 30 Sep 2008 18:06:27 -0400 (EDT) In-Reply-To: <200809301818.m8UIIGFf003951@mothra.ics.uci.edu> (Dan Nicolaescu's message of "Tue, 30 Sep 2008 11:18:16 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3115=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 30 Sep 2008 18:29:58 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:20928 Archived-At: >> > The problem is that after the cited change >> > `xterm-remove-modify-other-keys' calls `terminal-live-p' (it was >> > previously using `frame-live-p') before calling >> > `send-string-to-terminal'. >> > >> > `terminal-live-p' does not return false when tty->output is NULL ---> >> > KABOOM. >> >> Looks like it's just a matter of checking tty->output, then. WDYT? > Not sure it's a good idea. > The test for `frame-live-p' was trying to make sure that the frame is OK > and `send-string-to-terminal' would work. > Not sure > 1. why was it replaced with `terminal-live-p' Because the function receives a `terminal' argument. > 2. maybe `terminal-live-p' needs to be changed to detect this condition I think there are 2 problems: 1- xterm-remove-modify-other-keys forgets to pass `terminal' to `send-string-to-terminal'. Hopefully, I've just fixed it, so that your recipe should not causes a segfault any more. 2- send-string-to-terminal causes a segfault is called for a terminal that is suspended. I've made it signal an error. Stefan