ATK GlobalRects giving nonsense locations

Bug #1176234 reported by Allan LeSage
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopilot-gtk
Incomplete
High
Alberto Mardegan
autopilot-gtk (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

ken-vandine noticed a failing test based on absurd negative rectangle locations; Ken and I bisected and found that the AddAtkComponentProperties function may be at fault. Having struggled to compose rects I believe the atk_component_get_extents function may be implicated. I'm offering this bug to mardy for the most effective disposition :) .

Ken's failing test is in his branch, lp:~ken-vandine/gnome-control-center-signon/autopilot, name gnome_control_center_signon.test_control_center_signon.ControlCenterTests.test_available_providers .

Related branches

Revision history for this message
Alberto Mardegan (mardy) wrote :

One thing I noticed is that all widgets which are not currently visible on screen have a wrong globalRect. What is worse is that I didn't find any way to tell whether a widget is currently visible or not.
I'll try and see if we can at least return a well-known invalid rect in that case (maybe (-1,-1,0,0)) instead of completely random numbers.

Revision history for this message
Alberto Mardegan (mardy) wrote :

I linked a branch which might solve the issue, but "autopilot vis" doesn't seem to exist anymore. Is there any replacement?

Changed in autopilot-gtk:
status: New → In Progress
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Hi Alberto,

autopilot vis is now in a separate package - you need to install python-autopilot-vis.

Revision history for this message
Martin Pitt (pitti) wrote :

The current test in http://bazaar.launchpad.net/~ken-vandine/gnome-control-center-signon/autopilot/view/head:/tests/autopilot/gnome_control_center_signon/test_control_center_signon.py doesn't access globalRect. However, I read the code of atk_component_get_extents(), and it indeed just returns without changing its input variables if it's not a valid component. So the attached branch makes sense.

I was going to replicate that in a test, but the current logic makes widgets not have a globalRect property at all until they become visible. I'll try to hide them again and ensure that globalRect has a sensible value.

Revision history for this message
Martin Pitt (pitti) wrote :

I cannot reproduce this. I tried with a widget and a GtkDialog, and in both cases the widget does not have a globalRect property until it becomes visible; while being visible it has a valid rect, and after it gets hidden the globalRect stays at the old (valid) values. The latter is probalby a bit questionable, but as the "visible" property is false, one shouldn't pay attention to it.

Is that still an issue with current autopilot-gtk? Ken?

Changed in autopilot-gtk:
status: In Progress → Incomplete
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:autopilot-gtk at revision 45, scheduled for release in autopilot-gtk, milestone Unknown

Changed in autopilot-gtk:
status: Incomplete → Fix Committed
Martin Pitt (pitti)
Changed in autopilot-gtk:
status: Fix Committed → Incomplete
Martin Pitt (pitti)
Changed in autopilot-gtk (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopilot-gtk - 1.3+13.10.20130627-0ubuntu1

---------------
autopilot-gtk (1.3+13.10.20130627-0ubuntu1) saucy; urgency=low

  [ Martin Pitt ]
  * Add make test/ctest integration, and run tests during package build.
  * Add integration test suite (LP: #1083612). (LP: #1083612)

  [ Alberto Mardegan ]
  * Initialize rect fields to -1 This makes the globalRect variable
    return negative values (for some reason, not -1 but -2147483648)
    when the rectangle is offscreen. (LP: #1176234)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 46
 -- Ubuntu daily release <email address hidden> Thu, 27 Jun 2013 00:01:15 +0000

Changed in autopilot-gtk (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.