GNOME Bugzilla – Bug 357847
atk_text_attribute_get_value() throws an assert that's causes gaim to terminate.
Last modified: 2006-09-26 21:23:23 UTC
Steps to reproduce: 1/ Make sure that you have Accessibility support turned on for your GNOME desktop: Preferences->Assistive Technology Support then tick the checkbox at the top. If this is not already turned on, you will need to logout and log back in again. 2/ Start Orca 3/ Start gaim. 4/ (There are probably other ways to do this, but the following works for me). Connect to an IRC server and join a channel. 5/ Type "a" in the dialog area at the bottom, then Insert-f Insert-f is a special Orca command that will speak the text attributes of the current character (things like justification and font size). gaim terminates with the following stack trace: t@1 (l@1) stopped in abort at 0xfd59003b 0xfd59003b: abort : pushl %ebp Current function is atk_text_attribute_get_value 1131 g_assert (index >= 0 && index < 3); (dbx) where current thread: t@1 [1] abort(0x804663c, 0x0, 0xfd933eb4, 0x9, 0xfd6326a0, 0x8045f0c), at 0xfd59003b [2] g_logv(0x0, 0x4, 0xfeeffcdc, 0x804635c), at 0xfd8d1238 [3] g_log(0x0, 0x4, 0xfeeffcdc, 0xfef14b6c, 0x46b, 0xfef14b78), at 0xfd8d1265 =>[4] atk_text_attribute_get_value(attr = ATK_TEXT_ATTR_WRAP_MODE, index = 3), line 1131 in "atktext.c" [5] gail_misc_add_to_attr_set(attrib_set = 0x88b2cd8, attrs = 0x88d02d0, attr = ATK_TEXT_ATTR_WRAP_MODE), line 632 in "gailmisc.c" [6] gail_text_view_get_default_attributes(text = 0x856e150), line 724 in "gailtextview.c" [7] atk_text_get_default_attributes(text = 0x856e150), line 640 in "atktext.c" [8] impl_getDefaultAttributes(0x857fb64, 0x804663c), at 0xfbfcf336 [9] _ORBIT_skel_small_Accessibility_Text_getDefaultAttributes(0x857fb64, 0x80464d0, 0x0, 0x80464f0, 0x804663c, 0xfbfcf30c), at 0xfbfc7f52 [10] ORBit_POAObject_invoke(0x86c5f50, 0x80464d0, 0x0, 0x80464f0, 0x8046578, 0x804663c), at 0xfbf3eb79 [11] ORBit_OAObject_invoke(0x86c5f50, 0x80464d0, 0x0, 0x80464f0, 0x8046578, 0x804663c), at 0xfbf430a8 [12] ORBit_small_invoke_adaptor(0x86c5f50, 0x88d01e8, 0xfbfe82d0, 0x8046578, 0x804663c), at 0xfbf3078d [13] ORBit_POAObject_handle_request(0x86c5f50, 0x88d0294, 0x0, 0x0, 0x0, 0x88d01e8, 0x804663c), at 0xfbf3efc0 [14] ORBit_POAObject_invoke_incoming_request(0x86c5f50, 0x88d01e8, 0x804663c), at 0xfbf3f3d0 [15] ORBit_POA_handle_request(0x8278880, 0x88d01e8, 0x88d0200), at 0xfbf3f865 [16] ORBit_handle_request(0x827af08, 0x88d01e8), at 0xfbf42e70 [17] giop_connection_handle_input(0x8640440), at 0xfbf2d97d [18] link_connection_io_handler(0x0, 0x1, 0x8640440), at 0xfbf491f6 [19] link_source_dispatch(0x86bc050, 0xfbf491a0, 0x8640440), at 0xfbf4adf6 [20] g_main_dispatch(0x8264e78), at 0xfd8c9690 [21] g_main_context_dispatch(0x8264e78), at 0xfd8ca779 [22] g_main_context_iterate(0x8264e78, 0x1, 0x1, 0x82488a8), at 0xfd8cab99 [23] g_main_loop_run(0x84d9590), at 0xfd8cb19e [24] gtk_main(0x8046ef4, 0x8046da0, 0xfeffa840, 0xfd5e6d30, 0x0, 0x82420d4), at 0xfed113f7 [25] main(argc = 1, argv = 0x8046de4), line 765 in "gtkmain.c" Things of interest: (dbx) print index index = 3 (dbx) frame 5 Current function is gail_misc_add_to_attr_set 632 value = g_strdup (atk_text_attribute_get_value (attr, attrs->wrap_mode)); (dbx) print *attrs *attrs = { refcount = 1U appearance = { bg_color = { pixel = 16777215U red = 65535U green = 65535U blue = 65535U } fg_color = { pixel = 0 red = 0 green = 0 blue = 0 } bg_stipple = (nil) fg_stipple = (nil) rise = 0 padding1 = (nil) underline = 0 strikethrough = 0 draw_bg = 0 inside_selection = 0 is_text = 0 pad1 = 0 pad2 = 0 pad3 = 0 pad4 = 0 } justification = GTK_JUSTIFY_LEFT direction = GTK_TEXT_DIR_LTR font = 0x88ce740 font_scale = 1.0 left_margin = 2 indent = 0 right_margin = 2 pixels_above_lines = 0 pixels_below_lines = 5 pixels_inside_wrap = 0 tabs = (nil) wrap_mode = GTK_WRAP_WORD_CHAR language = 0x8319060 pg_bg_color = (nil) invisible = 0 bg_full_height = 0 editable = 1U realized = 0 pad1 = 0 pad2 = 0 pad3 = 0 pad4 = 0 } (dbx) print (int) attrs->wrap_mode (int ) attrs->wrap_mode = 3 You'll notice that attrs->wrape_mode is 3 but there is a specific test in atk_text_attribute_get_value() in atktext.c at about line 1131: case ATK_TEXT_ATTR_WRAP_MODE: g_assert (index >= 0 && index < 3); That would appear to be a problem.
Hmm has gaim extended the wrap-mode enum, or did atk just get it wrong? Fix seems obvious at least...
THis enum value seems to have been added to gtk+ in April 2003. Perhaps gaim only recently started using it.
I started this crasher off as a bug against gaim: https://sourceforge.net/tracker/?func=detail&atid=100235&aid=1563774&group_id=235 One of the comments there from the evaluator was: Here's a search for atk_ functions... rlaager@watermelon:~/src/gaim-HEAD/gtk$ grep -r "atk_" --include=*.c . ./gtkconv.c: atk_object_set_description(accessibility_obj, _("Typing")); ./gtkconv.c: atk_object_set_description(accessibility_obj, _("Stopped Typing")); ./gtkconv.c: atk_object_set_description(accessibility_obj, _("Nick Said")); ./gtkconv.c: atk_object_set_description(accessibility_obj, _("Unread Messages")); ./gtkconv.c: atk_object_set_description(accessibility_obj, _("New Event")); ./gtkutils.c: existing_name = atk_object_get_name (acc); ./gtkutils.c: atk_object_set_name (acc, label_text); ./gtkutils.c: set = atk_object_ref_relation_set (acc); ./gtkutils.c: relation = atk_relation_new (rel_obj, 1, ATK_RELATION_LABELLED_BY); ./gtkutils.c: atk_relation_set_add (set, relation); ./gtkutils.c: set = atk_object_ref_relation_set (label); ./gtkutils.c: relation = atk_relation_new (rel_obj, 1, ATK_RELATION_LABEL_FOR); ./gtkutils.c: atk_relation_set_add (set, relation); ./gtkdialogs.c: atk_object_set_description(obj, "Gaim " VERSION); There didn't seem to be anything there that was inappropriate.
Not sure what you mean by comment #3; this bug doesn't have anything to do with explicit calls of atk methods within the app. It's about the app using some GTK+ text attribute >= 3 (i.e. the GTK_WRAP_WORD_CHAR wrap type - allowing text wrap to break between graphemes).
fixed in cvs.
Works great! Thanks Bill.