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 561631 - gailbutton.c:571:idle_do_action: code should not be reached
gailbutton.c:571:idle_do_action: code should not be reached
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: gail
1.24.x
Other Linux
: Normal normal
: ---
Assigned To: Li Yuan
Li Yuan
Depends on:
Blocks:
 
 
Reported: 2008-11-20 04:41 UTC by Nagappan Alagappan
Modified: 2009-02-26 02:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
gedit_chains.log (646 bytes, text/plain)
2009-02-13 02:29 UTC, yue.wang
  Details
generate_pgp.log (992 bytes, text/plain)
2009-02-13 02:30 UTC, yue.wang
  Details
patch (506 bytes, patch)
2009-02-13 04:41 UTC, yue.wang
committed Details | Review
a new patch (853 bytes, patch)
2009-02-25 08:32 UTC, yue.wang
none Details | Review
the mew patch (1.04 KB, patch)
2009-02-25 08:56 UTC, yue.wang
none Details | Review
final patch (983 bytes, patch)
2009-02-26 02:24 UTC, Li Yuan
committed Details | Review

Description Nagappan Alagappan 2008-11-20 04:41:22 UTC
(gedit:20150): Gtk-CRITICAL **: gtk_button_leave: assertion `GTK_IS_BUTTON (button)' failed
**
ERROR:/build/buildd/gtk+2.0-2.14.4/modules/other/gail/gailbutton.c:571:idle_do_action: code should not be reached
Aborted (core dumped)

(gdb) thread apply all bt



On running the following LDTP script, gedit crashes

from ldtp import *
import threading

callbackRunning = threading.Event ()
callbackRunning.clear ()
callbackState = threading.Event ()
callbackState.clear ()

def call ():
  callbackState.set ()
  if waittillguiexist ('dlgReplace'):
    click ('dlgReplace', 'btnClose')
  callbackState.clear ()
  callbackRunning.set ()

onwindowcreate ('Replace', call)
click ('*-gedit', 'btnReplace')
click ('*-gedit', 'btnOpen')
#import time
#time.sleep (2)
if waittillguiexist ('dlgOpenFiles'):
  # time.sleep (2)
  click ('dlgOpenFiles', 'btnCancel')
# time.sleep (2)
if callbackState.isSet ():
   print 'Waiting for callback to complete'
   callbackRunning.wait ()

I'm able to reproduce this in Ubuntu 8.10 - 32 bit

Shall I provide any other info ?
Comment 1 Li Yuan 2008-11-20 08:35:25 UTC
From the code, LDTP calls do_action on button with the action number greater than 2 which is not allocated to any action.
Could you check LDTP's code please?
Comment 2 Nagappan Alagappan 2008-11-20 18:03:01 UTC
Li, All the click events, I have implemented as 0 for sure and in the above code, I'm just doing click action only.
Comment 3 Li Yuan 2008-11-20 22:13:20 UTC
Can you paste the action number during the crash?
Comment 4 Nagappan Alagappan 2008-12-01 20:07:09 UTC
This happens with seahorse application as well.

My test environment Ubuntu 8.10.

In console, I notice the following error message:

-----
(.:12476): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(.:12476): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(.:12476): Gtk-CRITICAL **: gtk_button_leave: assertion `GTK_IS_BUTTON (button)' failed
** Message: could not grab keyboard

(.:12476): Gtk-CRITICAL **: gtk_button_leave: assertion `GTK_IS_BUTTON (button)' failed
**
ERROR:/build/buildd/gtk+2.0-2.14.4/modules/other/gail/gailbutton.c:571:idle_do_action: code should not be reached
-----

Steps to reproduce the issue:

The way to reproduce the error is getting the latest tests and running (you need bzr installed)

$ bzr branch lp:ubuntu-desktop-testing
$ cd ubuntu-desktop-testing
$  ./bin/ubuntu-desktop-tests -a seahorse

It should  work in both Suse and Ubuntu.

The test opens seahorse and tries to create a PGP key.  But when it enters the passphrase, it crashes.

Above steps created by Ara
Comment 5 Nagappan Alagappan 2008-12-10 23:48:31 UTC
I'm able to reproduce this in openSUSE / Ubuntu with latest GNOME. Looks like a new regression ?
Comment 6 Nagappan Alagappan 2009-01-20 02:25:39 UTC
Most of my tests (using LDTP) in Ubuntu 8.10 / openSUSE 11.1 are failing because of this. Unable to run VMware workstation tests / Ubuntu desktop testing tests. Confirming the bug.
Comment 7 Li Yuan 2009-01-20 03:35:14 UTC
I tried the seahorse case. Seahorse is started but does nothing, and doesn't crash. Did I missed something?

The code of gailbutton has not been touched for a long time.
Comment 8 tac 2009-01-20 03:44:00 UTC
Reproducing this on Solaris NEVEADA with LDTP-1.4.0(Testing gedit), pasting BugReportTool reports: 

Distribution:                   Solaris Express Community Edition snv_105 X86
Gnome Release: 2.24.2 2008-12-01 (Sun Microsystems, Inc.)
BugBuddy Version: 2.24.2

X Vendor: Sun Microsystems, Inc.
X Vendor Release: 10300000
Selinux: No
Accessibility: Enabled
GTK+ Theme: nimbus
Icon Theme: nimbus

Memory status: size: 151175168 vsize: 151175168 resident: 27570176 share:
2703360 rss: 27570176 rss_rlim: 0
CPU usage: start_time: 1232421671 rtime: 128 utime: 1075821 stime: 209776
cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 0

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

3430:   gedit
-----------------  lwp# 1 / thread# 1  --------------------
 fef120a5 waitid   (0, d77, 80467dc, 3)
 feec2be5 waitpid  (d77, 8046898, 0, fe488bfd) + 65
 fe489004 g_spawn_sync (0, 8621c30, 0, 4, 0, 0) + 418
 fe489404 g_spawn_command_line_sync (862e010, 0, 0, 0, 80469b8) + 5c
 fa2f1791 __1cNrun_bug_buddy6Fpkclp0_b_ (80fe210, d66, 0, d66) + 71
 fa2f1a19 __1cMcheck_if_gdb6F_v_ (feee7dc5, fef90000, 8046b38, fef0ca5f, 6, 0)
+ 145
 fa2f1458 __1cUbugbuddy_segv_handle6Fi_v_ (6, 0, 8046bec) + 64
 fef0ca5f __sighndlr (6, 0, 8046bec, fa2f13f4) + f
 feeffdaf call_user_handler (6) + 2af
 feefffdf sigacthandler (6, 0, 8046bec) + df
 --- called from signal handler with signal 6 (SIGABRT) ---
 fef11c35 _lwp_kill (1, 6, 8046e28, feeba1fe) + 15
 feeba20a raise    (6, 6, 8046e60, fee916a4) + 22
 fee9170c abort    (884c830, fe4f967c, 8046ea8, fe4e7820, 313735, 880f020) + 74
 fe478403 g_assertion_message (0, fcdc299c, 23b, fcdc1684, 0, 8046f00) + db
 fcda081e idle_do_action (880f020, fef90000, 8046f98, fe56fc5c) + 1aa
 fe56fc79 gdk_threads_dispatch (884b030, fe4f967c, 8046fc8, fe454f08) + 49
 fe454f1e g_idle_dispatch (8841888, fe56fc30, 884b030, 8047020) + 22
 fe4528a6 g_main_context_dispatch (811f268, c8, 86741e8, f) + 262
 fe452f49 g_main_context_iterate (811f268, 1, 1, 80fd228) + 475
 fe4535bd g_main_loop_run (8269bc8, 8269bc8, 0, fe7670e2) + 1dd
 fe76718b gtk_main (8047150, fefc5244, 0, fee80db2, 29, fef989bc) + b7
 0807dac6 main     (1, 8047190, 8047198, 804714c) + 4ca
 0807cc8d _start   (1, 80472c8, 0, 80472ce, 80472f2, 8047353) + 7d
-----------------  lwp# 6 / thread# 6  --------------------
 fef0c9d9 lwp_park (0, f57c0dec, 0)
 fef0610d cond_wait_queue (8590e68, 8149da0, f57c0dec, fef062f6) + 60
 fef064d3 cond_wait_common (8590e68, 8149da0, f57c0dec, fef06716) + 1eb
 fef0676e __cond_timedwait (8590e68, 8149da0, f57c0e6c, fef06800) + 66
 fef06811 cond_timedwait (8590e68, 8149da0, f57c0e6c, fef06844) + 27
 fef0685c pthread_cond_timedwait (8590e68, 8149da0, f57c0e6c, fe0e1971) + 24
 fe0e19bb g_cond_timed_wait_posix_impl (8590e68, 8149da0, f57c0f3c, fe42b296) +
57
 fe42b318 g_async_queue_pop_intern_unlocked (8149d80, 0, f57c0f3c, fe42b746) +
90
 fe42b79c g_async_queue_timed_pop (8149d80, f57c0f3c, f57c0f6c, fe47c312) + 64
 fe47c40f g_thread_pool_wait_for_new_pool (fe4fa68c, fe4f967c, 49754340, 1369d,
fe4fa69c, 0) + 10b
 fe47c64c g_thread_pool_thread_proxy (827f6e8, 8653c50, 200, fe47ae12) + 180
 fe47af37 g_thread_create_proxy (8653c50, fef90000, f57c0fec, fef0c6be) + 133
 fef0c6f6 _thrp_setup (fa382200) + 7e
 fef0c980 _lwp_start (fa382200, 0, 0, fef0c6be, 0, 0)
Output of custom script "/usr/lib/gedit-2/gedit-bugreport.sh":
Comment 9 Nagappan Alagappan 2009-02-12 00:41:38 UTC
Because of this bug, I'm unable to run any test on openSUSE 11.1 / Ubuntu 8.10 / Mandriva 2009.

Thanks
Comment 10 Nagappan Alagappan 2009-02-12 00:44:56 UTC
Code being used to reproduce this crash:

        action = Accessible_getAction (object);
        if (action) {
                flag = AccessibleAction_doAction (action, 0);
                Accessible_unref (action);
        }

http://cgit.freedesktop.org/ldtp/ldtp/tree/src/push-button.c#n80

Please let me know, if I need to change anything in LDTP.

Thanks
Comment 11 Li Yuan 2009-02-12 08:01:40 UTC
Yue Wang is working on this.
Comment 12 yue.wang 2009-02-12 09:21:15 UTC
When I tried to reproduce in ubuntu, I get:

  • File "/home/yue/Download/ubuntu-desktop-testing/seahorse/generate_pgp.py", line 6 in <module>
    from ubuntutesting.gnome import *
ImportError: No module named gnome

How to get the "ubuntutesting.gnome" module?
Comment 13 Ara Pulido 2009-02-12 09:43:07 UTC
It is there under 

/home/yue/Download/ubuntu-desktop-testing/ubuntutesting

You can install all the necessary modules by:

$ sudo python /home/yue/Download/ubuntu-desktop-testing/setup.py install
Comment 14 yue.wang 2009-02-13 02:28:08 UTC
(In reply to comment #13)
> It is there under 
> 
> /home/yue/Download/ubuntu-desktop-testing/ubuntutesting
> 
> You can install all the necessary modules by:
> 
> $ sudo python /home/yue/Download/ubuntu-desktop-testing/setup.py install
> 

Thanks for your help. After that I run the test case successfully. But it didn't crash. I will show you my log. Thanks.
Comment 15 yue.wang 2009-02-13 02:29:13 UTC
Created attachment 128612 [details]
gedit_chains.log
Comment 16 yue.wang 2009-02-13 02:30:47 UTC
Created attachment 128613 [details]
generate_pgp.log

There is an error about exit, but not clicking button.
Comment 17 yue.wang 2009-02-13 02:47:25 UTC
Second time when I try the test case today morning in ubuntu, I reproduced it on my box in "./bin/ubuntu-desktop-tests -a seahorse":

GTK Accessibility Module initialized
** Message: init gpgme version 1.1.6

** (.:12122): WARNING **: couldn't open file to check for SSH key: /home/yue/.ssh/id_dsa: Permission denied

(.:12122): Gtk-CRITICAL **: gtk_button_leave: assertion `GTK_IS_BUTTON (button)' failed

(.:12122): Gtk-CRITICAL **: gtk_button_leave: assertion `GTK_IS_BUTTON (button)' failed
**
ERROR:gailbutton.c:571:idle_do_action: code should not be reached


but not in "./bin/ubuntu-desktop-tests -a gedit".
Comment 18 Nagappan Alagappan 2009-02-13 03:04:43 UTC
ah ! nice, in any case, the issue is same :)

Thanks
Comment 19 Li Yuan 2009-02-13 03:14:46 UTC
Yes, we are debugging it.
Comment 20 yue.wang 2009-02-13 04:41:38 UTC
Created attachment 128619 [details] [review]
patch
Comment 21 Nagappan Alagappan 2009-02-13 04:48:13 UTC
(In reply to comment #20)
> Created an attachment (id=128619) [edit]
> patch
> 

Thanks for the quick fix :) To build this, I need to get the complete gtk+ tree ?
Comment 22 Li Yuan 2009-02-13 05:06:36 UTC
Yes. GAIL is in Gtk+ now.
Comment 23 Nagappan Alagappan 2009-02-13 22:11:34 UTC
Li, will this be part of previous gnome dot releases ? So, that it might be available via package update. Building gtk+ to produce binary for individual distribution will be a nightmare :)

Thanks
Comment 24 Nagappan Alagappan 2009-02-25 03:49:34 UTC
With the new fixes, I tried it in Ubuntu 9.04 and able to reproduce the crash

Core was generated by `seahorse'.
Program terminated with signal 11, Segmentation fault.
[New process 18760]

Thread 1 (process 18760)

  • #0 IA__g_queue_get_length
    at /build/buildd/glib2.0-2.19.8/glib/gqueue.c line 131
  • #1 idle_do_action
    at /build/buildd/gtk+2.0-2.15.4/modules/other/gail/gailbutton.c line 514
  • #2 gdk_threads_dispatch
    at /build/buildd/gtk+2.0-2.15.4/gdk/gdk.c line 498
  • #3 g_idle_dispatch
    at /build/buildd/glib2.0-2.19.8/glib/gmain.c line 3922
  • #4 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.19.8/glib/gmain.c line 1814
  • #5 g_main_context_iterate
    at /build/buildd/glib2.0-2.19.8/glib/gmain.c line 2448
  • #6 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.19.8/glib/gmain.c line 2656
  • #7 IA__gtk_main
    at /build/buildd/gtk+2.0-2.15.4/gtk/gtkmain.c line 1205
  • #8 ??
  • #9 __libc_start_main
    from /lib/tls/i686/cmov/libc.so.6
  • #10 ??

reopening the bug

Thanks
Comment 25 Li Yuan 2009-02-25 04:38:47 UTC
This is a different crash. The queue has gone before we used it. Seems the button has been finalized. Could you add a printf in gail_button_finalize to see if it is called before idle_do_action?
Comment 26 Nagappan Alagappan 2009-02-25 04:43:41 UTC
(In reply to comment #25)
> This is a different crash. The queue has gone before we used it. Seems the
> button has been finalized. Could you add a printf in gail_button_finalize to
> see if it is called before idle_do_action?
> 

I'm just using it from binary, probably Ara can you try this ?

Thanks
Comment 27 Li Yuan 2009-02-25 04:46:18 UTC
How did you apply the patch?
Comment 28 Nagappan Alagappan 2009-02-25 04:47:09 UTC
(In reply to comment #27)
> How did you apply the patch?
> 

Li, This is now part of Ubuntu 9.04 update.

Thanks
Comment 29 Li Yuan 2009-02-25 04:57:47 UTC
Yue Wang can not reproduce the bug. Can you reproduce it every time?

From the trace, I suspect LDTP free the button immediately after do_action?
Comment 30 Nagappan Alagappan 2009-02-25 05:43:20 UTC
(In reply to comment #29)
> Yue Wang can not reproduce the bug. Can you reproduce it every time?

Both me and Ara able to reproduce always
> 
> From the trace, I suspect LDTP free the button immediately after do_action?
> 
Yes, more detail in comment #10

Thanks
Comment 31 yue.wang 2009-02-25 08:32:33 UTC
Created attachment 129472 [details] [review]
a new patch
Comment 32 Li Yuan 2009-02-25 08:34:25 UTC
OK... Although I can't reproduce the crash, I think it is possible. This is a multi-thread issue. The button is finalized when idle_do_action is being executed. So ref the button in the beginning of idle_do_action and unref it before return can fix the bug. Yue Wang will paste the patch.

P.S. We met a multi-thread problem in bug #329454. Although we fixed that bug, a thread can be scheduled accidentally. Wish we can get rid of such bugs after transfer to DBus.
Comment 33 Li Yuan 2009-02-25 08:37:46 UTC
Nagappan and Ara, would you please try the patch today so we can commit the patch tomorrow to catch up with gnome 2.25.92?
Comment 34 yue.wang 2009-02-25 08:56:27 UTC
Created attachment 129475 [details] [review]
the mew patch

Adding g_object_unref before the other "return".
Comment 35 Ara Pulido 2009-02-25 08:57:55 UTC
I will try it today.

Thanks a lot.

Comment 36 Ara Pulido 2009-02-25 11:46:56 UTC
The patch solved the issue! Thanks a lot.
Please, tell me when you commit this, so I can track it better.

Thanks again,
Ara.
Comment 37 Li Yuan 2009-02-26 02:24:23 UTC
Created attachment 129534 [details] [review]
final patch