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 550186 - Go two GLib-CRITICAL msg when try to access non-existed widget.
Go two GLib-CRITICAL msg when try to access non-existed widget.
Status: VERIFIED FIXED
Product: LDTP
Classification: Other
Component: ldtp
unspecified
Other Linux
: Normal major
: ---
Assigned To: Nagappan Alagappan
LDTP Development Mailing List
Depends on:
Blocks:
 
 
Reported: 2008-09-01 10:53 UTC by lavi
Modified: 2008-09-09 07:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes the glib critical message (3.99 KB, patch)
2008-09-05 03:30 UTC, Nagappan Alagappan
committed Details | Review

Description lavi 2008-09-01 10:53:03 UTC
Step to repro:
guofux@ohmypc:~$ python
Python 2.5.1 (r251:54863, Mar  7 2008, 04:10:12) 
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ldtp
>>> getwindowlist()
Traceback (most recent call last):
  • File "<stdin>", line 1 in <module>
NameError: name 'getwindowlist' is not defined
>>> ldtp.getwindowlist()
[u'frmTopExpandedEdgePanel', u'frmUnsavedDocument1-gedit', u'frmDesktop', u'frmBottomExpandedEdgePanel']
>>> ldtp.click('frm*gedit', 'btnXX')

(ldtp:8333): GLib-CRITICAL **: g_hash_table_insert: assertion `hash_table != NULL' failed

(ldtp:8333): GLib-CRITICAL **: g_hash_table_insert: assertion `hash_table->ref_count > 0' failed
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/ldtp.py", line 576, in click
    raise LdtpExecutionError ('click failed: ' + _responseStatus [1])
ldtplib.ldtplibutils.LdtpExecutionError: u'click failed: Unable to find object name in application map'

Expect Result:
After check the source, is this the right action:
	ht_data_list = g_hash_table_new_full (&g_str_hash, &g_str_equal,
						 destroy_string, NULL);
	obj.key = context;
	obj.parent_name = NULL;
	obj.obj_is_window = obj_is_window;
	obj.ht_data_list = ht_data_list; // orignal the obj was not getting this value.
	g_hash_table_foreach (ht, search_window_key_based, &obj);
Comment 1 lavi 2008-09-01 10:54:01 UTC
Oh, yes, the version NO is 1.3.0
Comment 2 Nagappan Alagappan 2008-09-05 03:30:18 UTC
Created attachment 118069 [details] [review]
Fixes the glib critical message
Comment 3 Nagappan Alagappan 2008-09-05 04:46:42 UTC
Thanks for the bug report. Fix is available in GIT repository.
Comment 4 lavi 2008-09-09 07:14:59 UTC
good fixing.