From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.bugs Subject: bug#17691: 24.3.91; crash closing remote frame Date: Thu, 05 Jun 2014 08:53:16 +0400 Message-ID: <538FF7BC.8020203@yandex.ru> References: <6ey4xca9g0.fsf@just-testing.permabit.com> <538F59EE.5020003@yandex.ru> <6evbsg1hkr.fsf@just-testing.permabit.com> <6er4341h15.fsf@just-testing.permabit.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090009030805080305080707" X-Trace: ger.gmane.org 1401944075 26076 80.91.229.3 (5 Jun 2014 04:54:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Jun 2014 04:54:35 +0000 (UTC) Cc: 17691@debbugs.gnu.org To: Ken Raeburn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 05 06:54:25 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WsPgy-0007zk-Lw for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Jun 2014 06:54:20 +0200 Original-Received: from localhost ([::1]:38320 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsPgy-0006Dn-BP for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Jun 2014 00:54:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsPgo-0006Cm-3T for bug-gnu-emacs@gnu.org; Thu, 05 Jun 2014 00:54:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsPgh-00024I-1L for bug-gnu-emacs@gnu.org; Thu, 05 Jun 2014 00:54:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45730) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsPgg-00024B-Tz for bug-gnu-emacs@gnu.org; Thu, 05 Jun 2014 00:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WsPgg-0002cS-Bs for bug-gnu-emacs@gnu.org; Thu, 05 Jun 2014 00:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Antipov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Jun 2014 04:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17691 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17691-submit@debbugs.gnu.org id=B17691.140194401010007 (code B ref 17691); Thu, 05 Jun 2014 04:54:02 +0000 Original-Received: (at 17691) by debbugs.gnu.org; 5 Jun 2014 04:53:30 +0000 Original-Received: from localhost ([127.0.0.1]:44607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WsPg9-0002bK-3P for submit@debbugs.gnu.org; Thu, 05 Jun 2014 00:53:30 -0400 Original-Received: from forward1l.mail.yandex.net ([84.201.143.144]:42848) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WsPg4-0002at-67 for 17691@debbugs.gnu.org; Thu, 05 Jun 2014 00:53:25 -0400 Original-Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [37.140.190.26]) by forward1l.mail.yandex.net (Yandex) with ESMTP id 7F5591521110; Thu, 5 Jun 2014 08:53:17 +0400 (MSK) Original-Received: from smtp1o.mail.yandex.net (localhost [127.0.0.1]) by smtp1o.mail.yandex.net (Yandex) with ESMTP id 0C2D7DE1B21; Thu, 5 Jun 2014 08:53:16 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id akaYzciBtW-rGTuvhFB; Thu, 5 Jun 2014 08:53:16 +0400 (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: 2a497f69-78a3-4bb3-846f-553d3868c700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1401943996; bh=39GKZzHmsm7qySBjGzljXlSn470zWJth7HvsUTTLdBE=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type; b=eUZKfaHDQGemk69J8EttB+QVUgVoSkSuW0BY3Ms/FlTMgnZR9BQbxnFQPIcx2ammQ KLR48tQiDvDjZgjtgGWu6o8SlJiiOXEDas1CMH++/9GvV9C/05ZyHOXuGr2dEWZkho fgfLwJqtIwkVHV56Kehnu5Pf3ehk3eWYHoPvDCsc= Authentication-Results: smtp1o.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <6er4341h15.fsf@just-testing.permabit.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:90016 Archived-At: This is a multi-part message in MIME format. --------------090009030805080305080707 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 06/05/2014 01:49 AM, Ken Raeburn wrote: > A simpler reproduction just worked for me: > > emacs -Q -nw > > in the scratch buffer, evaluate: > > (let ((f (make-frame-on-display ":0" '((font . "7x14"))))) > (delete-frame f)) > > That's killed my Emacs processes pretty reliably. > > Simpler still: > > $ emacs -Q -nw --eval '(let ((f (make-frame-on-display ":0" '"'"'((font . "7x14"))))) (delete-frame f))' > > The terminal window gets a frame, the X display gets a frame, the X > frame goes away, and the terminal-mode Emacs crashes. Please try this against emacs-24 branch or 24.3.91 (this is a backported hybrid of trunk commits 116927 and 117126). If that works for you, this should be incorporated into emacs-24 and included into the next pretest. Dmitry --------------090009030805080305080707 Content-Type: text/x-patch; name="bug17691.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bug17691.patch" === modified file 'src/font.c' --- src/font.c 2014-03-03 19:58:20 +0000 +++ src/font.c 2014-06-05 04:43:59 +0000 @@ -2753,22 +2753,21 @@ val = XCDR (val); else { - Lisp_Object copy; - val = driver_list->driver->list (f, scratch_font_spec); - if (NILP (val)) - val = zero_vector; - else - val = Fvconcat (1, &val); - copy = copy_font_spec (scratch_font_spec); - ASET (copy, FONT_TYPE_INDEX, driver_list->driver->type); - XSETCDR (cache, Fcons (Fcons (copy, val), XCDR (cache))); + if (!NILP (val)) + { + Lisp_Object copy = copy_font_spec (scratch_font_spec); + + val = Fvconcat (1, &val); + ASET (copy, FONT_TYPE_INDEX, driver_list->driver->type); + XSETCDR (cache, Fcons (Fcons (copy, val), XCDR (cache))); + } } - if (ASIZE (val) > 0 + if (VECTORP (val) && ASIZE (val) > 0 && (need_filtering || ! NILP (Vface_ignored_fonts))) val = font_delete_unmatched (val, need_filtering ? spec : Qnil, size); - if (ASIZE (val) > 0) + if (VECTORP (val) && ASIZE (val) > 0) list = Fcons (val, list); } @@ -2804,18 +2803,22 @@ && (NILP (ftype) || EQ (driver_list->driver->type, ftype))) { Lisp_Object cache = font_get_cache (f, driver_list->driver); - Lisp_Object copy; ASET (work, FONT_TYPE_INDEX, driver_list->driver->type); entity = assoc_no_quit (work, XCDR (cache)); if (CONSP (entity)) - entity = XCDR (entity); + entity = AREF (XCDR (entity), 0); else { entity = driver_list->driver->match (f, work); - copy = copy_font_spec (work); - ASET (copy, FONT_TYPE_INDEX, driver_list->driver->type); - XSETCDR (cache, Fcons (Fcons (copy, entity), XCDR (cache))); + if (!NILP (entity)) + { + Lisp_Object copy = copy_font_spec (work); + Lisp_Object match = Fvector (1, &entity); + + ASET (copy, FONT_TYPE_INDEX, driver_list->driver->type); + XSETCDR (cache, Fcons (Fcons (copy, match), XCDR (cache))); + } } if (! NILP (entity)) break; --------------090009030805080305080707--