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 702753 - gnome-shell does something wrong with images (breaking pyatspi .get_image*() methods)
gnome-shell does something wrong with images (breaking pyatspi .get_image*() ...
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: message-tray
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-06-20 14:57 UTC by Matěj Cepl
Modified: 2021-07-05 14:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testing script (2.00 KB, text/x-python)
2013-06-20 14:57 UTC, Matěj Cepl
Details
universal testing script (561 bytes, text/x-python)
2013-06-20 15:05 UTC, Matěj Cepl
Details

Description Matěj Cepl 2013-06-20 14:57:57 UTC
Created attachment 247332 [details]
testing script

Description of problem:
When trying to discover which notification is urgent and which is not, I try to investigate which icon is shown in the gnome-shell. With the attached script I generate a notification via libnotify and then I try to investigate it with pyatspi (usually I would use dogtail, but in order to eliminate its possible guilt in the action, I am using only plain pyatspi). The result of running this script on my system is

matej@wycliff: libnotify (rhel-7 *%)$ ./sample_reproducer.py 
DEBUG:<module>:found 173 icon elements.
DEBUG:<module>:images = None
('summary', <Accessible object at 0x7f67c9807910 (AtspiAccessible at 0x10fe5d0)>)
matej@wycliff: libnotify (rhel-7 *%)$ 

I don't think that line

DEBUG:<module>:images = None

is right. In order to eliminate possible bug with pyatspi I have also created this simple testing script:

#!/usr/bin/python
# -*- coding: utf-8 -*-
import pyatspi, sys
from pyatspi.utils import findAllDescendants, findDescendant


def isAppNamed(node):
    return (node.getRoleName() == 'application') and \
           (node.name == appname)

appname = sys.argv[1]

root = pyatspi.Registry.getDesktop(0)
app = findDescendant(root, isAppNamed, breadth_first=True)
print("app = %s" % app)

icons = findAllDescendants(app, lambda x: x.getRoleName() == 'image')

print("found %d icon elements." % len(icons))

for ico in icons:
    print("images = %s" % icons[0].get_image())

When I run it against for example Firefox (e.g., running ./app_reproducer.py Firefox) I get number of informations about images.

Therefore the only culprit seems to me to be gnome-shell which somehow doesn't provide to pyatspi proper information. That unfortunately breaks my QA efforts.

Version-Release number of selected component (if applicable):
pyatspi-2.8.0-2.el7.noarch
gnome-shell-3.8.3-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.run the above shown script for Firefox to see pyatspi API is working
2.run ./sample_reproducer.py
3.

Actual results:
see above

Expected results:
the .get_icon*() methods should return proper data for the icons.

Also filed as https://bugzilla.redhat.com/show_bug.cgi?id=976440
Comment 1 Matěj Cepl 2013-06-20 15:05:06 UTC
Created attachment 247333 [details]
universal testing script

Of course the testing script I have pasted into the text of the bug has a bug itself. This is a corrected version.
Comment 2 GNOME Infrastructure Team 2021-07-05 14:12:38 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of  gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/

Thank you for your understanding and your help.