From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#11964: describe-char causes a fatal error (abort trap: 6) in non-windowed mode Date: Sun, 25 Nov 2012 17:56:06 +0200 Message-ID: <83ehjhznft.fsf@gnu.org> References: <87bofcuo12.fsf@gnu.org> <87haogkf76.fsf@gnu.org> <97BC8D6C-F53B-4E18-9089-B4F8D7E39372@swipnet.se> <83k3tazwx2.fsf@gnu.org> <87fw3yb661.fsf@gnu.org> <3BA11CAB-DDBC-4F9A-9DBA-7BDA5F2182E2@swipnet.se> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1353859055 31854 80.91.229.3 (25 Nov 2012 15:57:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Nov 2012 15:57:35 +0000 (UTC) Cc: ninestraycats@gmail.com, 11964@debbugs.gnu.org, cyd@gnu.org To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 25 16:57:46 2012 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 1TceaY-00048J-8a for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Nov 2012 16:57:46 +0100 Original-Received: from localhost ([::1]:35075 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TceaN-0001g2-H5 for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Nov 2012 10:57:35 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TceaH-0001fl-3p for bug-gnu-emacs@gnu.org; Sun, 25 Nov 2012 10:57:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TceaC-0007Q0-LY for bug-gnu-emacs@gnu.org; Sun, 25 Nov 2012 10:57:29 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56314) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TceaC-0007Pv-IC for bug-gnu-emacs@gnu.org; Sun, 25 Nov 2012 10:57:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tcebm-0002JM-0m for bug-gnu-emacs@gnu.org; Sun, 25 Nov 2012 10:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Nov 2012 15:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11964 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11964-submit@debbugs.gnu.org id=B11964.13538590898824 (code B ref 11964); Sun, 25 Nov 2012 15:59:01 +0000 Original-Received: (at 11964) by debbugs.gnu.org; 25 Nov 2012 15:58:09 +0000 Original-Received: from localhost ([127.0.0.1]:38332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tcear-0002IC-8w for submit@debbugs.gnu.org; Sun, 25 Nov 2012 10:58:09 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:36756) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tceam-0002Hk-4L for 11964@debbugs.gnu.org; Sun, 25 Nov 2012 10:58:04 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0ME100900W6N8H00@a-mtaout22.012.net.il> for 11964@debbugs.gnu.org; Sun, 25 Nov 2012 17:55:58 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0ME1005NWW99RND1@a-mtaout22.012.net.il>; Sun, 25 Nov 2012 17:55:58 +0200 (IST) In-reply-to: <3BA11CAB-DDBC-4F9A-9DBA-7BDA5F2182E2@swipnet.se> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:67448 Archived-At: > From: Jan Dj=E4rv > Date: Sun, 25 Nov 2012 13:18:28 +0100 > Cc: Eli Zaretskii , > ninestraycats@gmail.com, > 11964@debbugs.gnu.org >=20 > Actually it is not quite fixed, and not NS-specific either. > On a X11-emacs, do this (tried with Gtk2, 3 and Lucid, no differenc= e): >=20 > % emacs -Q --daemon > % emacsclient -c & > % emacsclient -c -t >=20 > In the second, non-GUI frame do (from this bug): > u C-x 8 0303 C-b C-u C-x =3D >=20 > The emacs daemon crashes, the same way as the original bug does. > This is because the emacsclient -c creates fontsets, and emacsclien= t -c -t tries to use them. >=20 > So this is a more generic problem. The fix I made was to initializ= e fontsets in ns-win.el the same way x-win.el does, but this just hid= es the problem for the daemon case. It is wrong to call internal-char-font on a non-GUI frame; for starters, that function might not be compiled in, e.g. if Emacs was configured --without-x. All the other callers of that function are careful not to do that. Does the patch below fix the problem? I also think internal-char-font should not blindly call the font driver without checking that it isn't NULL first. =3D=3D=3D modified file 'lisp/descr-text.el' --- lisp/descr-text.el=092012-08-20 11:12:16 +0000 +++ lisp/descr-text.el=092012-11-25 15:46:44 +0000 @@ -354,7 +354,8 @@ This function is semi-obsolete. Use `ge ;; Return a string of CH with composition for padding on both sides. ;; It is displayed without overlapping with the left/right columns. (defsubst describe-char-padded-string (ch) - (if (internal-char-font nil ch) + (if (and (display-multi-font-p) +=09 (internal-char-font nil ch)) (compose-string (string ch) 0 1 (format "\t%c\t" ch)) (string ch))) =20