all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: "Peder O. Klingenberg" <peder@klingenberg.no>
Cc: 17125@debbugs.gnu.org
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	[thread overview]
Message-ID: <533B880B.5070009@yandex.ru> (raw)
In-Reply-To: <C1FF4BDB-DC69-42FC-A6D9-DC21E7DB2949@klingenberg.no>

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

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 font.c, reverting my own experiments.
>
> It was not an unconditional success, unfortunately.  Nothing segfaults anymore, but now I’m 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



[-- Attachment #2: bug17125_fixed_2.patch --]
[-- Type: text/x-patch, Size: 1932 bytes --]

=== 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;


  parent reply	other threads:[~2014-04-02  3:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 22:47 bug#17125: 24.4.50; daemon mode: closing X client frame exits entire emacs Peder O. Klingenberg
     [not found] ` <handler.17125.B.13959614234976.ack@debbugs.gnu.org>
2014-04-01 11:35   ` bug#17125: Acknowledgement (24.4.50; daemon mode: closing X client frame exits entire emacs) Peder O. Klingenberg
2014-04-01 13:47     ` Dmitry Antipov
2014-04-01 14:09       ` Peder O. Klingenberg
2014-04-01 15:08         ` Dmitry Antipov
2014-04-01 15:27           ` Andreas Schwab
2014-04-01 16:27             ` Dmitry Antipov
2014-04-01 21:02               ` Peder O. Klingenberg
2014-04-01 22:07                 ` bug#17125: 24.4.50; daemon mode: closing X client frame exits entire emacs Peder O. Klingenberg
2014-04-02  3:46                 ` Dmitry Antipov [this message]
2014-04-02 11:50                   ` Peder O. Klingenberg
2014-04-02 12:24                     ` Dmitry Antipov
2014-04-02 13:01                       ` Peder O. Klingenberg
2014-07-11  9:01 ` Alexis
2014-10-02  2:46 ` bug#17125: Issue still present in pretest 24.3.94.1: in daemon mode, closing X client frame exits entire Emacs Alexis
2014-10-02  7:06   ` Dmitry Antipov
2014-10-02 10:29     ` Alexis
2014-10-02 11:37       ` Dmitry Antipov
2014-10-03  0:53         ` Alexis
2014-10-03  3:52           ` Dmitry Antipov
2014-10-03  6:39 ` Alexis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=533B880B.5070009@yandex.ru \
    --to=dmantipov@yandex.ru \
    --cc=17125@debbugs.gnu.org \
    --cc=peder@klingenberg.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.