Description of problem: Gnome-terminal crashes while trying to insert some long text. Version-Release number of selected component (if applicable): 2.5.90-1.1 How reproducible: Always. Tried several times with various different long texts. Steps to Reproduce: 1. Open http://slashdot.org/ (or http://freshmeat.net/) in Mozilla. Press Ctrl-A to select all text and copy it to clipboard. 2. Open xterm, type in export LANG=ru_RU.KOI8-R 2. Run gnome-terminal from xterm, type vim xxxx (where xxxx is non-existing file name), press i to enter insert mode in vim. 3. Click Shift+Middle mouse button in gnome-terminal to insert the text from clipboard. Nothing happens, gnome-terminal just issues a warning about invalid UTF-8 string. Click Shift+MidButton again. Actual results: gnome-terminal crashes with the following message: (process:17319): GLib-CRITICAL (recursed) **: file gstring.c: line 672 (g_string_erase): assertion `pos >= 0' failed aborting... (gnome_segv:17362): Gtk-WARNING **: Ignoring the separator setting Expected results: there should be no crash Additional info: Here is my locale setting: LANG=ru_RU.KOI8-R The bug is NOT reproducible if I set LANG=ru_RU.UTF-8. The bug is NOT reproducible if I change gnome-terminal encoding to unicode (Menu -> Terminal -> Encoding -> Unicode (UTF-8). Note that default encoding is set to current locale (KOI8-R in my case). Relevant software versions: $ rpm -q glib gtk2 pango gnome-terminal glibc glib-1.2.10-10 gtk2-2.3.5-1 pango-1.3.5-1 gnome-terminal-2.5.90-1.1 glibc-2.3.3-17 Bug-Buddy generates the following backtrace (I suspect it's useless but still): Backtrace was generated from '/usr/bin/gnome-terminal' (no debugging symbols found)...[New Thread 1089607776 (LWP 17632)] 0xffffe410 in ?? () #0 0xffffe410 in ?? () #1 <signal handler called> #2 0xffffe410 in ?? () #3 0x40ba6c47 in abort () at ../sysdeps/generic/abort.c:88 #4 0x40b2ef6b in g_logv (log_domain=0x40b4cba6 "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=0x40b4cd64 "file %s: line %d (%s): assertion `%s' failed", args1=0xbfffe53c " Feel free to ask for more details if you will be unable to reproduce this bug.
Seems I have reported glib 1.x version, while I should report glib2 version. So here it is: $ rpm -q glib2 gtk2 atk pango glibc glib2-2.4.0-1 gtk2-2.3.5-1 atk-1.5.5-1 pango-1.3.5-1 glibc-2.3.3-17 Will try to reproduce the bug with latest gtk2, pango and atk.
Bad news is with gtk2, pango and atk updated to the latest versions, the bug is still reproducible. Good news is I have reveived a better backtrace. ** (gnome-terminal:8227): WARNING **: [Invalid UTF-8] \xd2\xcf\xc9\xc9\xda\xcf\xdb\xcc\xc1 \xcf\xdb\xc9\xc2\xcb\xc1 (Invalid or incomplete multibyte or wide character) \xd0\xd2\xc9 \xd0\xd2\xc5\xcf\xc2\xd2\xc1\xda\xcf\xd7\xc1\xce\xc9\xc9 \xc4\xc1\xce\xce\xd9\xc8 \xcf\xd4 \xd0\xcf\xd4\xcf\xcd\xcb\xc1, \xcf\xd4\xc2\xd2\xc1\xd3\xd9\xd7\xc1\xc5\xd4\xd3\xd1. ** (gnome-terminal:8227): WARNING **: \xd2\xcf\xc9\xda\xcf\xdb\xcc\xc1\x20 \xdb\xc9\xc2\xcb\xc1\x20 (Invalid or incomplete multibyte or wide character) \xd2\xc9\x20 \xd2\xc5\xcf\xc2\xd2\xc1\xda\xcf\xd7\xc1\xce\xc9\xc9\x20 \xc1\xce\xce\xd9\xc8\x20 \xd4\x20 \xcf\xd4\xcf\xcd\xcb\xc1\x2c, \xd4\xc2\xd2\xc1\xd3\xd9\xd7\xc1\xc5\xd4\xd3\xd1\x2e. (process:8227): GLib-CRITICAL (recursed) **: file gstring.c: line 672 (g_string_erase): assertion `pos >= 0' failed aborting... Program received signal SIGABRT, Aborted. [Switching to Thread 1089144928 (LWP 8227)] 0xffffe410 in ?? () (gdb) bt #0 0xffffe410 in ?? () #1 0x40b35c47 in abort () at ../sysdeps/generic/abort.c:88 #2 0x40abdf6b in g_logv (log_domain=0x40adbba6 "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=0x40adbd64 "file %s: line %d (%s): assertion `%s' failed", args1=0xbfffe53c "â#â@â\002") at gmessages.c:522 #3 0x40abdfa4 in g_log (log_domain=0x0, log_level=0, format=0x0) at gmessages.c:541 #4 0x40acda9f in g_string_erase (string=0x80ca12c, pos=6, len=1) at gstring.c:682 #5 0x40abe5c7 in escape_string (string=0x80ca12c) at gmessages.c:795 #6 0x40abe702 in g_log_default_handler (log_domain=0x80ca12c "\220m'\b", log_level=134988928, message=0x8276d10 "ÐÑоизоÑла оÑибка (Invalid or incomplete multibyte or wide character) пÑи пÑеобÑазовании даннÑÑ Ð¾Ñ Ð¿Ð¾Ñомка, оÑбÑаÑÑваеÑÑÑ.", unused_data=0x0) at gmessages.c:888 #7 0x40abde08 in g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_WARNING, format=0x80b95bc "ÐÑоизоÑла оÑибка (%s) пÑи пÑеобÑазовании даннÑÑ Ð¾Ñ Ð¿Ð¾Ñомка, оÑбÑаÑÑваеÑÑÑ.", args1=0xbfffea8c "Ð|а@ÑÐЪ©\2007б@\001") at gmessages.c:503 #8 0x40abdfa4 in g_log (log_domain=0x0, log_level=0, format=0x0) at gmessages.c:541 #9 0x4037f821 in vte_terminal_send (terminal=0x81996d0, encoding=0x40408cde "UTF-8", data=0x0, length=11038, local_echo=0, ---Type <return> to continue, or q <return> to quit--- newline_stuff=0) at vte.c:7566 #10 0x4037f9c9 in vte_terminal_feed_child (terminal=0x81996d0, data=0x831c7d8 " OSDN : SourceForge - Shop ThinkGeek - freshmeat - Newsletters - TechJobs - Personals - Slashdot Broadband \tSearch б⩠\t X \r\t\t\t\t\t\r kreazy\r Preferences\r Subscribe\r Journal\r Logout\r\r Sections\r Main\r"..., length=11038) at vte.c:7676 #11 0x4038123a in vte_terminal_paste_cb (clipboard=0x83b47f8, text=0x81996d0 "п\210\031\b\004", data=0x2b1e) at vte.c:8403 #12 0x4062c051 in request_text_received_func (clipboard=0x83b47f8, selection_data=0xbfffef70, data=0x83b4140) at gtkclipboard.c:805 #13 0x4062beab in selection_received (widget=0x83b4140, selection_data=0xbfffef70, time=251767) at gtkclipboard.c:717 #14 0x406cee6c in _gtk_marshal_VOID__BOXED_UINT (closure=0x83c88b0, return_value=0x0, n_param_values=3, param_values=0x83b4140, invocation_hint=0xbfffeca8, marshal_data=0x0) at gtkmarshalers.c:1180 #15 0x40a35ec9 in g_closure_invoke (closure=0x83c88b0, return_value=0x0, n_param_values=0, param_values=0x0, invocation_hint=0x0) at gclosure.c:437 #16 0x40a48c9c in signal_emit_unlocked_R (node=0x8174228, detail=0, instance=0x82a73c8, emission_return=0x0, instance_and_params=0xbfffedc0) at gsignal.c:2436 #17 0x40a47d04 in g_signal_emit_valist (instance=0x82a73c8, signal_id=138184880, detail=0, var_args=0xbfffef70 "\001") at gsignal.c:2195 ---Type <return> to continue, or q <return> to quit--- #18 0x40a480e3 in g_signal_emit_by_name (instance=0x82a73c8, detailed_signal=0x407e3477 "selection_received") at gsignal.c:2263 #19 0x4070ed7d in gtk_selection_retrieval_report (info=0x83b4b18, type=0x0, format=0, buffer=0x0, length=0, time=0) at gtkselection.c:1804 #20 0x4070eb5c in _gtk_selection_property_notify (widget=0x82a73c8, event=0x82f8178) at gtkselection.c:1688 #21 0x406cd5b0 in _gtk_marshal_BOOLEAN__BOXED (closure=0x83b4b18, return_value=0xbffff100, n_param_values=2, param_values=0x82f8178, invocation_hint=0xbffff128, marshal_data=0x4070ea10) at gtkmarshalers.c:82 #22 0x40a36217 in g_type_class_meta_marshal (closure=0x82f8178, return_value=0x0, n_param_values=0, param_values=0x83b4b18, invocation_hint=0x0, marshal_data=0x0) at gclosure.c:514 #23 0x40a35ec9 in g_closure_invoke (closure=0x83b4b18, return_value=0x0, n_param_values=0, param_values=0x0, invocation_hint=0x0) at gclosure.c:437 #24 0x40a4870a in signal_emit_unlocked_R (node=0x8173e28, detail=0, instance=0x82a73c8, emission_return=0xbffff1e0, instance_and_params=0xbffff240) at gsignal.c:2474 #25 0x40a47af3 in g_signal_emit_valist (instance=0x82a73c8, signal_id=138103576, detail=0, var_args=0xbffff3d0 "ХСЪ©") at gsignal.c:2205 #26 0x40a47ff4 in g_signal_emit (instance=0x0, signal_id=0, detail=0) at gsignal.c:2239 #27 0x407c3ceb in gtk_widget_event_internal (widget=0x82a73c8, event=0x82f8178) ---Type <return> to continue, or q <return> to quit--- at gtkwidget.c:3563 #28 0x406caabd in gtk_main_do_event (event=0x82a73c8) at gtkmain.c:1605 #29 0x408cef41 in gdk_event_dispatch (source=0x0, callback=0, user_data=0x0) at gdkevents-x11.c:2133 #30 0x40ab5710 in g_main_dispatch (context=0x80afe68) at gmain.c:1895 #31 0x40ab6748 in g_main_context_dispatch (context=0x80afe68) at gmain.c:2441 #32 0x40ab6a76 in g_main_context_iterate (context=0x80afe68, block=1, dispatch=1, self=0x80a6080) at gmain.c:2522 #33 0x40ab7083 in g_main_loop_run (loop=0x80b0570) at gmain.c:2726 #34 0x406ca353 in gtk_main () at gtkmain.c:1172 #35 0x0805e539 in main (argc=2, argv=0xbffff684) at terminal.c:1669 #36 0x40b21eab in __libc_start_main (main=0x805e0e0 <main>, argc=2, ubp_av=0xbffff684, init=0x807e14c <__libc_csu_init>, fini=0x2, rtld_fini=0x8088e48 <environ@@GLIBC_2.0>, stack_end=0xbffff67c) at ../sysdeps/generic/libc-start.c:209 Feel free to request more info, such as local variables etc.
If this is still an issue with latest rawhide, you should probably talk to upstream GNOME and make sure this is filed somewhere upstream in order to get more exposure.
Bug is still reproducible with the following (newer except for the pango) versions: $ rpm -q glib2 gtk2 atk pango glibc gnome-terminal glibc glib2-2.4.0-1 gtk2-2.4.0-1 atk-1.6.0-1 pango-1.4.0-1 glibc-2.3.3-17 gnome-terminal-2.6.0-1 glibc-2.3.3-17 So as you have suggested I have filed a bug to GNOME's bugzilla: http://bugzilla.gnome.org/show_bug.cgi?id=139741 That bug have a newer backtrace (from gnome-terminal 2.6.0).
This should be fixed in gtk2-2.4.10, I think. Can you check ?