#235 2.0.2 dumps core with tab_new_to_front=0

closed-fixed
nobody
None
5
2003-05-07
2003-04-26
No

When tab_new_to_front=0 in xchat.conf, the following
sequences of events will trigger an immediate coredump:

startup xchat "foo"
send a message to the xchat user
detach privmsg tab
send message to xchat user
reattach tab (CTRL-i)
send message to xchat user

If tab_new_to_front=1, this dump does not occur. If
tab_new_to_front=0 and the privmsg tab is brought to
the front manually before the final /msg is received
(in the list above), the dump does not occur.

This has been tested under multiple versions of FreeBSD.

backtrace:
(no debugging symbols found)...(no debugging symbols
found)...
Program received signal SIGSEGV, Segmentation fault.
0x806fe40 in gtk_widget_grab_focus ()
(gdb) bt
#0 0x806fe40 in gtk_widget_grab_focus ()
#1 0x1b in ?? ()
#2 0x8070131 in gtk_widget_grab_focus ()
#3 0x8068d2e in gtk_widget_grab_focus ()
#4 0x8068e07 in gtk_widget_grab_focus ()
#5 0x805751e in gtk_widget_grab_focus ()
#6 0x80820da in xchat_emit_print ()
#7 0x80829b1 in xchat_emit_print ()
#8 0x8082fa4 in xchat_emit_print ()
#9 0x80754a0 in gtk_widget_grab_focus ()
#10 0x8075024 in gtk_widget_grab_focus ()
#11 0x8087c57 in xchat_emit_print ()
#12 0x8088126 in xchat_emit_print ()
#13 0x807e954 in xchat_emit_print ()
#14 0x807eb47 in xchat_emit_print ()
#15 0x285b6e0e in g_io_unix_dispatch () from
/usr/local/lib/libglib-2.0.so.200
#16 0x28597f49 in g_main_dispatch () from
/usr/local/lib/libglib-2.0.so.200
#17 0x28598d43 in g_main_context_dispatch () from
/usr/local/lib/libglib-2.0.so.200
#18 0x28599116 in g_main_context_iterate () from
/usr/local/lib/libglib-2.0.so.200
#19 0x28599818 in g_main_loop_run () from
/usr/local/lib/libglib-2.0.so.200
#20 0x281758f2 in gtk_main () from
/usr/X11R6/lib/libgtk-x11-2.0.so.200
#21 0x8056fa7 in gtk_widget_grab_focus ()
---Type <return> to continue, or q <return> to quit---
#22 0x80863bd in xchat_emit_print ()
#23 0x8052906 in gtk_widget_grab_focus ()

Discussion

  • Adam Weinberger

    Adam Weinberger - 2003-04-26

    Logged In: YES
    user_id=765821

    here's a better backtrace:

    Program received signal SIGSEGV, Segmentation fault.
    0x806fe40 in gtk_xtext_append_entry (buf=0x830bc00,
    ent=0x83181c0) at xtext.c:4128
    4128 if ((buf->num_lines - 1) <=
    buf->xtext->adj->page_size)
    (gdb) bt
    #0 0x806fe40 in gtk_xtext_append_entry (buf=0x830bc00,
    ent=0x83181c0) at xtext.c:4128
    #1 0x8070131 in gtk_xtext_append (buf=0x830bc00,
    text=0x830d560 "[14:06] \0032<\017adamw\0032>\017
    test\017", len=27) at xtext.c:4241
    #2 0x8068d2e in PrintTextLine (xtbuf=0x830bc00,
    text=0xbfbfc9f0 "\0032<\017adamw\0032>\017 test\017\n",
    len=19, indent=0)
    at textgui.c:84
    #3 0x8068e07 in PrintTextRaw (xtbuf=0x830bc00,
    text=0xbfbfc9f0 "\0032<\017adamw\0032>\017 test\017\n",
    indent=0) at textgui.c:116
    #4 0x805751e in fe_print_text (sess=0x8306800,
    text=0xbfbfc9f0 "\0032<\017adamw\0032>\017 test\017\n")
    at fe-gtk.c:524
    #5 0x80820da in PrintText (sess=0x8306800,
    text=0xbfbfc9f0 "\0032<\017adamw\0032>\017 test\017\n")
    at text.c:504
    #6 0x80829b1 in display_event (i=0x80c9720 "",
    sess=0x8306800, numargs=2,
    args=0xbfbfda20) at text.c:1333
    #7 0x8082fa4 in text_emit (index=96, sess=0x8306800,
    a=0xbfbfdb70 "adamw",
    b=0x8318138 "test", c=0xbfbfdaee "", d=0x0) at text.c:1534
    #8 0x80754a0 in inbound_chanmsg (serv=0x80d5000,
    tbuf=0xbfbfde80 "\005",
    chan=0xbfbfdb70 "adamw", from=0xbfbfdb70 "adamw",
    text=0x8318138 "test",
    fromme=0 '\000') at inbound.c:325
    #9 0x8075024 in inbound_privmsg (serv=0x80d5000,
    tbuf=0xbfbfde80 "\005",
    from=0xbfbfdb70 "adamw", ip=0xbfbfdbb0
    "b45bc18047@manifold.vectors.cx",
    text=0x8318138 "test") at inbound.c:163
    ---Type <return> to continue, or q <return> to quit---
    #10 0x8087c57 in process_named_msg (sess=0x8306800,
    type=0xbfbfdc9a "PRIVMSG",
    outbuf=0xbfbfde80 "\005", word=0xbfbfef00,
    word_eol=0xbfbfee80) at proto-irc.c:691
    #11 0x8088126 in irc_inline (serv=0x80d5000,
    buf=0x8318100 ":adamw!b45bc18047@manifold.vectors.cx
    PRIVMSG monkey__ :test",
    len=60) at proto-irc.c:843
    #12 0x807e954 in server_inline (serv=0x80d5000,
    line=0x8318100 ":adamw!b45bc18047@manifold.vectors.cx
    PRIVMSG monkey__ :test",
    len=60) at server.c:285
    #13 0x807eb47 in server_read (source=0x830a200,
    condition=G_IO_IN, serv=0x80d5000)
    at server.c:361
    #14 0x285b6e0e in g_io_unix_dispatch () from
    /usr/local/lib/libglib-2.0.so.200
    #15 0x28597f49 in g_main_dispatch () from
    /usr/local/lib/libglib-2.0.so.200
    #16 0x28598d43 in g_main_context_dispatch () from
    /usr/local/lib/libglib-2.0.so.200
    #17 0x28599116 in g_main_context_iterate () from
    /usr/local/lib/libglib-2.0.so.200
    #18 0x28599818 in g_main_loop_run () from
    /usr/local/lib/libglib-2.0.so.200
    #19 0x281758f2 in gtk_main () from
    /usr/X11R6/lib/libgtk-x11-2.0.so.200
    #20 0x8056fa7 in fe_main () at fe-gtk.c:236
    #21 0x80863bd in main (argc=1, argv=0xbfbff9f8) at xchat.c:1000
    #22 0x8052906 in _start ()

     
  • Adam Weinberger

    Adam Weinberger - 2003-04-26

    Logged In: YES
    user_id=765821

    also of note:

    Program received signal SIGSEGV, Segmentation fault.
    0x806fe40 in gtk_xtext_append_entry (buf=0x830f400,
    ent=0x8294180) at xtext.c:4128
    4128 if ((buf->num_lines - 1) <=
    buf->xtext->adj->page_size)
    (gdb) print buf->num_lines
    $1 = 3
    (gdb) print buf->xtext->adj->page_size
    Error accessing memory address 0x38: Bad address.

     
  • Peter Zelezny.

    Peter Zelezny. - 2003-04-27

    Logged In: YES
    user_id=5012

    I think this might already br fixed in cvs. If you have no
    means to use cvs, let me know and I'll make a patch to test.

     
  • Adam Weinberger

    Adam Weinberger - 2003-04-27

    Logged In: YES
    user_id=765821

    I can indeed check out sources from the CVS repo, but we
    only really go off of official releases in the FreeBSD ports
    tree. If a patch were available, once tested I could just
    commit the patch into the ports tree against the 2.0.2 release.

     
  • Peter Zelezny.

    Peter Zelezny. - 2003-04-28

    Logged In: YES
    user_id=5012

    But I'm just trying verify if the changes have fixed *this* bug.
    xc202-fixdetatch.diff fixes another bug and possibly this one.
    http://xchat.org/files/source/2.0/patches/

     
  • Peter Zelezny.

    Peter Zelezny. - 2003-05-07
    • status: open --> closed-fixed
     

Log in to post a comment.