Subject: bug#9310: BadWindow error with quail guidance frame

From: "Jan D." <[email-masked]>
Date: Wed, 24 Aug 2011 15:32:27 +0200

Stefan Monnier skrev 2011-08-23 21:40:
>> Basically set synchronized and break in the error function.
>
> OK, that part was already done.
>
>> Then go up the call stack to find the frame the window belongs to,
>
> That as well: it's the minibuffer-only frame.
>
>> or see if it is some uninitialized value.
>
> Doesn't look like it, the frames involved seem to have sensible
> field values.  This problem started around the time the new window.c code
> was installed, FWIW (which doesn't mean it's actually related).
>
>

You can try xwininfo -id <the window> to see if there is something 
special about that window.  Compare with another window you have in Emacs.

	Jan D.

>          Stefan
>
>
> (gdb) bt
> #0  x_error_quitter (display=0x890b200, event=0xbfffba10) at xterm.c:7882
> #1  0x081b4f29 in x_error_handler (display=0x890b200, event=0xbfffba10)
>      at xterm.c:7861
> #2  0xb747d0d3 in _XError () from /usr/lib/i386-linux-gnu/libX11.so.6
> #3  0xb7479d7d in ?? () from /usr/lib/i386-linux-gnu/libX11.so.6
> #4  0xb7479dd7 in ?? () from /usr/lib/i386-linux-gnu/libX11.so.6
> #5  0xb747ac90 in _XReply () from /usr/lib/i386-linux-gnu/libX11.so.6
> #6  0xb7476236 in XSync () from /usr/lib/i386-linux-gnu/libX11.so.6
> #7  0xb74762d3 in ?? () from /usr/lib/i386-linux-gnu/libX11.so.6
> #8  0xb74540e3 in XSetWindowBorder () from /usr/lib/i386-linux-gnu/libX11.so.6
> #9  0x081ab432 in frame_highlight (f=0x89bb020) at xterm.c:3357
> #10 0x081abb55 in x_frame_rehighlight (dpyinfo=0x89499c8) at xterm.c:3560
> #11 0x081ab9ed in XTframe_rehighlight (frame=0x8c968e8) at xterm.c:3532
> #12 0x08072c95 in Fredirect_frame_focus (frame=..., focus_frame=...)
>      at frame.c:1970
> [...]
> (gdb) up
> #10 0x081abb55 in x_frame_rehighlight (dpyinfo=0x89499c8) at xterm.c:3560
> (gdb)
> #11 0x081ab9ed in XTframe_rehighlight (frame=0x8c968e8) at xterm.c:3532
> (gdb)
> #12 0x08072c95 in Fredirect_frame_focus (frame=..., focus_frame=...)
>      at frame.c:1970
> (gdb) hp frame
> Undefined command: "hp".  Try "help".
> (gdb) p frame
> $1 = {
>    i = -1592185571,
>    s = {
>      val = 18427165,
>      type = Lisp_Vectorlike
>    },
>    u = {
>      val = 18427165,
>      type = Lisp_Vectorlike
>    }
> }
> (gdb) xframe
> $2 = (struct frame *) 0x8c968e8
> "emacs@ceviche"
> (gdb) p focus_frame
> $3 = {
>    i = -1592560124,
>    s = {
>      val = 18052612,
>      type = Lisp_Vectorlike
>    },
>    u = {
>      val = 18052612,
>      type = Lisp_Vectorlike
>    }
> }
> (gdb) xframe
> $4 = (struct frame *) 0x89bb020
> " *Minibuf-0*"
> (gdb) p *$2
> $5 = {
>    header = {
>      size = 1073742870,
>      next = {
>        buffer = 0x87bc8d0,
>        vector = 0x87bc8d0
>      }
>    },
>    name = {
>      i = -2129031219,
>      s = {
>        val = 18452429,
>        type = Lisp_String
>      },
>      u = {
>        val = 18452429,
>        type = Lisp_String
>      }
>    },
>    icon_name = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    title = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    focus_frame = {
>      i = -1592560124,
>      s = {
>        val = 18052612,
>        type = Lisp_Vectorlike
>      },
>      u = {
>        val = 18052612,
>        type = Lisp_Vectorlike
>      }
>    },
>    root_window = {
>      i = -1592344072,
>      s = {
>        val = 18268664,
>        type = Lisp_Vectorlike
>      },
>      u = {
>        val = 18268664,
>        type = Lisp_Vectorlike
>      }
>    },
>    selected_window = {
>      i = -1592344072,
>      s = {
>        val = 18268664,
>        type = Lisp_Vectorlike
>      },
>      u = {
>        val = 18268664,
>        type = Lisp_Vectorlike
>      }
>    },
>    minibuffer_window = {
>      i = -1592185824,
>      s = {
>        val = 18426912,
>        type = Lisp_Vectorlike
>      },
>      u = {
>        val = 18426912,
>        type = Lisp_Vectorlike
>      }
>    },
>    param_alist = {
>      i = -1055526342,
>      s = {
>        val = 18215482,
>        type = Lisp_Cons
>      },
>      u = {
>        val = 18215482,
>        type = Lisp_Cons
>      }
>    },
>    scroll_bars = {
>      i = -1592519606,
>      s = {
>        val = 18093130,
>        type = Lisp_Vectorlike
>      },
>      u = {
>        val = 18093130,
>        type = Lisp_Vectorlike
>      }
>    },
>    condemned_scroll_bars = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    menu_bar_items = {
>      i = -1592182536,
>      s = {
>        val = 18430200,
>        type = Lisp_Vectorlike
>      },
>      u = {
>        val = 18430200,
>        type = Lisp_Vectorlike
>      }
>    },
>    face_alist = {
>      i = -1055529916,
>      s = {
>        val = 18211908,
>        type = Lisp_Cons
>      },
>      u = {
>        val = 18211908,
>        type = Lisp_Cons
>      }
>    },
>    menu_bar_vector = {
>      i = -1592118417,
>      s = {
>        val = 18494319,
>        type = Lisp_Vectorlike
>      },
>      u = {
>        val = 18494319,
>        type = Lisp_Vectorlike
>      }
>    },
>    buffer_predicate = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    buffer_list = {
>      i = -1055455327,
>      s = {
>        val = 18286497,
>        type = Lisp_Cons
>      },
>      u = {
>        val = 18286497,
>        type = Lisp_Cons
>      }
>    },
>    buried_buffer_list = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    menu_bar_window = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    tool_bar_window = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    tool_bar_items = {
>      i = -1592197120,
>      s = {
>        val = 18415616,
>        type = Lisp_Vectorlike
>      },
>      u = {
>        val = 18415616,
>        type = Lisp_Vectorlike
>      }
>    },
>    tool_bar_position = {
>      i = 1091524773,
>      s = {
>        val = 17782949,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17782949,
>        type = Lisp_Symbol
>      }
>    },
>    desired_tool_bar_string = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    current_tool_bar_string = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    face_cache = 0x8cb0e88,
>    menu_bar_items_used = 0,
>    namebuf = 0x0,
>    current_pool = 0x0,
>    desired_pool = 0x0,
>    desired_matrix = 0x0,
>    current_matrix = 0x0,
>    glyphs_initialized_p = 1,
>    resized_p = 0,
>    force_flush_display_p = 0,
>    default_face_done_p = 1,
>    already_hscrolled_p = 0,
>    updated_p = 1,
>    minimize_tool_bar_window_p = 0,
>    external_tool_bar = 1,
>    tool_bar_lines = 0,
>    n_tool_bar_rows = 0,
>    n_tool_bar_items = 13,
>    decode_mode_spec_buffer = 0x8c959e8 "",
>    insert_line_cost = 0x0,
>    delete_line_cost = 0x0,
>    insert_n_lines_cost = 0x0,
>    delete_n_lines_cost = 0x0,
>    text_lines = 35,
>    text_cols = 80,
>    total_lines = 0,
>    total_cols = 84,
>    new_text_lines = 0,
>    new_text_cols = 0,
>    left_pos = 182,
>    top_pos = 22,
>    pixel_height = 805,
>    pixel_width = 924,
>    resx = 124,
>    resy = 124,
>    x_pixels_diff = 5,
>    y_pixels_diff = 50,
>    win_gravity = 1,
>    size_hint_flags = 3,
>    border_width = 0,
>    internal_border_width = 0,
>    column_width = 11,
>    space_width = 11,
>    line_height = 23,
>    output_method = output_x_window,
>    terminal = 0x89494b0,
>    output_data = {
>      tty = 0x8b61128,
>      x = 0x8b61128,
>      w32 = 0x8b61128,
>      ns = 0x8b61128,
>      nothing = 146149672
>    },
>    font_driver_list = 0x8cc0fe0,
>    font_data_list = 0x8a01a10,
>    fringe_cols = 2,
>    left_fringe_width = 11,
>    right_fringe_width = 11,
>    want_fullscreen = FULLSCREEN_NONE,
>    menu_bar_lines = 0,
>    external_menu_bar = 1,
>    display_preempted = 0 '\000',
>    visible = 1 '\001',
>    iconified = 0 '\000',
>    async_visible = 1 '\001',
>    async_iconified = 0 '\000',
>    garbaged = 0 '\000',
>    has_minibuffer = 0 '\000',
>    wants_modeline = 1 '\001',
>    can_have_scroll_bars = 1 '\001',
>    auto_raise = 0 '\000',
>    auto_lower = 0 '\000',
>    no_split = 0 '\000',
>    explicit_name = 0 '\000',
>    window_sizes_changed = 0 '\000',
>    mouse_moved = 1 '\001',
>    pointer_invisible = 0 '\000',
>    vertical_scroll_bar_type = vertical_scroll_bar_right,
>    desired_cursor = FILLED_BOX_CURSOR,
>    cursor_width = 1,
>    blink_off_cursor = DEFAULT_CURSOR,
>    blink_off_cursor_width = 0,
>    message_buf = 0x8a0de40 "\030\304\374\266\030\304",<incomplete sequence \374\266>,
>    scroll_bottom_vpos = -1,
>    config_scroll_bar_width = 16,
>    config_scroll_bar_cols = 2,
>    scroll_bar_actual_width = 22,
>    cost_calculation_baud_rate = 19200,
>    alpha = {-1, -1},
>    gamma = 0,
>    extra_line_spacing = 0,
>    background_pixel = 16777215,
>    foreground_pixel = 0
> }
> (gdb) p *$4
> $6 = {
>    header = {
>      size = 1073742870,
>      next = {
>        buffer = 0x8c20b00,
>        vector = 0x8c20b00
>      }
>    },
>    name = {
>      i = -2129557179,
>      s = {
>        val = 17926469,
>        type = Lisp_String
>      },
>      u = {
>        val = 17926469,
>        type = Lisp_String
>      }
>    },
>    icon_name = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    title = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    focus_frame = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    root_window = {
>      i = -1592630761,
>      s = {
>        val = 17981975,
>        type = Lisp_Vectorlike
>      },
>      u = {
>        val = 17981975,
>        type = Lisp_Vectorlike
>      }
>    },
>    selected_window = {
>      i = -1592630761,
>      s = {
>        val = 17981975,
>        type = Lisp_Vectorlike
>      },
>      u = {
>        val = 17981975,
>        type = Lisp_Vectorlike
>      }
>    },
>    minibuffer_window = {
>      i = -1592185824,
>      s = {
>        val = 18426912,
>        type = Lisp_Vectorlike
>      },
>      u = {
>        val = 18426912,
>        type = Lisp_Vectorlike
>      }
>    },
>    param_alist = {
>      i = -1055455627,
>      s = {
>        val = 18286197,
>        type = Lisp_Cons
>      },
>      u = {
>        val = 18286197,
>        type = Lisp_Cons
>      }
>    },
>    scroll_bars = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    condemned_scroll_bars = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    menu_bar_items = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    face_alist = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    menu_bar_vector = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    buffer_predicate = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    buffer_list = {
>      i = -1055455706,
>      s = {
>        val = 18286118,
>        type = Lisp_Cons
>      },
>      u = {
>        val = 18286118,
>        type = Lisp_Cons
>      }
>    },
>    buried_buffer_list = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    menu_bar_window = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    tool_bar_window = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    tool_bar_items = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    tool_bar_position = {
>      i = 1091524773,
>      s = {
>        val = 17782949,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17782949,
>        type = Lisp_Symbol
>      }
>    },
>    desired_tool_bar_string = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    current_tool_bar_string = {
>      i = 1091521569,
>      s = {
>        val = 17779745,
>        type = Lisp_Symbol
>      },
>      u = {
>        val = 17779745,
>        type = Lisp_Symbol
>      }
>    },
>    face_cache = 0x8bdc7c8,
>    menu_bar_items_used = 0,
>    namebuf = 0x0,
>    current_pool = 0x0,
>    desired_pool = 0x0,
>    desired_matrix = 0x0,
>    current_matrix = 0x0,
>    glyphs_initialized_p = 1,
>    resized_p = 0,
>    force_flush_display_p = 0,
>    default_face_done_p = 0,
>    already_hscrolled_p = 0,
>    updated_p = 0,
>    minimize_tool_bar_window_p = 0,
>    external_tool_bar = 0,
>    tool_bar_lines = 0,
>    n_tool_bar_rows = 0,
>    n_tool_bar_items = 0,
>    decode_mode_spec_buffer = 0x8dc03f0 "0\304\374\266\230ͽ\bre/pixmaps/default/cursors/sb_h_doub\031",
>    insert_line_cost = 0x0,
>    delete_line_cost = 0x0,
>    insert_n_lines_cost = 0x0,
>    delete_n_lines_cost = 0x0,
>    text_lines = 10,
>    text_cols = 10,
>    total_lines = 0,
>    total_cols = 10,
>    new_text_lines = 0,
>    new_text_cols = 0,
>    left_pos = 0,
>    top_pos = 0,
>    pixel_height = 0,
>    pixel_width = 0,
>    resx = 124,
>    resy = 124,
>    x_pixels_diff = 0,
>    y_pixels_diff = 0,
>    win_gravity = 0,
>    size_hint_flags = 0,
>    border_width = 0,
>    internal_border_width = 0,
>    column_width = 11,
>    space_width = 11,
>    line_height = 23,
>    output_method = output_x_window,
>    terminal = 0x89494b0,
>    output_data = {
>      tty = 0x8c4ba80,
>      x = 0x8c4ba80,
>      w32 = 0x8c4ba80,
>      ns = 0x8c4ba80,
>      nothing = 147110528
>    },
>    font_driver_list = 0x8a01858,
>    font_data_list = 0x0,
>    fringe_cols = 2,
>    left_fringe_width = 11,
>    right_fringe_width = 11,
>    want_fullscreen = FULLSCREEN_NONE,
>    menu_bar_lines = 0,
>    external_menu_bar = 0,
>    display_preempted = 0 '\000',
>    visible = 0 '\000',
>    iconified = 0 '\000',
>    async_visible = 0 '\000',
>    async_iconified = 0 '\000',
>    garbaged = 1 '\001',
>    has_minibuffer = 0 '\000',
>    wants_modeline = 1 '\001',
>    can_have_scroll_bars = 1 '\001',
>    auto_raise = 0 '\000',
>    auto_lower = 0 '\000',
>    no_split = 0 '\000',
>    explicit_name = 1 '\001',
>    window_sizes_changed = 0 '\000',
>    mouse_moved = 0 '\000',
>    pointer_invisible = 0 '\000',
>    vertical_scroll_bar_type = vertical_scroll_bar_right,
>    desired_cursor = FILLED_BOX_CURSOR,
>    cursor_width = 0,
>    blink_off_cursor = FILLED_BOX_CURSOR,
>    blink_off_cursor_width = 0,
>    message_buf = 0x8c1fea0 "0\304\374\266\350\003\334\bnnier/.icons/default/cursors/sb_h_do\031",
>    scroll_bottom_vpos = 0,
>    config_scroll_bar_width = 0,
>    config_scroll_bar_cols = 2,
>    scroll_bar_actual_width = 0,
>    cost_calculation_baud_rate = 0,
>    alpha = {0, 0},
>    gamma = 0,
>    extra_line_spacing = 0,
>    background_pixel = 16777215,
>    foreground_pixel = 0
> }
> (gdb)