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 562094 - Crash on getBoundedRanges in text interface
Crash on getBoundedRanges in text interface
Status: RESOLVED OBSOLETE
Product: at-spi
Classification: Platform
Component: at-spi2-atk
unspecified
Other All
: Normal normal
: ---
Assigned To: At-spi maintainer(s)
At-spi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-11-24 07:49 UTC by Li Yuan
Modified: 2021-07-05 10:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (478 bytes, patch)
2008-11-24 08:28 UTC, Li Yuan
none Details | Review

Description Li Yuan 2008-11-24 07:49:41 UTC
Here is the trace, the crash is in gedit:

Program received signal SIGSEGV, Segmentation fault.

Thread 3069736704 (LWP 20507)

  • #0 impl_getBoundedRanges
    at text.c line 489
  • #1 _ORBIT_skel_small_Accessibility_Text_getBoundedRanges
    at Accessibility-common.c line 800
  • #2 ??
    from /usr/lib/libORBit-2.so.0
  • #3 ORBit_OAObject_invoke
    from /usr/lib/libORBit-2.so.0
  • #4 ORBit_small_invoke_adaptor
    from /usr/lib/libORBit-2.so.0
  • #5 ??
    from /usr/lib/libORBit-2.so.0
  • #6 ??
    from /usr/lib/libORBit-2.so.0
  • #7 ??
    from /usr/lib/libORBit-2.so.0
  • #8 ORBit_handle_request
    from /usr/lib/libORBit-2.so.0
  • #9 giop_connection_handle_input
    from /usr/lib/libORBit-2.so.0
  • #10 ??
    from /usr/lib/libORBit-2.so.0
  • #11 ??
    from /usr/lib/libORBit-2.so.0
  • #12 g_main_dispatch
    at gmain.c line 1814
  • #13 IA__g_main_context_dispatch
    at gmain.c line 2367
  • #14 g_main_context_iterate
    at gmain.c line 2448
  • #15 IA__g_main_loop_run
    at gmain.c line 2656
  • #16 IA__gtk_main
    at gtkmain.c line 1200
  • #17 main

Comment 1 Li Yuan 2008-11-24 08:28:21 UTC
Created attachment 123309 [details] [review]
patch

The patch can fix the crash on my machine.

Andrew, would you test it on yours?
Comment 2 Andrew Shu 2008-11-24 21:43:08 UTC
Thanks very much for your input, Li.

Interestingly, the patch prevented a crash when providing coordinates that are off-screen (x=10000, y=50, width=100, height=100) but when I try to use it with proper coordinates it crashes with the CORBA COMM_ERROR. I have trouble compiling gedit with debug symbols (dur...) so have no trace to show.

Can you tell me what you did to test that the function worked, so that I can see if mine works using the same scenario?
Comment 3 Li Yuan 2008-11-25 02:28:05 UTC
I just reproduced the crash and provided a patch to fix it. 

A trace would be very useful. We don't need the gedit's symbols, we need libspi's symbols. So just compile at-spi with debug symbols is OK.
Comment 4 Andrew Shu 2008-11-25 08:30:40 UTC
Ok, here is my trace.

Program received signal SIGSEGV, Segmentation fault.
0xb6f305dc in ?? () from /usr/lib/libORBit-2.so.0
(gdb) bt
  • #0 ??
    from /usr/lib/libORBit-2.so.0
  • #1 ORBit_encode_CORBA_TypeCode
    from /usr/lib/libORBit-2.so.0
  • #2 ORBit_marshal_any
    from /usr/lib/libORBit-2.so.0
  • #3 ORBit_marshal_value
    from /usr/lib/libORBit-2.so.0
  • #4 ORBit_marshal_value
    from /usr/lib/libORBit-2.so.0
  • #5 ORBit_marshal_value
    from /usr/lib/libORBit-2.so.0
  • #6 ORBit_marshal_arg
    from /usr/lib/libORBit-2.so.0
  • #7 ORBit_small_invoke_adaptor
    from /usr/lib/libORBit-2.so.0
  • #8 ??
    from /usr/lib/libORBit-2.so.0
  • #9 ??
    from /usr/lib/libORBit-2.so.0
  • #10 ??
    from /usr/lib/libORBit-2.so.0
  • #11 ORBit_handle_request
    from /usr/lib/libORBit-2.so.0
  • #12 giop_connection_handle_input
    from /usr/lib/libORBit-2.so.0
  • #13 ??
    from /usr/lib/libORBit-2.so.0
  • #14 ??
    from /usr/lib/libORBit-2.so.0
  • #15 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #16 ??
    from /usr/lib/libglib-2.0.so.0
  • #17 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #18 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #19 main


I noticed in your trace, you have getBoundedRanges(x=0, y=0, width=0, height=0). Similarly when my parameter coordinates are some location offscreen, it seems to be fine with no crash. But when it's an actual box onscreen, that's when it exhibits this problem again.
Comment 5 Li Yuan 2008-11-27 05:53:32 UTC
Can you tell me the parameters you are using?
Comment 6 Andrew Shu 2008-11-27 10:59:01 UTC
Sure. I've tested the different cases of 

1. A zero-sized bounding box
2. A small bounding box (1x1, 5x5, 5x23) inside the component (the fifth parameter COORD_TYPE is set to 1, meaning bounding box coordinates are specified from the corner of the component rather than the screen). "Small" means that it's not large enough to actually contain a full character of the text.
3. A bounding box that is the size of the component. For example, the "File" menubar entry is 38x23 for me in gedit, so I use a bounding box of 38x23.
4. A bounding box that is half the size of the component, e.g. 19x23
5. A bounding box that is large but completely off of the component being looked at

Components I have tested:
1. "File" menubar entry in gedit
2. "Buddies" menubar entry in pidgin
3. the text terminal area in gedit, with and without text

The results are interesting. The program (gedit, pidgin) will crash if the bounding box actually contains at least one character of text. The bounding boxes that were too small or that were not lying on the component worked correctly, returning an empty list in pyatspi. As for the text terminal area of gedit, it does the same, returning an empty list of Ranges for a bounding box surrounding the whole terminal, when there is no text in the terminal. When I type one or more letters into the terminal and try again, then it crashes.

Every crash produces an identical trace, the one I posted previously. It should be easy to reproduce, I think. I wonder if it would be possible to produce more fine-grained traces?


In any case, I saw the notification about the new D-Bus at-spi that doesn't use CORBA. As this getBoundedRanges problem seems related to ORBit2, I suppose that's worth a shot, so I'll give it a try.
Comment 7 André Klapper 2012-02-26 10:41:17 UTC
[Resetting QA Contact to newly introduced "at-spi-maint@gnome.bugs". 
Reason: So far it was impossible to watch changes in at-spi bug reports without following all the specific persons (Li Yuan, Bill Haneman, Jeff Wai, ...) and also their activity outside of at-spi reports.

IMPORTANT: Anyone interested in following all bug activity (including all maintainers) must watch the "at-spi-maint@gnome.bugs" dummy user by adding it to the 'Users to watch' list under Preferences->Email preferences. This is also the default procedure nowadays in GNOME when setting up new products.]
Comment 8 André Klapper 2013-08-14 10:04:06 UTC
[Mass-resetting default assignee, see bug 705890. Please reclaim this bug report by setting the assignee to yourself if you still plan to work on this. Thanks!]
Comment 9 GNOME Infrastructure Team 2021-07-05 10:48:44 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of  gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/at-spi2-atk/-/issues/

Thank you for your understanding and your help.