Checkbox gets hidden to the launcher when too many commands run in a short space of time

Bug #868995 reported by Brendan Donegan
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
High
Daniel Manrique
Nominated for 0.12 by Brendan Donegan
Nominated for Oneiric by Brendan Donegan
checkbox (Ubuntu)
High
Daniel Manrique
Oneiric
Undecided
Unassigned

Bug Description

It seems that when Checkbox runs a command as part of a test, it will jump into the Unity launcher and require the user to switch back to its window somehow. This makes it very difficult to use at the moment.

[Impact]
When running tests using Checkbox on an Ubuntu system with Unity 3D (the default, so a lot of people will have this config), checkbox often "minimizes" itself during the tests. It gets "swallowed" by Unity, and from the user's point of view it simply disappears. This is very confusing for users; they may think checkbox just crashed, or even if they realize it's in the dash and bring it back, the same behavior is likely to occur multiple times during a test run. This makes the testing process confusing and cumbersome.

Given the exposure checkbox has received as the testing client for Ubuntu Friendly, having this fix in the stable 11.10 release would be desirable, as otherwise we're providing a very poor testing experience that can hinder adoption and usefulness of Ubuntu Friendly.

[Development Fix]
Since the main checkbox window is actually a GtkDialog, and the progress indicator dialog actually a GtkWindow, Unity was getting confused about which one was the main window and which one has to be minimized to the dash.

Checkbox revision 1109 addresses this by getting rid of the progress indicator popup window. The progress indicator has instead been moved as a widget inside the main GtkDialog. It just gets hidden and shown as needed. The code changes are purposefully small, and most of the work resides in the .ui file, where the box_wait component was simply moved from its containing window_wait (which is removed altogether) to a slot inside the main dialog's GtkVBox.

[Stable Fix]
This is fixed in http://bazaar.launchpad.net/~checkbox-dev/checkbox/trunk/revision/1109. Also, the linked branch (https://code.launchpad.net/~roadmr/ubuntu/oneiric/checkbox/0.12.8.1) contains this and other fixes and merges cleanly against Ubuntu checkbox 0.12.8.

[Test Case]
- Start "system testing" (checkbox-gtk version 0.12.8) on an 11.10 system using Unity 3d.
- Press "Next" and provide password when prompted.
- Leave all tests and suites selected and press Next.
- When the tests start, just press "alt-X" to invoke the "Next" button, skipping all the tests.
- Checkbox will eventually minimize to the dash. The behavior is somewhat unpredictable but easily reproducible.
- Restore checkbox and continue pressing 'Next' until the test run finishes. This is to observe how many times the behavior occurs during a test run.

[Regression Potential]This is just a rearranging of GUI components with a small code change. Regressions are quite unlikely, consisting perhaps of further UI quirks (though potentially not as disrupting as this one). None of the submitted changes are likely to result in the application crashing or other undesirable behavior.

ProblemType: BugDistroRelease: Ubuntu 11.10
Package: checkbox 0.12.8
ProcVersionSignature: Ubuntu 3.0.0-12.19-generic-pae 3.0.4
Uname: Linux 3.0.0-12-generic-pae i686
ApportVersion: 1.23-0ubuntu2
Architecture: i386
CheckboxSubmission: d8c5f3e985fb3480a77522d781d128a9
CheckboxSystem: b845c366ea09c60efa3a45c1b5b21525
Date: Thu Oct 6 09:55:44 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20110921.2)
ProcEnviron:
 LANGUAGE=en_GB:en
 LANG=en_GB.UTF-8
 SHELL=/bin/bashSourcePackage: checkbox
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :
Revision history for this message
Ara Pulido (ara) wrote :

A bit annoying, yes. We will need to include this in a SRU

Changed in checkbox (Ubuntu):
importance: Undecided → High
Changed in checkbox:
importance: Undecided → High
milestone: none → 0.12.9
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Noting that the exact same behavior doesn't happen with Unity 2D, but it's still 'wrong' in that there is a window present which can't be seen. This could be what is causing this problem in Unity 3D.

summary: - Checkbox gets swallowed by the launcher whenever a command runs
+ Checkbox gets swallowed by the launcher sometimes when a command runs
Revision history for this message
Brendan Donegan (brendan-donegan) wrote : Re: Checkbox gets swallowed by the launcher sometimes when a command runs

This is a tricky one to pin down. It doesn't always happen, some commands run just fine without hiding checkbox, but a lot don't. I'm starting to feel like this is some weird Unity bug, so I'll be asking around about problems with apps that open and close multiple windows a lot like Checkbox does.

Changed in checkbox:
status: New → Confirmed
assignee: nobody → Brendan Donegan (brendan-donegan)
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Probably best to focus on the first time this happens when running checkbox, which seems to always be at the bluetooth tests.

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

So there's a fix for this, but I can't propose it because it makes me feel icky. In trying desperately to debug this I've discovered that introducing even a small delay before the command is run prevents Checkbox from being swallowed by the Unity launcher. In this case I put 'time.sleep(2)' in Job.execute

This does indicate then that this is some sort of timing issue in perhaps Gtk3, or maybe Unity or Compiz.

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

I'm feeling pretty convinced that the hiding of the the GtkWindow which is the wait dialog is the culprit here. It seems like if hide is called on a widget that is not shown at that time then the wrong window (i.e. the parent window) will get hidden instead. Trying to detect whether the widget is hidden seems to not really work very well. It doesn't fix the problem.

summary: - Checkbox gets swallowed by the launcher sometimes when a command runs
+ Checkbox gets hidden to the launcher when too many commands run in a
+ short space of time
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in checkbox (Ubuntu):
status: New → Confirmed
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Checking if the wait dialog is active before hiding it (self._wait.is_active()) mitigates the symptoms slightly - but causes a different problem where the dialog won't get hidden because Gtk says it's not active when it is actually being displayed.

It's been suggested that the fact that the main Checkbox 'window' is in fact a GtkDialog and the wait dialog is a GtkWindow could be confusing the window manager. However changing this around seems to require quite a significant amount of refactoring. It's something we could try with the Checkbox UI re-write, but it won't happen in a short period of time.

Changed in checkbox:
status: Confirmed → In Progress
Changed in checkbox:
status: In Progress → Triaged
assignee: Brendan Donegan (brendan-donegan) → nobody
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

If this bug is causing you a lot of difficulty then I would recommend to install the package 'checkbox-urwid'. You must make sure to run in the terminal 'checkbox-urwid --whitelist=/usr/share/checkbox/data/whitelists/default.whitelist' to submit the correct results for Ubuntu Friendly.

The Urwid interface runs in the terminal and is text based, but has color formatting and allows the use of the mouse. For example what would have been a radio button in the GTK interface would appear as a '[ ]' in the Urwid one. Simply clicking between the brackets selects that option.

Daniel Manrique (roadmr)
Changed in checkbox:
status: Triaged → In Progress
assignee: nobody → Daniel Manrique (roadmr)
Changed in checkbox (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Daniel Manrique (roadmr)
description: updated
Changed in checkbox:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package checkbox - 0.13

---------------
checkbox (0.13) precise; urgency=low

  New upstream release (LP: #892268):

  [Marc Tardif]
  * Generate a submission.xml file that contains all device and attachment
  * Write the report before reporting the validation error.
  * Changed device.product to dmi.product for the formfactor (LP: #875312)

  [Daniel Manrique]
  * Use gettext for string (LP: #869267)
  * Move progress indicator to main checkbox dialog instead of a
    transient window (LP: #868995)
  * Ignore malformed dpkg entries in package_resource (LP: #794747)
  * Reset window title after finishing a manual test (LP: #874690)
  * Handle "@" in locale names (as in ca@valencia).

  [Jeff Lane]
  * Went through all the job files and:
    * Updated descriptions to match Unity UI structure
    * Added descriptions where necessary
    * Added further details to some descriptions
    * Moved some jobs to more appropriate files
    * Fixed job names in older job files to match new naming scheme
      (suite/testname)
    * Added jobs to local.txt to ensure all job files are now parsed
      (this allows easier addition of existing tests to whitelists)
    * Changed remaining manual job descriptions to match the new format
  * Updated CD and DVD write tests to be more clear about when to skip
    them (LP: #772794)

  [Ara Pulido]
  * Rewrote all job descriptions to match OEM QA syntax

  [Brendan Donegan]
  * Fix the code that assigns keys in checkbox-cli so that it never assigns
    keys which have other uses. (LP: #877467)
  * Show details of unmet job requirements (LP: #855852)
  * Ensure that connect_wireless chooses a wireless connection from the list
    of available connections (LP: #877752)
  * Have the bluetooth/detect tests require a device with the category
    BLUETOOTH to run, thus preventing the test from failing on systems with
    no Bluetooth device (LP: #862322)
  * Rename attachment jobs to not have a forward slash in their name
    (LP: #887964)
  * Guard against trying to write files to logical partitions on USB sticks
    (which will obviously fail) in usb_test (LP: #887049)
  * Make the OpenGL test ignore the return value of glxgears and improve
    the test description (LP: #890725)
  * Allow input/mouse test to run if a TOUCH device is present
    (LP: #886129)

  [ Javier Collado ]
  * Broken job dependencies fixed (LP: #888447)
  * Regex support when specifying blacklists and whitelists on the
    commandline (LP: #588647)
 -- Daniel Manrique <email address hidden> Thu, 18 Nov 2011 12:46:21 -0500

Changed in checkbox (Ubuntu):
status: In Progress → Fix Released
Daniel Manrique (roadmr)
Changed in checkbox:
status: Fix Committed → Fix Released
Daniel Manrique (roadmr)
description: updated
Daniel Manrique (roadmr)
description: updated
Daniel Manrique (roadmr)
description: updated
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Brendan, or anyone else affected,

Accepted checkbox into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in checkbox (Ubuntu Oneiric):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

The problem doesn't occur anymore and everything is okay!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Rolf Leggewie (r0lf) wrote :

oneiric has seen the end of its life and is no longer receiving any updates. Marking the oneiric task for this ticket as "Won't Fix".

Changed in checkbox (Ubuntu Oneiric):
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers