Subject: bug#18313: 24.4.50; emacs_backtrace.txt

From: Eli Zaretskii <[email-masked]>
Date: Fri, 22 Aug 2014 16:50:30 +0300

> Date: Thu, 21 Aug 2014 09:20:29 -0700 (PDT)
> From: Drew Adams <[email-masked]>
> 
> Backtrace:
> 01201baf
> 01201c20
> 010f4223

  w32_backtrace at w32fns.c:8490
  emacs_abort at w32fns.c:8522
  terminate_due_to_signal at emacs.c:383
  die at alloc.c:7044
  unwind_create_frame at w32fns.c:4265
  do_unwind_create_frame at w32fns.c:4280
  unbind_to at eval.c:3301
  unwind_to_catch at eval.c:1162
  Fsignal at eval.c:1559
  menu_item_eval_property_1 at keyboard.c:7582
  internal_condition_case_1 at eval.c:1370
  menu_item_eval_property at keyboard.c:7601
  parse_menu_item at keyboard.c:7777
  single_menu_item at menu.c:334
  map_keymap_item at keymap.c:566
  map_keymap_internal at keymap.c:605
  map_keymap_canonical at keymap.c:670
  single_keymap_panes at menu.c:300
  parse_single_submenu at menu.c:563
  set_frame_menubar at w32menu.c:368
  initialize_frame_menubar at w32menu.c:523
  w32_window at w32fns.c:4158
  Fx_create_frame at w32fns.c:4592
  Ffuncall at eval.c:2810
  exec_byte_code at bytecode.c:918
  funcall_lambda at eval.c:3044
  Ffuncall at eval.c:2859
  exec_byte_code at bytecode.c:918
  funcall_lambda at eval.c:3044
  Ffuncall at eval.c:2859
  exec_byte_code at bytecode.c:918
  funcall_lambda at eval.c:3044
  Ffuncall at eval.c:2859
  eval_sub at eval.c:2152
  Fprogn at eval.c:463
  funcall_lambda at eval.c:3037
  Ffuncall at eval.c:2871
  exec_byte_code at bytecode.c:918
  funcall_lambda at eval.c:3044
  Ffuncall at eval.c:2859
  exec_byte_code at bytecode.c:918
  funcall_lambda at eval.c:3044
  Ffuncall at eval.c:2859
  Fapply at eval.c:2349
  Ffuncall at eval.c:2791
  exec_byte_code at bytecode.c:918
  funcall_lambda at eval.c:2978
  Ffuncall at eval.c:2859
  exec_byte_code at bytecode.c:918
  funcall_lambda at eval.c:3044
  Ffuncall at eval.c:2859
  exec_byte_code at bytecode.c:918
  funcall_lambda at eval.c:2978
  Ffuncall at eval.c:2859
  exec_byte_code at bytecode.c:918
  funcall_lambda at eval.c:2978
  Ffuncall at eval.c:2859
  Fapply at eval.c:2296
  Ffuncall at eval.c:2791
  exec_byte_code at bytecode.c:918
  funcall_lambda at eval.c:2978
  Ffuncall at eval.c:2859

The assertion violation is here:

  #ifdef GLYPH_DEBUG
	/* Check that reference counts are indeed correct.  */
	eassert (dpyinfo->reference_count == dpyinfo_refcount);  <<<<<<<<
	eassert ((dpyinfo->terminal->image_cache == NULL
		  && image_cache_refcount == 0)
		 || (dpyinfo->terminal->image_cache != NULL
		     && dpyinfo->terminal->image_cache->refcount == image_cache_refcount));
  #endif

I guess that condition is wrong when frames are created in recursive
edit.