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#17125: Issue still present in pretest 24.3.94.1: in daemon mode, closing X client frame exits entire Emacs Date: Thu, 02 Oct 2014 15:37:35 +0400 Message-ID: <542D38FF.1090000@yandex.ru> References: <87tx3n2nhi.fsf@gmail.com> <542CF978.4080500@yandex.ru> <87oatuix0a.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040001080500070502070405" X-Trace: ger.gmane.org 1412249913 29983 80.91.229.3 (2 Oct 2014 11:38:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Oct 2014 11:38:33 +0000 (UTC) Cc: 17125@debbugs.gnu.org To: Alexis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 02 13:38: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 1XZeiF-0005U4-Et for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Oct 2014 13:38:23 +0200 Original-Received: from localhost ([::1]:33371 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZeiF-0003Rs-0t for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Oct 2014 07:38:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZei2-0003BX-3J for bug-gnu-emacs@gnu.org; Thu, 02 Oct 2014 07:38:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZehu-0008I6-TR for bug-gnu-emacs@gnu.org; Thu, 02 Oct 2014 07:38:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZehu-0008Hs-NB for bug-gnu-emacs@gnu.org; Thu, 02 Oct 2014 07:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XZehu-0003yA-3z for bug-gnu-emacs@gnu.org; Thu, 02 Oct 2014 07:38: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, 02 Oct 2014 11:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17125 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17125-submit@debbugs.gnu.org id=B17125.141224986315231 (code B ref 17125); Thu, 02 Oct 2014 11:38:02 +0000 Original-Received: (at 17125) by debbugs.gnu.org; 2 Oct 2014 11:37:43 +0000 Original-Received: from localhost ([127.0.0.1]:58089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZeha-0003xa-6o for submit@debbugs.gnu.org; Thu, 02 Oct 2014 07:37:42 -0400 Original-Received: from forward8l.mail.yandex.net ([84.201.143.141]:59194) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZehW-0003xP-PH for 17125@debbugs.gnu.org; Thu, 02 Oct 2014 07:37:40 -0400 Original-Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [37.140.190.26]) by forward8l.mail.yandex.net (Yandex) with ESMTP id 4B2C51A4145E; Thu, 2 Oct 2014 15:37:37 +0400 (MSK) Original-Received: from smtp1o.mail.yandex.net (localhost [127.0.0.1]) by smtp1o.mail.yandex.net (Yandex) with ESMTP id AB459DE2DBB; Thu, 2 Oct 2014 15:37:36 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Aony2716yX-baUWbVHO; Thu, 2 Oct 2014 15:37:36 +0400 (using TLSv1.2 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: cb8833bc-f307-4f36-b15a-de2c21ea3fcb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1412249856; bh=GZ6vn9eDXygAfcCyFQh/ZGG2PWWVgmxc25jHpZAiiYY=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type; b=qEyIIHq0lljJv2HVdTBb1ooQp5LMbrs3DfZ6A99o+tiqC/yWztAYD/9WLM+l4tk6R ZYDGlw8IVfTUW8syWVb+VPvmmGEFnZD+Rghab4kcxp2ZyT7wgtBq10sw0L1Xo4kLJS KglXkCD7okY98wqnuQfFX3Fs2e7FSVwtpRlUiLb0= Authentication-Results: smtp1o.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 In-Reply-To: <87oatuix0a.fsf@gmail.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:94019 Archived-At: This is a multi-part message in MIME format. --------------040001080500070502070405 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 10/02/2014 02:29 PM, Alexis wrote: > Breakpoint 1, die (msg=msg@entry=0x664203 "VECTORP (elt)", file=file@entry=0x66b506 "font.c", line=line@entry=2602) at alloc.c:6830 > 6830 { > (gdb) bt > #0 die (msg=msg@entry=0x664203 "VECTORP (elt)", file=file@entry=0x66b506 "font.c", line=line@entry=2602) at alloc.c:6830 > #1 0x00000000005b28b1 in font_clear_cache (cache=16514454, driver=driver@entry=0xc7ac80, f=) > at font.c:2602 > #2 0x00000000005b9332 in font_finish_cache (driver=0xc7ac80, f=0x129cc28) at font.c:2566 This is an old issue hopefully fixed in trunk (and not in emacs-24 due to an annoying oversight). Please try this. Dmitry --------------040001080500070502070405 Content-Type: text/x-diff; name="bug17125_fixed_4.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bug17125_fixed_4.patch" === modified file 'src/font.c' --- src/font.c 2014-09-16 04:07:51 +0000 +++ src/font.c 2014-10-02 11:09:25 +0000 @@ -2756,22 +2756,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); } @@ -2807,18 +2806,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; --------------040001080500070502070405--