* Abort on Mac OS X 10.4.11/ppc
@ 2009-07-31 9:28 Yuji Yamano
2009-08-02 11:42 ` Vagn Johansen
2009-08-02 15:38 ` Adrian Robert
0 siblings, 2 replies; 3+ messages in thread
From: Yuji Yamano @ 2009-07-31 9:28 UTC (permalink / raw
To: emacs-devel
Emacs building from the trunk on Mac OS X 10.4.11/ppc crashes
when I eval the following code. It is taken from
http://d.hatena.ne.jp/kazu-yamamoto/20090122/1232589385
(setq my-font "-*-*-medium-r-normal--14-*-*-*-*-*-fontset-hiramaru")
(setq fixed-width-use-QuickDraw-for-ascii t)
(setq mac-allow-anti-aliasing t)
(if (= emacs-major-version 22)
(require 'carbon-font))
(set-default-font my-font)
Here is the stack trace.
yyamano@star-mon% gdb ./nextstep/Emacs.app/Contents/MacOS/Emacs
GNU gdb 6.1-20040303 (Apple version gdb-384) (Mon Mar 21 00:05:26 GMT 2005)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-apple-darwin"...Reading symbols for shared libraries ..... done
(gdb) run -q
Starting program: /Users/yyamano/work/emacs/emacs-current/nextstep/Emacs.app/Contents/MacOS/Emacs -q
Reading symbols for shared libraries ................................................................... done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries ............ done
Reading symbols for shared libraries . done
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x90002dc8 in strlen ()
(gdb) bt
#0 0x90002dc8 in strlen ()
#1 0x90017918 in strdup ()
#2 0x0017d404 in ns_descriptor_to_entity (desc=0xaced10, extra=41944073, style=0x0) at nsfont.m:169
#3 0x0011a9dc in font_matching_entity (f=0xa7f770, attrs=0x2800409, spec=8275280) at font.c:2946
#4 0x0011c6e8 in font_load_for_lface (f=0xa7f770, attrs=0xbfffe028, spec=11312404) at font.c:3513
#5 0x0011c788 in font_open_by_spec (f=0x0, spec=-1552078012) at font.c:3568
#6 0x0011e958 in font_open_by_name (f=0xa7f770, name=0x4822124 "-*-*-medium-r-normal--14-*-*-*-*-*-fontset-hiramaru") at font.c:3586
#7 0x000195c8 in x_set_font (f=0xa7f770, arg=44656056, oldval=42233803) at frame.c:3356
#8 0x00018664 in x_set_frame_parameters (f=0xa7f770, alist=44656059) at frame.c:3002
#9 0x00018d98 in Fmodify_frame_parameters (frame=11007860, alist=7160213) at frame.c:2548
#10 0x001058e0 in Ffuncall (nargs=0, args=0xbfffe374) at eval.c:3048
#11 0x0013f5fc in Fbyte_code (bytestr=-1552078332, vector=42968777, maxdepth=-1073749136) at bytecode.c:678
#12 0x0010538c in funcall_lambda (fun=2271036, nargs=1, arg_vector=0xbfffe4d0) at eval.c:3232
#13 0x001054a8 in apply_lambda (fun=2271036, args=3502652, eval_flag=44656059) at eval.c:3156
#14 0x00104dc0 in Feval (form=2271032) at eval.c:2418
#15 0x0012b248 in readevalloop (readcharfun=22025852, stream=0x0, sourcename=41944073, evalfun=0x1047ac <Feval>, printflag=0, unibyte=3473684, readfun=41944073, start=43410754, end=3376) at lread.c:1790
#16 0x0012b654 in Feval_region (start=1536, end=3376, printflag=41944073, read_function=41944073) at lread.c:1886
#17 0x00105924 in Ffuncall (nargs=0, args=0xbfffe710) at eval.c:3055
#18 0x00102630 in Fcall_interactively (function=42024689, record_flag=41944121, keys=-1073747980) at callint.c:868
#19 0x00105900 in Ffuncall (nargs=0, args=0xbfffe9cc) at eval.c:3051
#20 0x00105bf0 in call3 (fn=0, arg1=-1868219584, arg2=-1552078012, arg3=-1814631196) at eval.c:2871
#21 0x000997bc in Fexecute_extended_command (prefixarg=41944073) at keyboard.c:10637
#22 0x001058c4 in Ffuncall (nargs=0, args=0xbfffeb94) at eval.c:3045
#23 0x00102630 in Fcall_interactively (function=41980001, record_flag=41944073, keys=3473684) at callint.c:868
#24 0x00105900 in Ffuncall (nargs=0, args=0xbfffed6c) at eval.c:3051
#25 0x00105bf0 in call3 (fn=0, arg1=-1868219584, arg2=-1552078012, arg3=-1814631196) at eval.c:2871
#26 0x000a3d70 in command_loop_1 () at keyboard.c:1903
#27 0x00103558 in internal_condition_case (bfun=0xa28c8 <command_loop_1>, handlers=41983665, hfun=0x9a018 <cmd_error>) at eval.c:1512
#28 0x00093990 in command_loop_2 () at keyboard.c:1359
#29 0x001033e4 in internal_catch (tag=0, func=0x93950 <command_loop_2>, arg=41944073) at eval.c:1248
#30 0x0009365c in command_loop () at keyboard.c:1338
#31 0x00093774 in recursive_edit_1 () at keyboard.c:953
#32 0x0009390c in Frecursive_edit () at keyboard.c:1015
#33 0x00092fb0 in main (argc=3473684, argv=0xbffff948) at emacs.c:1854
(gdb) quit
This is the patch to fix the problem. I don't know if it's the rigtht
fix, but it seems to work.
Index: nsfont.m
===================================================================
RCS file: /cvsroot/emacs/emacs/src/nsfont.m,v
retrieving revision 1.33
diff -u -r1.33 nsfont.m
--- nsfont.m 29 Jul 2009 16:03:14 -0000 1.33
+++ nsfont.m 31 Jul 2009 09:23:39 -0000
@@ -166,14 +166,16 @@
Lisp_Object font_entity = font_make_entity ();
/* NSString *psName = [desc postscriptName]; */
NSString *family = [desc objectForKey: NSFontFamilyAttribute];
- char *escapedFamily = strdup ([family UTF8String]);
+ char *escapedFamily = NULL;
+ if (family != nil) {
+ escapedFamily = strdup ([family UTF8String]);
+ ns_escape_name (escapedFamily);
+ }
unsigned int traits = [desc symbolicTraits];
- ns_escape_name (escapedFamily);
-
ASET (font_entity, FONT_TYPE_INDEX, Qns);
ASET (font_entity, FONT_FOUNDRY_INDEX, Qapple);
- ASET (font_entity, FONT_FAMILY_INDEX, intern (escapedFamily));
+ ASET (font_entity, FONT_FAMILY_INDEX, escapedFamily ? intern (escapedFamily) : Qnil);
ASET (font_entity, FONT_ADSTYLE_INDEX, style ? intern (style) : Qnil);
ASET (font_entity, FONT_REGISTRY_INDEX, Qiso10646_1);
@@ -696,8 +698,10 @@
if (nsfont == nil)
{
+ const char* familyName = "";
+ if (family != nil) familyName = [family UTF8String];
message_with_string ("*** Warning: font in family '%s' not found",
- build_string ([family UTF8String]), 1);
+ build_string (familyName), 1);
nsfont = [NSFont userFixedPitchFontOfSize: pixel_size];
}
-- Yuji Yamano
Peace, unity, love and having fun!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Abort on Mac OS X 10.4.11/ppc
2009-07-31 9:28 Abort on Mac OS X 10.4.11/ppc Yuji Yamano
@ 2009-08-02 11:42 ` Vagn Johansen
2009-08-02 15:38 ` Adrian Robert
1 sibling, 0 replies; 3+ messages in thread
From: Vagn Johansen @ 2009-08-02 11:42 UTC (permalink / raw
To: emacs-devel
Yuji Yamano <yyamano@kt.rim.or.jp> writes:
> Emacs building from the trunk on Mac OS X 10.4.11/ppc crashes
> when I eval the following code. It is taken from
> http://d.hatena.ne.jp/kazu-yamamoto/20090122/1232589385
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
> 0x90002dc8 in strlen ()
> (gdb) bt
> #0 0x90002dc8 in strlen ()
> #1 0x90017918 in strdup ()
> #2 0x0017d404 in ns_descriptor_to_entity (desc=0xaced10, extra=41944073, style=0x0) at nsfont.m:169
> #3 0x0011a9dc in font_matching_entity (f=0xa7f770, attrs=0x2800409,
> spec=8275280) at font.c:2946
There same happens to me on OSX 10.4 when (trying to) selecting with
the GUI or the command line
~/src/emacs-23.1>gdb nextstep/Emacs.app/Contents/MacOS/Emacs vj-mac
GNU gdb 6.3.50-20050815 (Apple version gdb-563) (Wed Jul 19 05:10:58 GMT 2006)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries ..... done
(gdb) run -Q -fn dummy
Starting program: /Users/vagn/src/emacs-23.1/nextstep/Emacs.app/Contents/MacOS/Emacs -Q -fn dummy
Reading symbols for shared libraries ....................................................................++ done
2009-08-02 13:35:19.101 Emacs[424] CFLog (0): CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port = 0x2c03, name = 'org.gnu.Emacs.ServiceProvider'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2009-08-02 13:35:19.109 Emacs[424] CFLog (99): CFMessagePortCreateLocal(): failed to name Mach port (org.gnu.Emacs.ServiceProvider)
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x90012f53 in strdup ()
(gdb) bt
#0 0x90012f53 in strdup ()
#1 0x0017bcf5 in ns_descriptor_to_entity (desc=0xadb290, extra=41944073, style=0x0) at nsfont.m:169
#2 0x0011a135 in font_matching_entity (f=0xa8dfb0, attrs=0xbfffea38, spec=1) at font.c:2910
#3 0x0011bb99 in font_load_for_lface (f=0xa8dfb0, attrs=0xbfffea38, spec=11216084) at font.c:3482
#4 0x0011bbf3 in font_open_by_spec (f=0xa8dfb0, spec=11216084) at font.c:3537
#5 0x0011e0a7 in font_open_by_name (f=0xa8dfb0, name=0x2a74148 "dummy") at font.c:3555
#6 0x00012583 in x_set_font (f=0xa8dfb0, arg=42504059, oldval=41944073) at frame.c:3388
#7 0x00011622 in x_set_frame_parameters (f=0xa8dfb0, alist=18943357) at frame.c:3017
#8 0x000136a4 in x_default_parameter (f=0xa8dfb0, alist=18943693, prop=42102857, deflt=44599147, xprop=0x18bc68 "font", xclass=0x1a1140 "Font", type=RES_TYPE_STRING) at frame.c:4130
#9 0x00172222 in Fx_create_frame (parms=18943733) at nsfns.m:1190
#10 0x00106e11 in Ffuncall (nargs=2, args=0xbfffed50) at eval.c:3051
#11 0x001405c3 in Fbyte_code (bytestr=1961451, vector=1961468, maxdepth=5) at bytecode.c:678
#12 0x0010671b in funcall_lambda (fun=1961404, nargs=1, arg_vector=0xbfffeee4) at eval.c:3232
#13 0x00106bfe in Ffuncall (nargs=2, args=0xbfffeee0) at eval.c:3102
#14 0x001405c3 in Fbyte_code (bytestr=2247731, vector=2247748, maxdepth=6) at bytecode.c:678
#15 0x0010671b in funcall_lambda (fun=2247684, nargs=1, arg_vector=0xbffff074) at eval.c:3232
#16 0x00106bfe in Ffuncall (nargs=2, args=0xbffff070) at eval.c:3102
#17 0x001405c3 in Fbyte_code (bytestr=2244995, vector=2245012, maxdepth=6) at bytecode.c:678
#18 0x0010671b in funcall_lambda (fun=2244964, nargs=0, arg_vector=0xbffff204) at eval.c:3232
#19 0x00106bfe in Ffuncall (nargs=1, args=0xbffff200) at eval.c:3102
#20 0x001405c3 in Fbyte_code (bytestr=1997467, vector=1997484, maxdepth=7) at bytecode.c:678
#21 0x0010671b in funcall_lambda (fun=1997444, nargs=0, arg_vector=0xbffff394) at eval.c:3232
#22 0x00106bfe in Ffuncall (nargs=1, args=0xbffff390) at eval.c:3102
#23 0x001405c3 in Fbyte_code (bytestr=1994091, vector=1994108, maxdepth=6) at bytecode.c:678
#24 0x0010671b in funcall_lambda (fun=1994068, nargs=0, arg_vector=0xbffff4b0) at eval.c:3232
#25 0x00106986 in apply_lambda (fun=1994068, args=41944073, eval_flag=1) at eval.c:3156
#26 0x001060d0 in Feval (form=8315189) at eval.c:2436
#27 0x00096c70 in top_level_2 () at keyboard.c:1368
#28 0x00104fa5 in internal_condition_case (bfun=0x96c54 <top_level_2>, handlers=41983689, hfun=0x9d996 <cmd_error>) at eval.c:1512
#29 0x00096cb8 in top_level_1 () at keyboard.c:1376
#30 0x00104e96 in internal_catch (tag=41979809, func=0x96c76 <top_level_1>, arg=41944073) at eval.c:1248
#31 0x000969d3 in command_loop () at keyboard.c:1331
#32 0x00096aa3 in recursive_edit_1 () at keyboard.c:953
#33 0x00096beb in Frecursive_edit () at keyboard.c:1015
#34 0x000955bc in main (argc=4, argv=0xbffff9d4) at emacs.c:1852
(gdb) The program is running. Exit anyway? (y or n) y
error while killing target (killing anyway): assertion failure on line 274 of "/SourceCache/gdb/gdb-563/src/gdb/macosx/macosx-nat-inferior-util.c" in function "macosx_inferior_suspend_ptrace": status.value.sig == TARGET_SIGNAL_STOP
warning: error on line 1758 of "/SourceCache/gdb/gdb-563/src/gdb/macosx/macosx-nat-inferior.c" in function "macosx_kill_inferior_safe": (os/kern) failure (0x5x)
~/src/emacs-23.1>uname -a vj-mac
Darwin vj-mac.local 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386 i386
~/src/emacs-23.1> vj-mac
When I run emacs -Q , call toggle-debug-on-error and then use the
mouse to do "Options" -> "Set Default Font.. I get
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
x-popup-menu((menu-bar) ("Font Menu" ("Misc" ("Default"
"-apple-Monaco-medium-normal-normal-*-12-*-*-*-m-0-iso10646-1")
("fixed" "fixed") ("6x10"
"-misc-fixed-medium-r-normal--10-*-*-*-c-60-iso8859-1" "6x10")
[...]
("14 bold slant"
"-adobe-courier-bold-o-normal--*-140-*-*-m-*-iso8859-1") ("18 bold
slant" "-adobe-courier-bold-o-normal--*-180-*-*-m-*-iso8859-1") ("24
bold slant"
"-adobe-courier-bold-o-normal--*-240-*-*-m-*-iso8859-1")) nil))
mouse-select-font() menu-set-font() call-interactively(menu-set-font
nil nil)
--
Vagn Johansen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Abort on Mac OS X 10.4.11/ppc
2009-07-31 9:28 Abort on Mac OS X 10.4.11/ppc Yuji Yamano
2009-08-02 11:42 ` Vagn Johansen
@ 2009-08-02 15:38 ` Adrian Robert
1 sibling, 0 replies; 3+ messages in thread
From: Adrian Robert @ 2009-08-02 15:38 UTC (permalink / raw
To: emacs-devel
Yuji Yamano <yyamano <at> kt.rim.or.jp> writes:
>
> Emacs building from the trunk on Mac OS X 10.4.11/ppc crashes
> when I eval the following code.
> ...
> This is the patch to fix the problem. I don't know if it's the rigtht
> fix, but it seems to work.
Thank you, I have checked in a slightly different fix to the trunk.
Please let me know if it doesn't work OK for you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-02 15:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-31 9:28 Abort on Mac OS X 10.4.11/ppc Yuji Yamano
2009-08-02 11:42 ` Vagn Johansen
2009-08-02 15:38 ` Adrian Robert
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.