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 372172 - Using AT-SPI getAttributeRun crashes application
Using AT-SPI getAttributeRun crashes application
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: general
0.0.1
Other Linux
: Normal major
: ---
Assigned To: bill.haneman
Li Yuan
: 381279 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-11-07 20:33 UTC by Peter Parente
Modified: 2006-12-11 22:04 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
proposed patch that allocates CORBA sequence even if empty (1.23 KB, patch)
2006-12-11 15:45 UTC, bill.haneman
committed Details | Review

Description Peter Parente 2006-11-07 20:33:34 UTC
1) Open gedit
2) Enter some text.
3) Use an AT that calls getAttributeRun at the caret position (e.g. getAttributeRun(3, False))
4) gedit crashes

This occurs in any gtk text area. Try it in any gtk text field and the application under inspection will crash. When using the older getAttributes method or the getDefaultAttributes method, the crash does not occur.

I'm marking the component as gail, but it's just a guess.

Here's a bug buddy report from the gedit crash:

Distribution: Fedora Core release 6 (Zod)
Gnome Release: 2.16.0 2006-09-04 (Red Hat, Inc)
BugBuddy Version: 2.16.0

System: Linux 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:37:32 EDT 2006 i686
X Vendor: The X.Org Foundation
X Vendor Release: 70101000
Selinux: No
Accessibility: Enabled
----------- .xsession-errors (22837 sec old) ---------------------
** (swriter.bin:6344): WARNING **: Invalidate all children called
** (swriter.bin:6344): WARNING **: Invalidate all children called
** (swriter.bin:6344): WARNING **: Invalidate all children called
** (swriter.bin:6344): WARNING **: Invalidate all children called
** (swriter.bin:6344): 
...Too much output, ignoring rest...
--------------------------------------------------

Memory status: size: 61358080 vsize: 0 resident: 61358080 share: 0 rss: 20676608 rss_rlim: 0
CPU usage: start_time: 1162931211 rtime: 0 utime: 53 stime: 0 cutime:47 cstime: 0 timeout: 6 it_real_value: 0 frequency: 0

Backtrace was generated from '/usr/bin/gedit'

(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1208534272 (LWP 16410)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0x00df9402 in __kernel_vsyscall ()

Thread 1 (Thread -1208534272 (LWP 16410))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/libpthread.so.0
  • #2 gnome_gtk_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 memcpy
    from /lib/libc.so.6
  • #5 giop_dump_send
    from /usr/lib/libORBit-2.so.0
  • #6 ORBit_marshal_value
    from /usr/lib/libORBit-2.so.0
  • #7 ORBit_marshal_arg
    from /usr/lib/libORBit-2.so.0
  • #8 ORBit_small_invoke_adaptor
    from /usr/lib/libORBit-2.so.0
  • #9 ORBit_recv_buffer_return_sys_exception
    from /usr/lib/libORBit-2.so.0
  • #10 ORBit_recv_buffer_return_sys_exception
    from /usr/lib/libORBit-2.so.0
  • #11 ORBit_skel_class_register
    from /usr/lib/libORBit-2.so.0
  • #12 ORBit_handle_request
    from /usr/lib/libORBit-2.so.0
  • #13 giop_connection_handle_input
    from /usr/lib/libORBit-2.so.0
  • #14 link_connection_state_changed
    from /usr/lib/libORBit-2.so.0
  • #15 link_io_add_watch_fd
    from /usr/lib/libORBit-2.so.0
  • #16 g_main_context_dispatch
    from /lib/libglib-2.0.so.0
  • #17 g_main_context_check
    from /lib/libglib-2.0.so.0
  • #18 g_main_loop_run
    from /lib/libglib-2.0.so.0
  • #19 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #20 main
  • #0 __kernel_vsyscall

Comment 1 André Klapper 2006-12-02 01:07:03 UTC
*** Bug 381279 has been marked as a duplicate of this bug. ***
Comment 2 Li Yuan 2006-12-11 04:52:34 UTC
Hi Peter, which AT are you referring to? orca, gok?
Comment 3 Peter Parente 2006-12-11 15:37:38 UTC
I was using LSR, but then wrote an external test script using pyORBit alone to confirm. I can dig up that script and attach if it will help you test and debug.
Comment 4 bill.haneman 2006-12-11 15:44:42 UTC
Peter - does the problem also occur if you pass includeDefaults==TRUE in
getAttributeRun?

I am guessing that this is a latent bug (with empty sets) in all the getAttribute implementations for text - but that the default attribute set is always non-empty.

I am not in a good position to test live ATM but attach a patch - if you happen to be able to test the patch today it would be helpful.

Bill
Comment 5 bill.haneman 2006-12-11 15:45:43 UTC
Created attachment 78136 [details] [review]
proposed patch that allocates CORBA sequence even if empty

Peter, does this patch solve the problem for you?
Comment 6 Peter Parente 2006-12-11 16:08:14 UTC
> Peter - does the problem also occur if you pass includeDefaults==TRUE in
> getAttributeRun?

Good thought. It does *not* crash with includeDefaults=True.
 
> I am not in a good position to test live ATM but attach a patch - if you happen
> to be able to test the patch today it would be helpful.

I am not setup to test the patch, unfortunately. But it sounds like you're headed in the right direction with correcting the non-default case.
Comment 7 bill.haneman 2006-12-11 17:02:30 UTC
Hi Peter - my tests here seem to confirm that the patch above works (at least, I cannot reproduce the problem, when calling Text.getAttributeRun with includeDefaults==FALSE.

Will commit when ChangeLog is ready.  Thanks for reporting the bug.