After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 591105 - atktext does not include GTK_WRAP_WORD_CHAR
atktext does not include GTK_WRAP_WORD_CHAR
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: atk
git master
Other All
: Urgent critical
: ---
Assigned To: Li Yuan
Li Yuan
Depends on:
Blocks: 591086 591199 591200
 
 
Reported: 2009-08-07 20:16 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2009-08-10 03:34 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
possible fix?? (1.44 KB, patch)
2009-08-09 06:36 UTC, Joanmarie Diggs (IRC: joanie)
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2009-08-07 20:16:38 UTC
There are 4 types of wrap modes in Gtk+:

  GTK_WRAP_NONE
  GTK_WRAP_CHAR
  GTK_WRAP_WORD
  GTK_WRAP_WORD_CHAR

(see http://library.gnome.org/devel/gtk/stable/GtkTextTag.html#GtkWrapMode). There are only three in atktext.c:

  static const char wrap_mode[] =
    "none\0"
    "char\0"
    "word";
  static const guint8 wrap_mode_offsets[] = {
    0, 5, 10
  };

There is also the following assertion in atktext:

    case ATK_TEXT_ATTR_WRAP_MODE:
      g_assert (index >= 0 && index < G_N_ELEMENTS (wrap_mode_offsets));

As best as I can tell, atk's failure to include GTK_WRAP_WORD_CHAR is what is responsible for the following Pidgin crasher: http://developer.pidgin.im/ticket/9864 (Pidgin uses GTK_WRAP_WORD_CHAR).

The reason I have marked this as critical is the following: Orca has a feature to indicate text attributes in braille by "underlining" text which has those attributes. The nature of this feature is that, when enabled, it is *always* on. Because of the above assertion, it seems that any application which uses GTK_WRAP_WORD_CHAR is in danger of crashing constantly when accessed by a braille user.
Comment 1 Joanmarie Diggs (IRC: joanie) 2009-08-09 05:30:44 UTC
Add Empathy to the list of applications impacted by this bug.
Comment 2 Joanmarie Diggs (IRC: joanie) 2009-08-09 06:12:29 UTC
Welcoming Ekiga to the not-so-exclusive-after-all club.
Comment 3 Joanmarie Diggs (IRC: joanie) 2009-08-09 06:36:50 UTC
Created attachment 140256 [details] [review]
possible fix??

Okay, having been thwarted multiple times by this bug (I'm working on expanding Orca's support for chat apps), I'm taking a stab at this one. But let's be very clear on a few things:

1. I don't know C.
2. My background is in liberal arts, librarianship, and education.
3. This bug really needs fixin' in time for the 2.28 release.
4. This patch seems to fix it, namely stopping the crash and causing
   "word_char" to appear as the wrap mode in Accerciser.

With respect to items 1 and 2 above, I couldn't figure out why the various and sundry numbers in the *_offsets in atktext.c were chosen. But I can add by 5's because gcalctool doesn't use GTK_WRAP_WORD_CHAR. ;-) ;-)

Anyhoo.... If this patch is completely dumb, that's fine. Just please fix this bug soon. Thanks!!!

By the way, because Orca's text attributes features include presenting attributes, I believe we'll need to localize "word_char" (or whatever it winds up being reported as) within Orca before string freeze.
Comment 4 Frederic Peters 2009-08-09 07:38:31 UTC
I just checked the patch against Empathy and it worked fine.
Comment 5 Li Yuan 2009-08-10 03:21:59 UTC
The patch is OK for me. I will commit the patch and release atk 1.27.90 today. Thanks.