GNU bug report logs - #11853
Emacs.app font initialization segfault

Previous Next

Package: emacs;

Reported by: BT Templeton <bpt <at> hcoop.net>

Date: Wed, 4 Jul 2012 05:06:01 UTC

Severity: important

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11853 in the body.
You can then email your comments to 11853 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11853; Package emacs. (Wed, 04 Jul 2012 05:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to BT Templeton <bpt <at> hcoop.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 04 Jul 2012 05:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: BT Templeton <bpt <at> hcoop.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Emacs.app font initialization segfault
Date: Wed, 04 Jul 2012 01:00:33 -0400
When built under GNUstep, Emacs.app crashes while creating the initial
frame:

--8<---------------cut here---------------start------------->8---
Program received signal SIGSEGV, Segmentation fault.
ns_charset_covers (pct=<optimized out>, set2=0x1db24d8, set1=<optimized out>) at nsfont.m:279
279                     off++;
(gdb) bt
#0  ns_charset_covers (pct=<optimized out>, set2=0x1db24d8, set1=<optimized out>) at nsfont.m:279
#1  ns_get_covering_families (script=0x1c83c38, pct=<optimized out>) at nsfont.m:470
#2  ns_findfonts (font_spec=15502181, isMatch=0 '\000') at nsfont.m:514
#3  0x00000000005f1c6c in font_list_entities (frame=21141749, spec=21133645) at font.c:2754
#4  0x00000000005f3acb in font_find_for_lface (f=0x14298f0, attrs=0x7fffffffb2e0, spec=21129941, c=-1) at font.c:3225
#5  0x00000000005f3e3d in font_load_for_lface (f=0x14298f0, attrs=0x7fffffffb2e0, spec=21129941) at font.c:3291
#6  0x00000000005f4029 in font_open_by_spec (f=0x14298f0, spec=21129941) at font.c:3354
#7  0x00000000005f4093 in font_open_by_name (f=0x14298f0, name=0x1c0e5c0 "FreeMono") at font.c:3370
#8  0x000000000044b909 in x_set_font (f=0x14298f0, arg=18808561, oldval=13346530) at frame.c:3177
#9  0x000000000044a4b3 in x_set_frame_parameters (f=0x14298f0, alist=13346530) at frame.c:2822
#10 0x000000000044d5db in x_default_parameter (f=0x14298f0, alist=19139910, prop=15528290, deflt=18808561, xprop=0x6c1333 "font", xclass=0x6c132e "Font", type=RES_TYPE_STRING) at frame.c:3880
#11 0x000000000068c1a0 in Fx_create_frame (parms=19139910) at nsfns.m:1261
#12 0x00000000005d8eef in Ffuncall (nargs=2, args=0x7fffffffb7d8) at eval.c:2819
#13 0x00000000006264a9 in exec_byte_code (bytestr=9921745, vector=9921781, maxdepth=16, args_template=13346530, nargs=0, args=0x0) at bytecode.c:784
#14 0x00000000005d9982 in funcall_lambda (fun=9921677, nargs=1, arg_vector=0x7fffffffbcd0) at eval.c:3051
#15 0x00000000005d90e3 in Ffuncall (nargs=2, args=0x7fffffffbcc8) at eval.c:2868
#16 0x00000000006264a9 in exec_byte_code (bytestr=10574537, vector=10574573, maxdepth=20, args_template=13346530, nargs=0, args=0x0) at bytecode.c:784
#17 0x00000000005d9982 in funcall_lambda (fun=10574477, nargs=1, arg_vector=0x7fffffffc1c0) at eval.c:3051
#18 0x00000000005d90e3 in Ffuncall (nargs=2, args=0x7fffffffc1b8) at eval.c:2868
#19 0x00000000006264a9 in exec_byte_code (bytestr=10569457, vector=10569493, maxdepth=24, args_template=13346530, nargs=0, args=0x0) at bytecode.c:784
#20 0x00000000005d9982 in funcall_lambda (fun=10569405, nargs=0, arg_vector=0x7fffffffc6c0) at eval.c:3051
#21 0x00000000005d90e3 in Ffuncall (nargs=1, args=0x7fffffffc6b8) at eval.c:2868
#22 0x00000000006264a9 in exec_byte_code (bytestr=9959433, vector=9959469, maxdepth=72, args_template=0, nargs=0, args=0x7fffffffcc28) at bytecode.c:784
#23 0x00000000005d966d in funcall_lambda (fun=9959381, nargs=0, arg_vector=0x7fffffffcc28) at eval.c:2985
#24 0x00000000005d90e3 in Ffuncall (nargs=1, args=0x7fffffffcc20) at eval.c:2868
#25 0x00000000006264a9 in exec_byte_code (bytestr=9956345, vector=9956381, maxdepth=32, args_template=0, nargs=0, args=0x7fffffffd070) at bytecode.c:784
#26 0x00000000005d966d in funcall_lambda (fun=9956293, nargs=0, arg_vector=0x7fffffffd070) at eval.c:2985
#27 0x00000000005d942c in apply_lambda (fun=9956293, args=13346530) at eval.c:2928
#28 0x00000000005d7942 in eval_sub (form=18604566) at eval.c:2211
#29 0x00000000005d703e in Feval (form=18604566, lexical=13346530) at eval.c:2020
#30 0x00000000005d7765 in eval_sub (form=18611638) at eval.c:2169
#31 0x0000000000607440 in readevalloop (readcharfun=15462674, stream=0xee55b0, sourcename=15618625, printflag=0, unibyte=13346530, readfun=13346530, start=13346530, end=13346530) at lread.c:1819
#32 0x0000000000605ebb in Fload (file=15511473, noerror=13346530, nomessage=13346530, nosuffix=13346530, must_suffix=13346530) at lread.c:1303
#33 0x00000000005d7801 in eval_sub (form=15451142) at eval.c:2180
#34 0x00000000005d703e in Feval (form=15451142, lexical=13346530) at eval.c:2020
#35 0x000000000052fbf9 in top_level_2 () at keyboard.c:1162
#36 0x00000000005d576b in internal_condition_case (bfun=0x52fbd2 <top_level_2>, handlers=13910114, hfun=0x52f683 <cmd_error>) at eval.c:1332
#37 0x000000000052fc44 in top_level_1 (ignore=13346530) at keyboard.c:1170
#38 0x00000000005d506e in internal_catch (tag=13905986, func=0x52fbfb <top_level_1>, arg=13346530) at eval.c:1089
#39 0x000000000052fb27 in command_loop () at keyboard.c:1125
#40 0x000000000052f129 in recursive_edit_1 () at keyboard.c:752
#41 0x000000000052f318 in Frecursive_edit () at keyboard.c:816
#42 0x000000000052d15f in main (argc=2, argv=0x7fffffffe118) at emacs.c:1693

Lisp Backtrace:
"x-create-frame" (0xffffb7e0)
"x-create-frame-with-faces" (0xffffbcd0)
"make-frame" (0xffffc1c0)
"frame-initialize" (0xffffc6c0)
"command-line" (0xffffcc28)
"normal-top-level" (0xffffd070)
"eval" (0xffffd310)
"load" (0xffffd7e0)
--8<---------------cut here---------------end--------------->8---

This is probably a GNUstep bug, but the following patch fixes the
problem.

diff --git a/src/nsfont.m b/src/nsfont.m
index 556102b..302a2d0 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -271,6 +271,9 @@ ns_charset_covers(NSCharacterSet *set1, NSCharacterSet *set2, float pct)
     const unsigned short *bytes2 = [[set2 bitmapRepresentation] bytes];
     int i, off = 0, tot = 0;
 
+    if (! (bytes1 && bytes2))
+      return NO;
+
     for (i=0; i<4096; i++, bytes1++, bytes2++)
        if (*bytes2)
          {




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Fri, 13 Jul 2012 01:44:02 GMT) Full text and rfc822 format available.

Notification sent to BT Templeton <bpt <at> hcoop.net>:
bug acknowledged by developer. (Fri, 13 Jul 2012 01:44:02 GMT) Full text and rfc822 format available.

Message #10 received at 11853-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: BT Templeton <bpt <at> hcoop.net>
Cc: 11853-done <at> debbugs.gnu.org
Subject: Re: Emacs.app font initialization segfault
Date: Thu, 12 Jul 2012 18:38:22 -0700
Thanks, I installed that fix and am marking this as done.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 10 Aug 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 262 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.