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 368602 - Warning when running dogtail tests
Warning when running dogtail tests
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: gail
git master
Other Linux
: Normal major
: ---
Assigned To: bill.haneman
bill.haneman
Depends on:
Blocks:
 
 
Reported: 2006-10-31 23:07 UTC by Wouter Bolsterlee (uws)
Modified: 2006-11-07 17:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix (991 bytes, patch)
2006-10-31 23:13 UTC, Wouter Bolsterlee (uws)
committed Details | Review

Description Wouter Bolsterlee (uws) 2006-10-31 23:07:47 UTC
One of the Dogtail tests included with Evince triggers a warning:

Breakpoint 1, IA__g_log (log_domain=0xb748671c "GLib-GObject",
    log_level=G_LOG_LEVEL_WARNING,
    format=0xb74877d8 "%s: couldn't find weak ref %p(%p)") at gmessages.c:516
516       va_start (args, format);
(gdb) bt
  • #0 IA__g_log
  • #1 IA__g_object_weak_unref
    at gobject.c line 1524
  • #2 IA__g_object_remove_weak_pointer
    at gobject.c line 1546
  • #3 gail_focus_notify_when_idle
    at gail.c line 645
  • #4 gail_deactivate_watcher
    at gail.c line 689
  • #5 signal_emit_unlocked_R
    at gsignal.c line 2406
  • #6 IA__g_signal_emit_valist
  • #7 IA__g_signal_emit
    at gsignal.c line 2243
  • #8 IA__gtk_menu_shell_deactivate
    at gtkmenushell.c line 475
  • #9 gtk_menu_deactivate
    at gtkmenu.c line 3707
  • #10 IA__g_cclosure_marshal_VOID__VOID
  • #11 g_type_class_meta_marshal
    at gclosure.c line 567
  • #12 IA__g_closure_invoke
    at gclosure.c line 490
  • #13 signal_emit_unlocked_R
    at gsignal.c line 2370
  • #14 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #15 IA__g_signal_emit
    at gsignal.c line 2243
  • #16 IA__gtk_menu_shell_deactivate
    at gtkmenushell.c line 475
  • #17 IA__gtk_menu_shell_activate_item
    at gtkmenushell.c line 1016
  • #18 gtk_real_menu_shell_activate_current
    at gtkmenushell.c line 1269
  • #19 IA__g_cclosure_marshal_VOID__BOOLEAN
  • #20 g_type_class_meta_marshal
    at gclosure.c line 567
  • #21 IA__g_closure_invoke
    at gclosure.c line 490
  • #22 signal_emit_unlocked_R
    at gsignal.c line 2478
  • #23 IA__g_signal_emit_valist
  • #24 IA__g_signal_emit_by_name
    at gsignal.c line 2267
  • #25 idle_do_action
    at gailmenuitem.c line 374
  • #26 g_idle_dispatch
    at gmain.c line 3926
  • #27 IA__g_main_context_dispatch
    at gmain.c line 2045
  • #28 g_main_context_iterate
    at gmain.c line 2677
  • #29 IA__g_main_loop_run
    at gmain.c line 2881
  • #30 IA__gtk_main
    at gtkmain.c line 1148
  • #31 main
    at main.c line 345
The program is running.  Quit anyway (and detach it)? (y or n) t

Please answer y or n.
The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from program: /opt/gnome-2-16/bin/evince, process 16265
Comment 1 Wouter Bolsterlee (uws) 2006-10-31 23:10:43 UTC
Relevant script output:

elin:/opt/gnome-2-16/src/evince/test > ./test2.py
Creating logfile at /tmp/dogtail/logs/test2_20061101-001004_debug ...
Detecting distribution: JHBuild environment
GTK Accessibility Module initialized
GTK Accessibility Module initialized
Bonobo accessibility support initialized
Error: Incorrect password
Typing text into {child with name="Password Entry" roleName='password text'}: 'wrong password'
click on {child with name="OK" roleName='push button'}
Error: Incorrect password
click on {child with name="Cancel" roleName='push button'}
click on {child with name="Unlock Document" roleName='push button'}
Typing text into {child with name="Password Entry" roleName='password text'}: 'Foo'
click on {child with name="OK" roleName='push button'}
click on {child with name="File" roleName='menu'}
click on {child with name="Close" roleName='menu item'}

(evince:17026): GLib-GObject-WARNING **: IA__g_object_weak_unref: couldn't find weak ref 0xb74992b0(0xb67aa238)
Comment 2 Wouter Bolsterlee (uws) 2006-10-31 23:13:12 UTC
Created attachment 75745 [details] [review]
Proposed fix

Kris and I did look into this issue and we found the following:

It seems that in some cases the pointer to the focused widget is reset to NULL, and in some other cases it is not. The attached patch adds some consistency and fixes the warning mentioned before.

Please review thoroughly, because neither Kris nor I are familiar with the gail codebase.
Comment 3 Wouter Bolsterlee (uws) 2006-10-31 23:14:01 UTC
For completeness, script output after the above patch was applied:

elin:/opt/gnome-2-16/src/evince/test > ./test2.py 
Creating logfile at /tmp/dogtail/logs/test2_20061101-001120_debug ...
Detecting distribution: JHBuild environment
GTK Accessibility Module initialized
GTK Accessibility Module initialized
Bonobo accessibility support initialized
Error: Incorrect password
Typing text into {child with name="Password Entry" roleName='password text'}: 'wrong password'
click on {child with name="OK" roleName='push button'}
Error: Incorrect password
click on {child with name="Cancel" roleName='push button'}
click on {child with name="Unlock Document" roleName='push button'}
Typing text into {child with name="Password Entry" roleName='password text'}: 'Foo'
click on {child with name="OK" roleName='push button'}
click on {child with name="File" roleName='menu'}
click on {child with name="Close" roleName='menu item'}
Comment 4 bill.haneman 2006-11-07 17:32:31 UTC
Thanks Wouter and Kris!

Patch looks great, committed. (if you want to commit future patches yourself just let me know)