Subject: Re: #1362 - 23.0.60 Crash - Emacs bug report logs

From: Jason Schadel <[email-masked]>
Date: Mon, 24 Nov 2008 10:12:39 -0500

On Nov 21, 2008, at 3:51 PM, Adrian Robert wrote:

> Hi,
>
> There's something fishy in your stack trace:
>
> #3  0x001a92f3 in free_image (f=0x0, img=0x413e010) at image.c:1322
> #4  0x001a9c4b in clear_image_cache (f=0x41b37b0, filter=83886089) at
> image.c:1836
>
> First f has a value, then it goes to 0.  I'm also a bit fuzzy on  
> which line the crash is actually at, since there is no message send  
> at the line indicated.  If you get a chance, could you possibly  
> recompile without any optimization (setenv CFLAGS '-g' before  
> configure is one way) and regenerate the stack trace?
>
> thanks,
> Adrian
>

Here's the 'bt full' output from gdb on a non-optimized emacs.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x79736165
0x9120c684 in objc_msgSend ()
(gdb) bt full
#0  0x9120c684 in objc_msgSend ()
No symbol table info available.
#1  0x001e2e8f in ns_free_indexed_color (idx=4290295992, f=0xb216be0)  
at nsterm.m:1301
	color_table = (struct ns_color_table *) 0x41467b0
	color = (NSColor *) 0x79736165
#2  0x00212fd9 in x_clear_image_1 (f=0xb216be0, img=0xbc4bd60,  
pixmap_p=1, mask_p=1, colors_p=1) at image.c:1627
No locals.
#3  0x00213073 in x_clear_image (f=0xb216be0, img=0xbc4bd60) at  
image.c:1660
No locals.
#4  0x002129b2 in free_image (f=0xb216be0, img=0xbc4bd60) at image.c: 
1322
	c = (struct image_cache *) 0x660a580
#5  0x0021349a in clear_image_cache (f=0xb216be0, filter=83886089) at  
image.c:1836
	img = (struct image *) 0xbc4bd60
	t = {
   tv_sec = 1227539110,
   tv_usec = 752091
}
	old = 1227537310
	i = 2
	nfreed = 0
	c = (struct image_cache *) 0x660a580
#6  0x00213563 in clear_image_caches (filter=83886089) at image.c:1873
	tail = 186622533
	frame = 186739684
#7  0x000b3f7a in clear_face_cache (clear_fonts_p=0) at xfaces.c:963
	tail = 83886089
	frame = 68927268
	f = (struct frame *) 0x41bbf20
#8  0x000b3e4e in recompute_basic_faces (f=0xb216be0) at xfaces.c:915
No locals.
#9  0x00020a47 in init_iterator (it=0xbfffdfd4, w=0xbc214d0,  
charpos=-1, bytepos=-1, row=0x0, base_face_id=DEFAULT_FACE_ID) at  
xdisp.c:2599
	highlight_region_p = 198172627
	remapped_base_face_id = DEFAULT_FACE_ID
#10 0x000309ea in x_consider_frame_title (frame=186739684) at xdisp.c: 
9435
	tail = 75122381
	fmt = 83886137
	title_start = 0
	len = 114362368
	count = 4
	title = 0x34a9 "\213E\b\203`<\376\311\303U\211\345S\203\354T\350"
	it = {
   window = 197268692,
   w = 0xbc214d0,
   f = 0xb216be0,
   method = GET_FROM_BUFFER,
   stop_charpos = 0,
   end_charpos = 0,
   s = 0x0,
   string_nchars = 0,
   region_beg_charpos = 0,
   region_end_charpos = 0,
   redisplay_end_trigger_charpos = 0,
   multibyte_p = 0,
   header_line_p = 0,
   string_from_display_prop_p = 0,
   ellipsis_p = 0,
   avoid_cursor_p = 0,
   dp = 0x0,
   dpvec = 0x0,
   dpend = 0x0,
   dpvec_char_len = 0,
   dpvec_face_id = 0,
   saved_face_id = 0,
   ctl_chars = {0 <repeats 16 times>},
   start = {
     pos = {
       charpos = 0,
       bytepos = 0
     },
     overlay_string_index = 0,
     string_pos = {
       charpos = 0,
       bytepos = 0
     },
     dpvec_index = 0
   },
   current = {
     pos = {
       charpos = 0,
       bytepos = 0
     },
     overlay_string_index = -1,
     string_pos = {
       charpos = -1,
       bytepos = -1
     },
     dpvec_index = -1
   },
   n_overlay_strings = 0,
   overlay_strings = {0 <repeats 16 times>},
   string_overlays = {0 <repeats 16 times>},
   string = 83886089,
   from_overlay = 0,
   stack = {{
       string = 0,
       string_nchars = 0,
       end_charpos = 0,
       stop_charpos = 0,
       cmp_it = {
         stop_pos = 0,
         id = 0,
         ch = 0,
         lookback = 0,
         nglyphs = 0,
         nchars = 0,
         nbytes = 0,
         from = 0,
         to = 0,
         width = 0
       },
       face_id = 0,
       u = {
         image = {
           object = 0,
           slice = {
             x = 0,
             y = 0,
             width = 0,
             height = 0
           },
           image_id = 0
         },
         comp = {
           object = 0
         },
         stretch = {
           object = 0
         }
       },
       position = {
         charpos = 0,
         bytepos = 0
       },
       current = {
         pos = {
           charpos = 0,
           bytepos = 0
         },
         overlay_string_index = 0,
         string_pos = {
           charpos = 0,
           bytepos = 0
         },
         dpvec_index = 0
       },
       from_overlay = 0,
       area = LEFT_MARGIN_AREA,
       method = GET_FROM_BUFFER,
       multibyte_p = 0,
       string_from_display_prop_p = 0,
       display_ellipsis_p = 0,
       avoid_cursor_p = 0,
       voffset = 0,
       space_width = 0,
       font_height = 0
     }, {
       string = 0,
       string_nchars = 0,
       end_charpos = 0,
       stop_charpos = 0,
       cmp_it = {
         stop_pos = 0,
         id = 0,
         ch = 0,
         lookback = 0,
         nglyphs = 0,
         nchars = 0,
         nbytes = 0,
         from = 0,
         to = 0,
         width = 0
       },
       face_id = 0,
       u = {
         image = {
           object = 0,
           slice = {
             x = 0,
             y = 0,
             width = 0,
             height = 0
           },
           image_id = 0
         },
         comp = {
           object = 0
         },
         stretch = {
           object = 0
         }
       },
       position = {
         charpos = 0,
         bytepos = 0
       },
       current = {
         pos = {
           charpos = 0,
           bytepos = 0
         },
         overlay_string_index = 0,
         string_pos = {
           charpos = 0,
           bytepos = 0
         },
         dpvec_index = 0
       },
       from_overlay = 0,
       area = LEFT_MARGIN_AREA,
       method = GET_FROM_BUFFER,
       multibyte_p = 0,
       string_from_display_prop_p = 0,
       display_ellipsis_p = 0,
       avoid_cursor_p = 0,
       voffset = 0,
       space_width = 0,
       font_height = 0
     }, {
       string = 0,
       string_nchars = 0,
       end_charpos = 0,
       stop_charpos = 0,
       cmp_it = {
         stop_pos = 0,
         id = 0,
         ch = 0,
         lookback = 0,
         nglyphs = 0,
         nchars = 0,
         nbytes = 0,
         from = 0,
         to = 0,
         width = 0
       },
       face_id = 0,
       u = {
         image = {
           object = 0,
           slice = {
             x = 0,
             y = 0,
             width = 0,
             height = 0
           },
           image_id = 0
         },
         comp = {
           object = 0
         },
         stretch = {
           object = 0
         }
       },
       position = {
         charpos = 0,
         bytepos = 0
       },
       current = {
         pos = {
           charpos = 0,
           bytepos = 0
         },
         overlay_string_index = 0,
         string_pos = {
           charpos = 0,
           bytepos = 0
         },
         dpvec_index = 0
       },
       from_overlay = 0,
       area = LEFT_MARGIN_AREA,
       method = GET_FROM_BUFFER,
       multibyte_p = 0,
       string_from_display_prop_p = 0,
       display_ellipsis_p = 0,
       avoid_cursor_p = 0,
       voffset = 0,
       space_width = 0,
       font_height = 0
     }, {
       string = 0,
       string_nchars = 0,
       end_charpos = 0,
       stop_charpos = 0,
       cmp_it = {
         stop_pos = 0,
         id = 0,
         ch = 0,
         lookback = 0,
         nglyphs = 0,
         nchars = 0,
         nbytes = 0,
         from = 0,
         to = 0,
         width = 0
       },
       face_id = 0,
       u = {
         image = {
           object = 0,
           slice = {
             x = 0,
             y = 0,
             width = 0,
             height = 0
           },
           image_id = 0
         },
         comp = {
           object = 0
         },
         stretch = {
           object = 0
         }
       },
       position = {
         charpos = 0,
         bytepos = 0
       },
       current = {
         pos = {
           charpos = 0,
           bytepos = 0
         },
         overlay_string_index = 0,
         string_pos = {
           charpos = 0,
           bytepos = 0
         },
         dpvec_index = 0
       },
       from_overlay = 0,
       area = LEFT_MARGIN_AREA,
       method = GET_FROM_BUFFER,
       multibyte_p = 0,
       string_from_display_prop_p = 0,
       display_ellipsis_p = 0,
       avoid_cursor_p = 0,
       voffset = 0,
       space_width = 0,
       font_height = 0
     }},
   sp = 0,
   selective = 0,
   what = IT_CHARACTER,
   face_id = 0,
   selective_display_ellipsis_p = 0,
   ctl_arrow_p = 0,
   face_box_p = 0,
   start_of_box_run_p = 0,
   end_of_box_run_p = 0,
   overlay_strings_at_end_processed_p = 0,
   ignore_overlay_strings_at_pos_p = 0,
   glyph_not_available_p = 0,
   starts_in_middle_of_char_p = 0,
   face_before_selective_p = 0,
   constrain_row_ascent_descent_p = 0,
   line_wrap = TRUNCATE,
   base_face_id = 0,
   c = 0,
   len = 0,
   cmp_it = {
     stop_pos = 0,
     id = -1,
     ch = 0,
     lookback = 0,
     nglyphs = 0,
     nchars = 0,
     nbytes = 0,
     from = 0,
     to = 0,
     width = 0
   },
   char_to_display = 0,
   image_id = 0,
   slice = {
     x = 0,
     y = 0,
     width = 0,
     height = 0
   },
   space_width = 0,
   voffset = 0,
   tab_width = 0,
   font_height = 0,
   object = 0,
   position = {
     charpos = 0,
     bytepos = 0
   },
   truncation_pixel_width = 0,
   continuation_pixel_width = 0,
   first_visible_x = 0,
   last_visible_x = 0,
   last_visible_y = 0,
   extra_line_spacing = 0,
   max_extra_line_spacing = 0,
   override_ascent = 0,
   override_descent = 0,
   override_boff = 0,
   glyph_row = 0x0,
   area = LEFT_MARGIN_AREA,
   nglyphs = 0,
   pixel_width = 0,
   ascent = 0,
   descent = 0,
   max_ascent = 0,
   max_descent = 0,
   phys_ascent = 0,
   phys_descent = 0,
   max_phys_ascent = 0,
   max_phys_descent = 0,
   current_x = 0,
   continuation_lines_width = 0,
   current_y = 0,
   first_vpos = 0,
   vpos = 0,
   hpos = 0,
   left_user_fringe_bitmap = 0,
   right_user_fringe_bitmap = 0,
   left_user_fringe_face_id = 0,
   right_user_fringe_face_id = 0
}
	f = (struct frame *) 0xb216be0
#11 0x00030c55 in prepare_menu_bars () at xdisp.c:9519
	tail = 186622533
	frame = 186739684
	all_windows = 196581
	gcpro1 = {
   next = 0xbfffe4c8,
   var = 0xb216be0,
   nvars = 110803968
}
	gcpro2 = {
   next = 0x3a14,
   var = 0x0,
   nvars = 0
}
	f = (struct frame *) 0xb216be0
	tooltip_frame = 0
#12 0x00034410 in redisplay_internal (preserve_echo_area=0) at xdisp.c: 
11426
	w = (struct window *) 0xbc214d0
	f = (struct frame *) 0xb216be0
	pause = 0
	must_finish = 0
	tlbufpos = {
   charpos = 83886089,
   bytepos = 2
}
	tlendpos = {
   charpos = 197740840,
   bytepos = 197740836
}
	number_of_visible_frames = 2
	count = 2
	count1 = 83886089
	sf = (struct frame *) 0xb216be0
	polling_stopped_here = 0
	old_frame = 186739684
	consider_all_windows_p = 94343345
#13 0x00033259 in redisplay () at xdisp.c:11001
No locals.
#14 0x000c74dd in read_char (commandflag=1, nmaps=4, maps=0xbfffec60,  
prev_event=83886089, used_mouse_menu=0xbfffee08, end_time=0x0) at  
keyboard.c:2649
	echo_current = 1
	c = 83886089
	count = 0
	jmpcount = 197919296
	local_getcjmp = {0, 83886089, -1073747064, 1335158, 83886113, 16,  
83938273, 1489644, 1191, 1511, 83886089, 83886089, 83886113, 1339742,  
-1073747016, 1340223, 92117561, 92065162}
	save_jump = {-1073746936, 1376062, 83913601, 8, 197919300, 1456373,  
112888434, 0, -1073746908, 1338601, 44011576, 2246789, 1424933,  
1649824, 3764382, 2246772, 16, 92065162}
	key_already_recorded = 0
	tem = 197870804
	save = 32
	previous_echo_area_message = 83886089
	also_record = 83886089
	reread = 0
	gcpro1 = {
   next = 0xefb3d,
   var = 0x67ef545,
   nvars = 1
}
	gcpro2 = {
   next = 0x1d2f1c,
   var = 0xefae9,
   nvars = -1073747208
}
	polling_stopped_here = 0
	orig_kboard = (struct kboard *) 0x4146ce0
#15 0x000d353e in read_key_sequence (keybuf=0xbffff034, bufsize=30,  
prompt=83886089, dont_downcase_last=0, can_return_switch_frame=1,  
fix_current_buffer=1) at keyboard.c:9344
	interrupted_kboard = (KBOARD *) 0x4146ce0
	interrupted_frame = (struct frame *) 0xb216be0
	key = 1459903
	used_mouse_menu = 0
	echo_local_start = 0
	last_real_key_start = 0
	keys_local_start = 0
	local_first_binding = 0
	from_string = 83886089
	count = 2
	t = 0
	echo_start = 0
	keys_start = 0
	nmaps = 4
	nmaps_allocated = 4
	defs = (Lisp_Object * volatile) 0xbfffec40
	submaps = (Lisp_Object * volatile) 0xbfffec60
	orig_local_map = 108598117
	orig_keymap = 83886089
	localized_local_map = 0
	first_binding = 0
	first_unbound = 31
	mock_input = 0
	fkey = {
   parent = 74652621,
   map = 74652621,
   start = 0,
   end = 0
}
	keytran = {
   parent = 67846013,
   map = 67846013,
   start = 0,
   end = 0
}
	indec = {
   parent = 74652629,
   map = 74652629,
   start = 0,
   end = 0
}
	shift_translated = 0
	delayed_switch_frame = 83886089
	original_uppercase = -1073746264
	original_uppercase_position = -1
	dummyflag = 0
	starting_buffer = (struct buffer *) 0xbcc0240
	fake_prefixed_keys = 83886089
	gcpro1 = {
   next = 0x59f90c9,
   var = 0x5000009,
   nvars = 2
}
#16 0x000c41b7 in command_loop_1 () at keyboard.c:1621
	cmd = 94343369
	lose = 1
	nonundocount = 0
	keybuf = {94343345, 152, 1105324176, 4081973, -1847905988,  
-1880941668, -1880949728, -1073745652, 152, 47, -1859280057,  
109117502, 1179650, 233472, -1880941348, 249, 163, 117408064,  
-1859244696, 241, 9, 0, -1073745760, -1073746064, 0, 262144, 83886089,  
92205033, 2565460, 67911645}
	i = 1
	prev_modiff = 27618
	prev_buffer = (struct buffer *) 0xbc220f0
	already_adjusted = 0
#17 0x00160a6d in internal_condition_case (bfun=0xc3d09  
<command_loop_1>, handlers=83925753, hfun=0xc3487 <cmd_error>) at  
eval.c:1511
	val = 67911645
	c = {
   tag = 83886089,
   val = 83886089,
   next = 0xbffff1fc,
   gcpro = 0x0,
   jmp = {-1073806465, 76, 8098, 1444172, 109133824, 1442737, 0, 0,  
-1073745480, -1073745664, 31, 662, 1444338, -1859256297, 31, 31, 0, 55},
   backlist = 0x0,
   handlerlist = 0x0,
   lisp_eval_depth = 0,
   pdlcount = 2,
   poll_suppress_count = 1,
   interrupt_input_blocked = 0,
   byte_stack = 0x0
}
	h = {
   handler = 83925753,
   var = 83886089,
   chosen_clause = -1881116971,
   tag = 0xbffff138,
   next = 0x0
}
#18 0x000c399f in command_loop_2 () at keyboard.c:1338
	val = 2037604709
#19 0x00160479 in internal_catch (tag=83921825, func=0xc396a  
<command_loop_2>, arg=83886089) at eval.c:1247
	c = {
   tag = 83921825,
   val = 83886089,
   next = 0x0,
   gcpro = 0x0,
   jmp = {-1859320961, 0, 8098, 1442737, -1859280203, 0, 0, 0,  
-1073745288, -1073745440, 84017183, 658, 1442922, 23, 83886111,  
-1073807329, 84017152, 84017207},
   backlist = 0x0,
   handlerlist = 0x0,
   lisp_eval_depth = 0,
   pdlcount = 2,
   poll_suppress_count = 1,
   interrupt_input_blocked = 0,
   byte_stack = 0x0
}
#20 0x000c3928 in command_loop () at keyboard.c:1317
No locals.
#21 0x000c2f0b in recursive_edit_1 () at keyboard.c:942
	count = 1
	val = 1459293
#22 0x000c3114 in Frecursive_edit () at keyboard.c:1004
	count = 0
	buffer = 83886089
#23 0x000c141d in main (argc=1, argv=0xbffff448) at emacs.c:1777
	dummy = 0
	stack_bottom_variable = 0 '\0'
	do_initial_setlocale = 1
	skip_args = 0
	rlim = {
   rlim_cur = 8388608,
   rlim_max = 67104768
}
	no_loadup = 0
	junk = 0x0
	dname_arg = 0x0
(gdb)