Subject: NS: crash when setting face background colors
From: David Reitter <[email-masked]>
To: [email-masked]
Date: Mon, 2 Mar 2009 13:40:28 -0500

Setting the fringe background color to "undefined", or setting the  
default face background color to "green" or "Green" causes crashes in  
draw_fringe_bitmap_1 and x_set_background_color, respectively.

To produce the below crashes, I used M-x customize-face.  The crash  
occurs after clicking on "Set for current session".
Note that the color per se seems to be recognized correctly at first,  
since the "sample" next to the color field is colored correctly.

This is an unpatched Emacs from CVS (atomized.org build).

Process:         Emacs [94673]
Path:            /Users/dr/Downloads/Emacs.app/Contents/MacOS/Emacs
Identifier:      org.gnu.Emacs
Version:         Version 23.0.91 (9.0)
Code Type:       X86 (Native)
Parent Process:  launchd [76]

Date/Time:       2009-03-02 13:34:42.191 -0500
OS Version:      Mac OS X 10.5.6 (9G55)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000c0000003
Crashed Thread:  0

Thread 0 Crashed:
0   libSystem.B.dylib             	0x9019ce42 __kill + 10
1   org.gnu.Emacs                 	0x00091aca fatal_error_signal + 314
2   libSystem.B.dylib             	0x9019b2bb _sigtramp + 43
3   ???                           	0xffffffff 0 + 4294967295
4   libSystem.B.dylib             	0x9020f23a raise + 26
5   libSystem.B.dylib             	0x9021b679 abort + 73
6   org.gnu.Emacs                 	0x0016c185 ns_term_shutdown + 117
7   org.gnu.Emacs                 	0x00091b1f fatal_error_signal + 399
8   libSystem.B.dylib             	0x9019b2bb _sigtramp + 43
9   ???                           	0xffffffff 0 + 4294967295
10  org.gnu.Emacs                 	0x0018befc draw_fringe_bitmap_1 + 748
11  org.gnu.Emacs                 	0x0018c46a draw_fringe_bitmap + 90
12  org.gnu.Emacs                 	0x0018c6b8 draw_row_fringe_bitmaps  
+ 136
13  org.gnu.Emacs                 	0x0018c799 draw_window_fringes + 185
14  org.gnu.Emacs                 	0x00166d31 ns_update_window_end + 337
15  org.gnu.Emacs                 	0x000081e9 update_window + 793
16  org.gnu.Emacs                 	0x00009833 update_window_tree + 147
17  org.gnu.Emacs                 	0x0000aa92 update_frame + 194
18  org.gnu.Emacs                 	0x000363eb redisplay_internal + 4411
19  org.gnu.Emacs                 	0x000369aa  
redisplay_preserve_echo_area + 170
20  org.gnu.Emacs                 	0x0009f300 read_char + 1760
21  org.gnu.Emacs                 	0x000a1e04 read_key_sequence + 884
22  org.gnu.Emacs                 	0x000a432a command_loop_1 + 570
23  org.gnu.Emacs                 	0x001079ad internal_condition_case  
+ 253
24  org.gnu.Emacs                 	0x00093dc8 command_loop_2 + 72
25  org.gnu.Emacs                 	0x0010788c internal_catch + 172
26  org.gnu.Emacs                 	0x00093b1e command_loop + 174
27  org.gnu.Emacs                 	0x00093be2 recursive_edit_1 + 146
28  org.gnu.Emacs                 	0x00093d61 Frecursive_edit + 257
29  org.gnu.Emacs                 	0x000926a5 main + 2885
30  org.gnu.Emacs                 	0x000029d6 start + 54

Thread 0 crashed with X86 Thread State (32-bit):
   eax: 0x00000000  ebx: 0x0009199e  ecx: 0xbfffe24c  edx: 0x9019ce42
   edi: 0x00000006  esi: 0x00000006  ebp: 0xbfffe268  esp: 0xbfffe24c
    ss: 0x0000001f  efl: 0x00000286  eip: 0x9019ce42   cs: 0x00000007
    ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
   cr2: 0x01b19000

Process:         Emacs [94691]
Path:            /Users/dr/Downloads/Emacs.app/Contents/MacOS/Emacs
Identifier:      org.gnu.Emacs
Version:         Version 23.0.91 (9.0)
Code Type:       X86 (Native)
Parent Process:  launchd [76]

Date/Time:       2009-03-02 13:36:04.388 -0500
OS Version:      Mac OS X 10.5.6 (9G55)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000ffefd955
Crashed Thread:  0

Thread 0 Crashed:
0   libSystem.B.dylib             	0x9019ce42 __kill + 10
1   org.gnu.Emacs                 	0x00091aca fatal_error_signal + 314
2   libSystem.B.dylib             	0x9019b2bb _sigtramp + 43
3   ???                           	0xffffffff 0 + 4294967295
4   libSystem.B.dylib             	0x9020f23a raise + 26
5   libSystem.B.dylib             	0x9021b679 abort + 73
6   org.gnu.Emacs                 	0x0016c185 ns_term_shutdown + 117
7   org.gnu.Emacs                 	0x00091b1f fatal_error_signal + 399
8   libSystem.B.dylib             	0x9019b2bb _sigtramp + 43
9   ???                           	0xffffffff 0 + 4294967295
10  org.gnu.Emacs                 	0x00177b88 x_set_background_color +  
504
11  org.gnu.Emacs                 	0x00012406 x_set_frame_parameters +  
486
12  org.gnu.Emacs                 	0x00012f62 Fmodify_frame_parameters  
+ 434
13  org.gnu.Emacs                 	0x0008a273  
Finternal_set_lisp_face_attribute + 1251
14  org.gnu.Emacs                 	0x00109a88 Ffuncall + 1016
15  org.gnu.Emacs                 	0x00144c4b Fbyte_code + 3835
16  org.gnu.Emacs                 	0x00109311 funcall_lambda + 209
17  org.gnu.Emacs                 	0x0010985b Ffuncall + 459
18  org.gnu.Emacs                 	0x0010b275 Fapply + 245
19  org.gnu.Emacs                 	0x001099f3 Ffuncall + 867
20  org.gnu.Emacs                 	0x00144c4b Fbyte_code + 3835
21  org.gnu.Emacs                 	0x00109311 funcall_lambda + 209
22  org.gnu.Emacs                 	0x0010985b Ffuncall + 459
23  org.gnu.Emacs                 	0x00144c4b Fbyte_code + 3835
24  org.gnu.Emacs                 	0x00109311 funcall_lambda + 209
25  org.gnu.Emacs                 	0x0010985b Ffuncall + 459
26  org.gnu.Emacs                 	0x00144c4b Fbyte_code + 3835
27  org.gnu.Emacs                 	0x00109311 funcall_lambda + 209
28  org.gnu.Emacs                 	0x0010985b Ffuncall + 459
29  org.gnu.Emacs                 	0x0010adc9 call1 + 25
30  org.gnu.Emacs                 	0x0008e4c9  
update_face_from_frame_parameter + 377
31  org.gnu.Emacs                 	0x00177b1f x_set_background_color +  
399
32  org.gnu.Emacs                 	0x00012406 x_set_frame_parameters +  
486
33  org.gnu.Emacs                 	0x00012f62 Fmodify_frame_parameters  
+ 434
34  org.gnu.Emacs                 	0x0008a273  
Finternal_set_lisp_face_attribute + 1251
35  org.gnu.Emacs                 	0x00109a88 Ffuncall + 1016
36  org.gnu.Emacs                 	0x00144c4b Fbyte_code + 3835
37  org.gnu.Emacs                 	0x00109311 funcall_lambda + 209
38  org.gnu.Emacs                 	0x0010985b Ffuncall + 459
39  org.gnu.Emacs                 	0x0010b275 Fapply + 245
40  org.gnu.Emacs                 	0x001099f3 Ffuncall + 867
41  org.gnu.Emacs                 	0x00144c4b Fbyte_code + 3835
42  org.gnu.Emacs                 	0x00109311 funcall_lambda + 209
43  org.gnu.Emacs                 	0x0010985b Ffuncall + 459
44  org.gnu.Emacs                 	0x00144c4b Fbyte_code + 3835
45  org.gnu.Emacs                 	0x00109311 funcall_lambda + 209
46  org.gnu.Emacs                 	0x0010985b Ffuncall + 459
47  org.gnu.Emacs                 	0x00144c4b Fbyte_code + 3835
48  org.gnu.Emacs                 	0x00109311 funcall_lambda + 209
49  org.gnu.Emacs                 	0x0010985b Ffuncall + 459
50  org.gnu.Emacs                 	0x00144c4b Fbyte_code + 3835
51  org.gnu.Emacs                 	0x00109311 funcall_lambda + 209
52  org.gnu.Emacs                 	0x0010985b Ffuncall + 459
53  org.gnu.Emacs                 	0x0010b290 Fapply + 272
54  org.gnu.Emacs                 	0x0011504e Fwidget_apply + 78
55  org.gnu.Emacs                 	0x001099f3 Ffuncall + 867
56  org.gnu.Emacs                 	0x00144c4b Fbyte_code + 3835
57  org.gnu.Emacs                 	0x00109311 funcall_lambda + 209
58  org.gnu.Emacs                 	0x0010985b Ffuncall + 459
59  org.gnu.Emacs                 	0x0010adc9 call1 + 25
60  org.gnu.Emacs                 	0x00113ac6 mapcar1 + 518
61  org.gnu.Emacs                 	0x00113ea1 Fmapc + 81
62  org.gnu.Emacs                 	0x00109a88 Ffuncall + 1016
63  org.gnu.Emacs                 	0x00144c4b Fbyte_code + 3835
64  org.gnu.Emacs                 	0x00109311 funcall_lambda + 209
65  org.gnu.Emacs                 	0x0010985b Ffuncall + 459
66  org.gnu.Emacs                 	0x00144c4b Fbyte_code + 3835
67  org.gnu.Emacs                 	0x00109311 funcall_lambda + 209
68  org.gnu.Emacs                 	0x0010985b Ffuncall + 459
69  org.gnu.Emacs                 	0x0010b37c Fapply + 508
70  org.gnu.Emacs                 	0x0011504e Fwidget_apply + 78
71  org.gnu.Emacs                 	0x001099f3 Ffuncall + 867
72  org.gnu.Emacs                 	0x00144c4b Fbyte_code + 3835
73  org.gnu.Emacs                 	0x00109311 funcall_lambda + 209
74  org.gnu.Emacs                 	0x0010985b Ffuncall + 459
75  org.gnu.Emacs                 	0x00144c4b Fbyte_code + 3835
76  org.gnu.Emacs                 	0x00108e76 Feval + 1062
77  org.gnu.Emacs                 	0x0010788c internal_catch + 172
78  org.gnu.Emacs                 	0x00145606 Fbyte_code + 6326
79  org.gnu.Emacs                 	0x00109311 funcall_lambda + 209
80  org.gnu.Emacs                 	0x0010985b Ffuncall + 459
81  org.gnu.Emacs                 	0x00105c32 Fcall_interactively + 3330
82  org.gnu.Emacs                 	0x00109a61 Ffuncall + 977
83  org.gnu.Emacs                 	0x00109c19 call3 + 25
84  org.gnu.Emacs                 	0x000a4571 command_loop_1 + 1153
85  org.gnu.Emacs                 	0x001079ad internal_condition_case  
+ 253
86  org.gnu.Emacs                 	0x00093dc8 command_loop_2 + 72
87  org.gnu.Emacs                 	0x0010788c internal_catch + 172
88  org.gnu.Emacs                 	0x00093b1e command_loop + 174
89  org.gnu.Emacs                 	0x00093be2 recursive_edit_1 + 146
90  org.gnu.Emacs                 	0x00093d61 Frecursive_edit + 257
91  org.gnu.Emacs                 	0x000926a5 main + 2885
92  org.gnu.Emacs                 	0x000029d6 start + 54

Thread 0 crashed with X86 Thread State (32-bit):
   eax: 0x00000000  ebx: 0x0009199e  ecx: 0xbfffca0c  edx: 0x9019ce42
   edi: 0x00000006  esi: 0x00000006  ebp: 0xbfffca28  esp: 0xbfffca0c
    ss: 0x0000001f  efl: 0x00000282  eip: 0x9019ce42   cs: 0x00000007
    ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
   cr2: 0xffefd955