all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Live System User <nyc4bos@aol.com>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: 29548@debbugs.gnu.org
Subject: bug#29548: 25.2; How to DEBUG get-device-terminal
Date: Thu, 04 Jan 2018 09:37:31 -0500	[thread overview]
Message-ID: <87y3ldbsgk.fsf@aol.com> (raw)
In-Reply-To: <874losdb5c.fsf@users.sourceforge.net> (Noam Postavsky's message of "Thu, 14 Dec 2017 20:37:19 -0500")

Noam Postavsky <npostavs@users.sourceforge.net> writes:

> Live System User <nyc4bos@aol.com> writes:
>
>> (gdb) define print_terminal_list
>> Type commands for definition of "print_terminal_list".
>> End with a line saying just "end".
>>>set $t = terminal_list
>>>while $t
>>  >print *$t
>>  >set $t = $t->next_terminal
>>  >end
>>>end
>> (gdb) print_terminal_list
>> $1 = {
>>   header = {
>>     size = 4611686018561773572
>>   }, 
>>   param_alist = XIL(0x2bfe553), 
>>   charset_list = XIL(0x102ec33), 
>>   Vselection_alist = XIL(0), 
>>   glyph_code_table = XIL(0), 
>>   next_terminal = 0x363e3d8, 
>>   id = 5, 
>>   reference_count = 0, 
>>   type = output_termcap, 
>>   name = 0x0, 
>
> As far as I can tell, the only place that sets a terminals 'name' field
> to NULL is in delete_terminal:
>
>     delete_terminal (struct terminal *terminal)
>     {
>       ...
>       terminal->name = NULL;
>
>       [...]
>       *tp = terminal->next_terminal;
>       ...
>
> Something must have happened in the [...] to prevent the terminal from
> being removed from the terminal list.  There is a lot code in that
> [...], with a lot of conditional, recursive calls so it's hard to say
> what could be the problem.  One thing I see, is that it calls
> Fframe_parameter which uses Fassq which checks for quit signals.  Not
> sure how plausible it is that you could have managed to quit just at the
> right time though.

  Here's a new occurrance (see below):

  One thing I noticed is that when it happen this time when doing a
  "emacsclient -c" "is that a blank GUI frame quickly flashed on
  the screen and disappeated before printing the error:

*ERROR*: Invalid argument #<terminal 10> in ‘get-device-terminal’


  When I invoke "emacsclient -t" that error message does NOT
  appear -- Emacs still just doesn't do anything (the emacsclient
  command executed (?) and returned to the system prompt).

  As you noticed that when it's in this state, the "name" field
  appears invalid and its "reference count" is 0 (is it because
  it's deleted/dead/invalid?):

  id = 10, 
  reference_count = 0, 
  type = output_termcap, 
  name = 0x0, 


  Whereas in a working instance it looks like this:

  id = 2, 
  reference_count = 1, 
  type = output_termcap, 
  name = 0x33d5bc0 "/dev/pts/23", 


  Thanks.


(gdb) print_terminal_list
$1 = {
  header = {
    size = 4611686018561773572
  }, 
  param_alist = XIL(0x8793ef3), 
  charset_list = XIL(0x102ec33), 
  Vselection_alist = XIL(0), 
  glyph_code_table = XIL(0), 
  next_terminal = 0xc2b460, 
  id = 10, 
  reference_count = 0, 
  type = output_termcap, 
  name = 0x0, 
  kboard = 0x54ade00, 
  image_cache = 0x0, 
  display_info = {
    tty = 0x9d4e190, 
    x = 0x9d4e190, 
    w32 = 0x9d4e190, 
    ns = 0x9d4e190
  }, 
  terminal_coding = 0x802de00, 
  keyboard_coding = 0x8e3e1b0, 
---Type <return> to continue, or q <return> to quit---
  rif = 0x0, 
  cursor_to_hook = 0x4b3aa0 <tty_cursor_to>, 
  raw_cursor_to_hook = 0x4b39f0 <tty_raw_cursor_to>, 
  clear_to_end_hook = 0x4b1160 <tty_clear_to_end>, 
  clear_frame_hook = 0x4b1ce0 <tty_clear_frame>, 
  clear_end_of_line_hook = 0x4b38b0 <tty_clear_end_of_line>, 
  ins_del_lines_hook = 0x4b0e50 <tty_ins_del_lines>, 
  insert_glyphs_hook = 0x4b4820 <tty_insert_glyphs>, 
  write_glyphs_hook = 0x4b4500 <tty_write_glyphs>, 
  delete_glyphs_hook = 0x4b3720 <tty_delete_glyphs>, 
  ring_bell_hook = 0x4b0bb0 <tty_ring_bell>, 
  toggle_invisible_pointer_hook = 0x0, 
  reset_terminal_modes_hook = 0x4b3600 <tty_reset_terminal_modes>, 
  set_terminal_modes_hook = 0x4b0d00 <tty_set_terminal_modes>, 
  update_begin_hook = 0x0, 
  update_end_hook = 0x4b35a0 <tty_update_end>, 
  set_terminal_window_hook = 0x4b0790 <tty_set_terminal_window>, 
  mouse_position_hook = 0x0, 
  frame_rehighlight_hook = 0x0, 
  frame_raise_lower_hook = 0x0, 
  fullscreen_hook = 0x0, 
  menu_show_hook = 0x4b2ab0 <tty_menu_show>, 
  popup_dialog_hook = 0x0, 
---Type <return> to continue, or q <return> to quit---
  set_vertical_scroll_bar_hook = 0x0, 
  set_horizontal_scroll_bar_hook = 0x0, 
  condemn_scroll_bars_hook = 0x0, 
  redeem_scroll_bar_hook = 0x0, 
  judge_scroll_bars_hook = 0x0, 
  read_socket_hook = 0x4f8cf0 <tty_read_avail_input>, 
  frame_up_to_date_hook = 0x0, 
  delete_frame_hook = 0x4b0130 <tty_free_frame_resources>, 
  delete_terminal_hook = 0x4aff70 <delete_tty>
}
$2 = {
  header = {
    size = 4611686018561773572
  }, 
  param_alist = XIL(0x13a3b23), 
  charset_list = XIL(0x102ec33), 
  Vselection_alist = XIL(0), 
  glyph_code_table = XIL(0), 
  next_terminal = 0x0, 
  id = 0, 
  reference_count = 1, 
  type = output_initial, 
  name = 0xbf45e0 "initial_terminal", 
---Type <return> to continue, or q <return> to quit---
  kboard = 0xc26e30, 
  image_cache = 0x0, 
  display_info = {
    tty = 0x0, 
    x = 0x0, 
    w32 = 0x0, 
    ns = 0x0
  }, 
  terminal_coding = 0xc2dbf0, 
  keyboard_coding = 0xc2d980, 
  rif = 0x0, 
  cursor_to_hook = 0x0, 
  raw_cursor_to_hook = 0x0, 
  clear_to_end_hook = 0x0, 
  clear_frame_hook = 0x0, 
  clear_end_of_line_hook = 0x0, 
  ins_del_lines_hook = 0x0, 
  insert_glyphs_hook = 0x0, 
  write_glyphs_hook = 0x0, 
  delete_glyphs_hook = 0x0, 
  ring_bell_hook = 0x0, 
  toggle_invisible_pointer_hook = 0x0, 
  reset_terminal_modes_hook = 0x0, 
---Type <return> to continue, or q <return> to quit---
  set_terminal_modes_hook = 0x0, 
  update_begin_hook = 0x0, 
  update_end_hook = 0x0, 
  set_terminal_window_hook = 0x0, 
  mouse_position_hook = 0x0, 
  frame_rehighlight_hook = 0x0, 
  frame_raise_lower_hook = 0x0, 
  fullscreen_hook = 0x0, 
  menu_show_hook = 0x0, 
  popup_dialog_hook = 0x0, 
  set_vertical_scroll_bar_hook = 0x0, 
  set_horizontal_scroll_bar_hook = 0x0, 
  condemn_scroll_bars_hook = 0x0, 
  redeem_scroll_bar_hook = 0x0, 
  judge_scroll_bars_hook = 0x0, 
  read_socket_hook = 0x0, 
  frame_up_to_date_hook = 0x0, 
  delete_frame_hook = 0x4b6ea0 <initial_free_frame_resources>, 
  delete_terminal_hook = 0x4b7690 <delete_initial_terminal>
}
(gdb) 









  reply	other threads:[~2018-01-04 14:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-03 15:42 bug#29548: 25.2; How to DEBUG get-device-terminal Live System User
2017-12-03 16:09 ` Noam Postavsky
2017-12-06 18:49   ` Live System User
2017-12-06 19:56     ` Noam Postavsky
2017-12-07  0:25       ` Live System User
2017-12-15  1:37         ` Noam Postavsky
2018-01-04 14:37           ` Live System User [this message]
2018-01-05  2:12             ` Noam Postavsky
2018-01-06 10:16               ` Live System User
2018-01-10  3:51                 ` Noam Postavsky
2018-02-14 17:26                   ` Live System User
2018-02-18 22:41                     ` Noam Postavsky
2017-12-07  9:27       ` martin rudalics
2017-12-07  9:35         ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y3ldbsgk.fsf@aol.com \
    --to=nyc4bos@aol.com \
    --cc=29548@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.