From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#18573: 24.3.93; set-face-attribute crashes Emacs when started with -nw Date: Sun, 28 Sep 2014 10:44:15 +0200 Message-ID: <5CAB16D6-ECC8-4D23-A0E2-FCEADF48C1B0@swipnet.se> References: <5426E238.6060301@vsm.in> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1411893928 12021 80.91.229.3 (28 Sep 2014 08:45:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Sep 2014 08:45:28 +0000 (UTC) Cc: 18573@debbugs.gnu.org To: "enquiries@vsm.in" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 28 10:45:22 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 1XYA6b-00087t-KC for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Sep 2014 10:45:21 +0200 Original-Received: from localhost ([::1]:58910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYA6b-0001Fq-3F for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Sep 2014 04:45:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYA6T-0001FY-0r for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 04:45:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYA6N-0001nA-TG for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 04:45:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34270) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYA6N-0001jK-Ni for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 04:45:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XYA6I-0003TY-1S for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2014 04:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Sep 2014 08:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18573 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18573-submit@debbugs.gnu.org id=B18573.141189386313295 (code B ref 18573); Sun, 28 Sep 2014 08:45:01 +0000 Original-Received: (at 18573) by debbugs.gnu.org; 28 Sep 2014 08:44:23 +0000 Original-Received: from localhost ([127.0.0.1]:54067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYA5e-0003SM-9n for submit@debbugs.gnu.org; Sun, 28 Sep 2014 04:44:22 -0400 Original-Received: from mailfe07.swip.net ([212.247.154.193]:42403 helo=swip.net) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYA5b-0003SC-6I for 18573@debbugs.gnu.org; Sun, 28 Sep 2014 04:44:20 -0400 X-T2-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 Original-Received: from hosdjarv.se (account mj138573@tele2.se [46.59.42.57] verified) by mailfe07.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 534894815; Sun, 28 Sep 2014 10:44:16 +0200 In-Reply-To: <5426E238.6060301@vsm.in> X-Mailer: Apple Mail (2.1878.6) 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:93812 Archived-At: Hello. 27 sep 2014 kl. 18:13 skrev enquiries@vsm.in: >=20 > When launched via terminal (cli), Emacs crashes by just having this = single line in init.el: >=20 > (set-face-attribute 'default nil :font "Menlo-16") >=20 > Emacs does /not/ crash when launched from the Finder (same init.el) >=20 This seems to be a generic error in xfaces.c. It tries to load a font = without checking the type of frame. The type is tty, but it tries to load a font anyway, and = eventually ends up in (font.c) font_pixel_size, which does: #define FRAME_RES_Y(f) \ (eassert (FRAME_WINDOW_P (f)), FRAME_DISPLAY_INFO (f)->resy) Now, FRAME_DISPLAY_INFO for a NS compiled Emacs is #define FRAME_DISPLAY_INFO(f) ((f)->output_data.ns->display_info) but the frame is not an NS frame, it is a tty frame, so bad things = happen. It is the same for X, but there it just happens to return a nonsense = value, so the code continues without crashing, and eventually discovers = that there are no font dirvers and the load font fails. The code is in xfaces.c, Finternal_set_lisp_face_attribute, around line = 3120 where it calls font_load_for_lface. The code in question is not called if compiled for a tty (#ifdef:ed = out), but it is called when the frame is a tty frame on a non-tty = compiled Emacs. I think these cases should be the same, i.e. font_load_for_lface not = called for tty frames. Jan D. > I am using GNU Emacs 24.3.93.1 (x86_64-apple-darwin13.3.0, NS = apple-appkit-1265.21) of 2014-08-15 on builder10-9.porkrind.org on OS X = 10.9.4 >=20 >=20 > Sam Ask >=20 >=20 >=20 >=20 >=20 > In GNU Emacs 24.3.93.1 (x86_64-apple-darwin13.3.0, NS = apple-appkit-1265.21) > of 2014-08-15 on builder10-9.porkrind.org > Windowing system distributor `Apple', version 10.3.1265 > Configured using: > `configure --with-ns' >=20 > Important settings: > locale-coding-system: utf-8-unix >=20 > Major mode: Fundamental >=20 > Minor modes in effect: > tooltip-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > blink-cursor-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > buffer-read-only: t > line-number-mode: t > transient-mark-mode: t >=20 > Recent input: > M-x e m a c s b u - b > u g - r e p o r t > > > r e > p o r t >=20 > Recent messages: > Loading /Users/sam/.emacs.d/init.el (source)...done > For information about GNU Emacs and the GNU system, type C-h C-a. > delete-backward-char: Text is read-only >=20 > Load-path shadows: > None found. >=20 > Features: > (shadow sort gnus-util mail-extr emacsbug message cl-macs format-spec > rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse > rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 > ietf-drums mm-util help-fns mail-prsvr mail-utils cl gv cl-loaddefs > cl-lib time-date tooltip electric uniquify ediff-hook vc-hooks > lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt > fringe tabulated-list newcomment lisp-mode prog-mode register page > menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock > syntax facemenu font-core frame cham georgian utf-8-lang misc-lang > vietnamese tibetan thai tai-viet lao korean japanese hebrew greek > romanian slovak czech european ethiopic indian cyrillic chinese > case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer = nadvice > loaddefs button faces cus-face macroexp files text-properties overlay > sha1 md5 base64 format env code-pages mule custom widget > hashtable-print-readable backquote make-network-process cocoa ns > multi-tty emacs) >=20 > Memory information: > ((conses 16 75113 4885) > (symbols 48 17760 0) > (miscs 40 78 113) > (strings 32 10523 3551) > (string-bytes 1 303408) > (vectors 16 9703) > (vector-slots 8 378700 13839) > (floats 8 53 97) > (intervals 56 214 0) > (buffers 960 12)) >=20 >=20