HUD doesn't close its searches properly

Bug #1051607 reported by Sami Jaktholm
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Unity
Confirmed
Low
Unassigned
unity (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

If you perform a search and exit the HUD by
a) choosing a result with you mouse or keyboard or
b) clicking outside HUD area
the HUD doesn't close its search properly.

By examining DBus traffic it seems that Unity starts a new empty search after CloseQuery is called. Then every time the active window is changed, hud-service will load the menus (if necessary) and perform a search against the menu structure consuming precious CPU power and forcing applications that don't export their menus fully at startup (firefox for example) to map their menus into DBus.

However if you close the HUD by pressing Escape twice (first to clear the search, then to close the HUD), the query is closed properly.

Steps to reproduce:
#1: Start monitoring hud-service DBus activity: $ dbus-monitor "interface='com.canonical.hud'"
#2: Open HUD and perform a search
#3: Close HUD by clicking outside the HUD area with your mouse (notice how Unity first calls CloseQuery and then StartQuery)
#4: Start switching between applications (notice how HUD sends UpdatedQuery signals indicating it's doing something)

If you watch com.canonical.dbusmenu interface ($ dbus-monitor "interface='com.canonical.dbusmenu'") you'll see how HUD sends 'opened' and 'closed' events to applications and loads menus if not yet loaded.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: unity 5.16.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-30.48-generic 3.2.27
Uname: Linux 3.2.0-30-generic x86_64
ApportVersion: 2.0.1-0ubuntu13
Architecture: amd64
CompizPlugins: [core,composite,opengl,compiztoolbox,decor,imgpng,vpswitch,gnomecompat,screenshot,grid,resize,move,text,mousepoll,snap,regex,place,wall,shift,session,animation,workarounds,fade,expo,scale,unityshell]
Date: Sun Sep 16 17:41:40 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=fi_FI.UTF-8
 SHELL=/bin/bash
SourcePackage: unity
UpgradeStatus: Upgraded to precise on 2012-09-09 (7 days ago)

Revision history for this message
Sami Jaktholm (sjakthol) wrote :
Sami Jaktholm (sjakthol)
description: updated
Revision history for this message
Sami Jaktholm (sjakthol) wrote :

Similar behavior can be seen in Quantal with unity 6.4.0-0ubuntu6 too.

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Nice catch! Successfully reproduced on Quantal. I don't think this loophole causes any performance regression, but it's still an oversight that should be fixed.

Changed in unity:
status: New → Triaged
Changed in unity (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Changed in unity:
importance: Undecided → Low
Sami Jaktholm (sjakthol)
Changed in unity:
status: Triaged → In Progress
assignee: nobody → sampo555 (sampo555)
Omer Akram (om26er)
Changed in unity (Ubuntu):
status: Triaged → In Progress
assignee: nobody → sampo555 (sampo555)
Sami Jaktholm (sjakthol)
Changed in unity:
assignee: sampo555 (sampo555) → nobody
Changed in unity (Ubuntu):
assignee: sampo555 (sampo555) → nobody
Changed in unity:
status: In Progress → Confirmed
Changed in unity (Ubuntu):
status: In Progress → Confirmed
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.