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: Acknowledgement (24.4.50; daemon mode: closing X client frame exits entire emacs) Date: Wed, 02 Apr 2014 07:46:19 +0400 Message-ID: <533B880B.5070009@yandex.ru> References: <533AC37A.7060703@yandex.ru> <533AD678.7080307@yandex.ru> <533AE900.5040507@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020706020007040201020902" X-Trace: ger.gmane.org 1396522197 25514 80.91.229.3 (3 Apr 2014 10:49:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Apr 2014 10:49:57 +0000 (UTC) Cc: 17125@debbugs.gnu.org To: "Peder O. Klingenberg" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 03 12:49:50 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 1WVeLk-0001eo-AX for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Apr 2014 11:54:20 +0200 Original-Received: from localhost ([::1]:35641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVC91-0001eg-Nd for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Apr 2014 23:47:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVC8r-0001dZ-DL for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 23:47:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVC8k-0006Ee-9Z for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 23:47:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVC8k-0006Ea-2n for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 23:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WVC8j-0006bB-Jb for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 23:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Antipov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Apr 2014 03:47:01 +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.139641038725314 (code B ref 17125); Wed, 02 Apr 2014 03:47:01 +0000 Original-Received: (at 17125) by debbugs.gnu.org; 2 Apr 2014 03:46:27 +0000 Original-Received: from localhost ([127.0.0.1]:59939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVC8A-0006aD-Ft for submit@debbugs.gnu.org; Tue, 01 Apr 2014 23:46:26 -0400 Original-Received: from forward5l.mail.yandex.net ([84.201.143.138]:36422) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVC86-0006a3-Lq for 17125@debbugs.gnu.org; Tue, 01 Apr 2014 23:46:24 -0400 Original-Received: from smtp3h.mail.yandex.net (smtp3h.mail.yandex.net [84.201.186.20]) by forward5l.mail.yandex.net (Yandex) with ESMTP id 281AAC40E5B; Wed, 2 Apr 2014 07:46:20 +0400 (MSK) Original-Received: from smtp3h.mail.yandex.net (localhost [127.0.0.1]) by smtp3h.mail.yandex.net (Yandex) with ESMTP id BE46A1B403CD; Wed, 2 Apr 2014 07:46:19 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp3h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Vg10EhOFMe-kJfKfbxD; Wed, 2 Apr 2014 07:46:19 +0400 (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: dc1feb56-dbe7-4d3e-a915-41b23575f29c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1396410379; bh=TqeHMBoAbMWq9WIlhsls3MFyaiCvV+2daIo6meMxbhc=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type; b=C8KB/c9Wz8aQEjG2jzw4KemwlBzu5qvo2u0XFYcnXWheKnsPskWyhpd/sHTMXiw93 xzAaZxHPhmfzL8d1OjEaGSnAiBlRgAg88OGGAr0D8dRP/MOb1gSqYn6pONlSeSv5wv FmI5gfnG/S6WbyfYEukBf8AEUoWXy88uNmzeJY4M= Authentication-Results: smtp3h.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.4.0 In-Reply-To: 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:87639 Archived-At: This is a multi-part message in MIME format. --------------020706020007040201020902 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable On 04/02/2014 01:02 AM, Peder O. Klingenberg wrote: > I skipped your earlier patch, and applied this one on top of a clean fo= nt.c, reverting my own experiments. > > It was not an unconditional success, unfortunately. Nothing segfaults = anymore, but now I=92m not able to attach a graphical emacsclient at all:= > > $ emacsclient -nc -s test > *ERROR*: Wrong type argument: font, [] Hm...should we avoid empty vectors in font cache entities? Try this. Dmitry --------------020706020007040201020902 Content-Type: text/x-patch; name="bug17125_fixed_2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bug17125_fixed_2.patch" === modified file 'src/font.c' --- src/font.c 2014-03-03 19:58:20 +0000 +++ src/font.c 2014-04-02 03:38:22 +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,7 +2803,6 @@ && (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)); @@ -2813,9 +2811,14 @@ 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; --------------020706020007040201020902--