From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jimmy Yuen Ho Wong Newsgroups: gmane.emacs.devel Subject: Re: NS port crashes when interacting with the profiler on the menu bar Date: Fri, 15 Jun 2018 01:51:58 +0100 Message-ID: References: <20180612193933.GA889@breton.holly.idiocy.org> <124c265f-9c41-6041-8a7f-ba2e3fcabd07@gmail.com> <20180613195749.GA31667@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000bc5cfe056ea3a0f5" X-Trace: blaine.gmane.org 1529023822 28728 195.159.176.226 (15 Jun 2018 00:50:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 15 Jun 2018 00:50:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 15 02:50:17 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fTcwS-0007Lv-UV for ged-emacs-devel@m.gmane.org; Fri, 15 Jun 2018 02:50:17 +0200 Original-Received: from localhost ([::1]:43701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTcya-0008LE-4h for ged-emacs-devel@m.gmane.org; Thu, 14 Jun 2018 20:52:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTcyT-0008L5-9g for emacs-devel@gnu.org; Thu, 14 Jun 2018 20:52:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTcyS-0002TV-4D for emacs-devel@gnu.org; Thu, 14 Jun 2018 20:52:21 -0400 Original-Received: from mail-io0-x235.google.com ([2607:f8b0:4001:c06::235]:34604) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fTcyR-0002TH-SR for emacs-devel@gnu.org; Thu, 14 Jun 2018 20:52:20 -0400 Original-Received: by mail-io0-x235.google.com with SMTP id e15-v6so9173061iog.1 for ; Thu, 14 Jun 2018 17:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=x/qEyWsihA7H6kjKsa9JC93BukU9dC+HMtkOgb9fXAg=; b=J1/OLgeBvADZzycIJX8Gd1On5JUnktQiwXL8Ph9w/WSwBuK1gJXTqCsFtMXn3DJtLu 4gCqLncp7KPXewKdcSf420gUAbHNIg2OQdBsdt4K0APGmiuGfb3hN9moe6VCb6h4DKBt P8vuncov4lHQZBBBiAAB+Aza6auLPtL0FIq/3LMyoR1d1+Da7pzRTDVryBniYeHRrINP UKASuOBdFXcYaq+u8G7Nek9OxrOquxJdrhn4h33oD04+tV+rsDXQouzi7F3rWHbrnkCw VAE94RAf2+WJ0m/Rlh9AHm3fo76X01QmM9RiTh+HFnap/0jTCnJT9BOA67w7pIdDJVL/ zXLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=x/qEyWsihA7H6kjKsa9JC93BukU9dC+HMtkOgb9fXAg=; b=Y7GUctd2qolGSRXmTJUS0F8j/etZ0lucty8/SY7bbfmt5hu9rN7J6dz2cGWgwqi50W lIiOv2EcvPs7VKVqkcoGrldKwrUUSGP4SA+Oa4n4g+JhJypueI9FMpkJfHY4QqYjQUQB 2i1R4lk8bzV0FC+9PZm5nEgAhXTZh4NECyORfLIZKtvcKwnALFbNC5B9hVyobsdPF31y fnwRkaB+tXgL5qMUhj6e0rBNlezJkTpnRYaGs3M9ezHMfVc00V82Tw8heZ6F7PjUFaLs IW5EdPgJM2tj36En1wwgutpkz0Fgb5Ji36GH5qpZqIBgsq9X0jDdqkKdrpTLWxBPrhTE 8DUQ== X-Gm-Message-State: APt69E1xQUa6fdfdLNpkqRl5tyOSdQJPqnMDn1bRA9k+xE6D5PpELieT x0/V+WNH4gLmADFPUxMlZM0RDCdRuEf57L880D5UN9YU X-Google-Smtp-Source: ADUXVKLKFVs4s9jULGykhS9mB9tWcKxgkr1PQUseYlwY9AhMFmpo3BoQKKl6K0emrl6/s9kECmOrnmpmpjlk9RLmTOg= X-Received: by 2002:a5e:9817:: with SMTP id s23-v6mr4483647ioj.117.1529023938972; Thu, 14 Jun 2018 17:52:18 -0700 (PDT) Original-Received: by 2002:a02:9869:0:0:0:0:0 with HTTP; Thu, 14 Jun 2018 17:51:58 -0700 (PDT) In-Reply-To: <20180613195749.GA31667@breton.holly.idiocy.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226323 Archived-At: --000000000000bc5cfe056ea3a0f5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jun 13, 2018 at 8:57 PM, Alan Third wrote: > On Tue, Jun 12, 2018 at 09:02:35PM +0100, Jimmy Yuen Ho Wong wrote: > > >> Case 2 repro: > > >> > > >> Put this into your init file: > > >> > > >> (set-fontset-font "fontset-default" 'unicode "Apple Color Emoji" nil > > >> 'append) > > >> > > >> Crashes on start up. > > > Again I can=E2=80=99t reproduce it. Do you have anything else in your= init.el > > > that might try to display an emoji or similar? In fact, you=E2=80=99v= e got the > > > colour emoji patch applied, right? I wonder if that changes > > > something... > > Yes I have MacPort's multifonts_color patch applied. > > It doesn=E2=80=99t make any difference here. It=E2=80=99s odd. Can you re= produce the > crash using -Q? > > Do you have symbola installed? > I've finally isolated my problem with this code block: (set-fontset-font "fontset-default" 'unicode "Apple Color Emoji" nil 'append) (use-package all-the-icons :config (add-hook 'after-change-major-mode-hook (lambda () (let* ((icon (all-the-icons-icon-for-mode major-mode)) (face-prop (and (stringp icon) (purecopy (get-text-property 0 'face icon))))) (when (and (stringp icon) (not (string=3D major-mode icon)) face-prop) (setq mode-name icon)))))) > > > >> Case 3 repro: > > >> > > >> 1. Goto System Preferences > Keyword and turn on Show keyboard and > emoji > > >> viewers in menu bar. > > >> 2. Go to emacs NS port, turn on Show Emoji & Symbols to get the emoj= i > > >> viewer out, insert some Emoji > > >> 3. Internal Error dialog pops up, Emacs caught the crash this time. > > > This isn=E2=80=99t a crash, right? I=E2=80=99m pretty sure this is fi= xed in master, > > > specifically commit 703ac3ea1c1ce381f385469a0e88bc29d3fe83c2. I think > > > this should be easily back ported to Emacs 26 if it=E2=80=99s causing= crashes. > > This is a crash, but not a fatal crash, it's the Emacs NS port or Cocoa > > caught it and popped up an Internal Error dialog. For the dialog I can > > choose to let it crash the entire process or continue and ignore it. > > Two patches attached which I believe fix this in emacs-26. I think > they=E2=80=99re safe. The second patch is part of commit > 1daac66a6eedbcbfa32ab920b5c579872d989517 on master, but it adds a new > feature, so probably shouldn=E2=80=99t be applied in full. > Ahh this works on master. Thanks! > -- > Alan Third > --000000000000bc5cfe056ea3a0f5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Wed, Jun 13, 2018 at 8:57 PM, Alan Third &l= t;alan@idiocy.org&= gt; wrote:
On Tue, Jun 12, 2018 at 09:02:35PM +0100, Jimmy Yuen Ho = Wong wrote:
> >> Case 2 repro:
> >>
> >> Put this into your init file:
> >>
> >> (set-fontset-font "fontset-default" 'unicode &q= uot;Apple Color Emoji" nil
> >> 'append)
> >>
> >> Crashes on start up.
> > Again I can=E2=80=99t reproduce it. Do you have anything else in = your init.el
> > that might try to display an emoji or similar? In fact, you=E2=80= =99ve got the
> > colour emoji patch applied, right? I wonder if that changes
> > something...
> Yes I have MacPort's multifonts_color patch applied.

It doesn=E2=80=99t make any difference here. It=E2=80=99s odd. Can y= ou reproduce the
crash using -Q?

Do you have symbola installed?

I've= finally isolated my problem with this code block:

(set-fontset-font "fontset-default" 'unicode "Appl= e Color Emoji" nil 'append)

(u= se-package all-the-icons
=C2=A0 :config
=C2=A0 (add= -hook 'after-change-major-mode-hook
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 (lambda ()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (let* ((icon (all-the-icons-icon-for-mode major-mode))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(face-prop (and (stringp icon) (purecopy (get-text-property 0 = 9;face icon)))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 (when (and (stringp icon) (not (string=3D major-mode icon)) face-pr= op)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (setq mode-name icon))))))
=C2=A0

> >> Case 3 repro:
> >>
> >> 1. Goto System Preferences > Keyword and turn on Show keyb= oard and emoji
> >> viewers in menu bar.
> >> 2. Go to emacs NS port, turn on Show Emoji & Symbols to g= et the emoji
> >> viewer out, insert some Emoji
> >> 3. Internal Error dialog pops up, Emacs caught the crash this= time.
> > This isn=E2=80=99t a crash, right? I=E2=80=99m pretty sure this i= s fixed in master,
> > specifically commit 703ac3ea1c1ce381f385469a0e88bc29d3fe83c2= . I think
> > this should be easily back ported to Emacs 26 if it=E2=80=99s cau= sing crashes.
> This is a crash, but not a fatal crash, it's the Emacs NS port or = Cocoa
> caught it and popped up an Internal Error dialog. For the dialog I can=
> choose to let it crash the entire process or continue and ignore it.
Two patches attached which I believe fix this in emacs-26. I think they=E2=80=99re safe. The second patch is part of commit
1daac66a6eedbcbfa32ab920b5c579872d989517 on master, but it adds a new<= br> feature, so probably shouldn=E2=80=99t be applied in full.
=

Ahh this works on master. Thanks!


--
Alan Third

--000000000000bc5cfe056ea3a0f5--