|Summary:||atspi_deregister_keystroke_listener doesn't copy keyval into a DBind KeySet|
|Product:||at-spi2||Reporter:||Marcus Habermehl <bmh1980>|
|Component:||core||Assignee:||Rob Taylor <rob.taylor>|
|Status:||RESOLVED FIXED||QA Contact:|
|i915 platform:||i915 features:|
Patch to fix atspi_deregister_keystroke_listener
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 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.