Bug 50578 - atspi_deregister_keystroke_listener doesn't copy keyval into a DBind KeySet
Summary: atspi_deregister_keystroke_listener doesn't copy keyval into a DBind KeySet
Status: RESOLVED FIXED
Alias: None
Product: at-spi2
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Rob Taylor
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-01 05:18 UTC by Marcus Habermehl
Modified: 2012-06-04 15:38 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to fix atspi_deregister_keystroke_listener (1.91 KB, patch)
2012-06-01 05:18 UTC, Marcus Habermehl
Details | Splinter Review
Test script (505 bytes, text/x-python)
2012-06-01 05:19 UTC, Marcus Habermehl
Details

Description Marcus Habermehl 2012-06-01 05:18:37 UTC
Created attachment 62370 [details] [review]
Patch to fix atspi_deregister_keystroke_listener

If you try to deregister a keystroke listener with deregister_keystroke_listener such lines are printed more than once.

process 10626: arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_utf8 (*string_p)" failed in file ../../dbus/dbus-message.c line 2534.
This is normally a bug in some application using the D-Bus library.
process 10626: Array or variant type requires that type string be written, but int32 was written.
The overall signature expected here was 'oa(iisi)' and we are on byte 5 of that signature.
process 10626: Array or variant type requires that type int32 be written, but end_struct was written.
The overall signature expected here was 'oa(iisi)' and we are on byte 6 of that signature.
Segmentation fault (core dumped)

I'm attaching a Python script (test.py) to reproduce this.

In contrast to atspi_register_keystroke_listener atspi_deregister_keystroke_listener doesn't convert the key_set GArray to a DBind KeySet.

I have created a patch that adds the code from atspi_register_keystroke_listener that converts the keyval to a KeySet to atspi_deregister_keystroke_listener.

After patching at-spi2-core deregistering is working. But it is extremly slow.

$ python test.py
Keystroke listener registered in 0.284666 seconds
Keystroke listener deregistered in 38.871430 seconds
Comment 1 Marcus Habermehl 2012-06-01 05:19:08 UTC
Created attachment 62371 [details]
Test script
Comment 2 Mike Gorse 2012-06-04 14:26:03 UTC
Committing. Thanks for the report and patch.

Also, did you find this bugzilla through a link, or did you simply search on FDO and have the component? I'd prefer to use bugzilla.gnome.org to track AT-SPI bugs, since the code is hosted on git.gnome.org nowadays, so, if there is a link somewhere pointing people to freedesktop, then I'd like to update it.
Comment 3 Marcus Habermehl 2012-06-04 14:54:46 UTC
Yes, I have searched first on bugzilla.gnome.org for at-spi2, but found only the old at-spi there. Then I found the hint to http://bugs.freedesktop.org in the README of at-spi2-core's source archive.
Comment 4 Mike Gorse 2012-06-04 15:38:57 UTC
Ah. I should review all of the links in that README--it hasn't been touched for a long time. Thanks for the pointer.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.