Removing an indicator makes the indicator on the left inaccessible/invisible

Bug #1058652 reported by Akshay Shekher
68
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Wingpanel
Fix Released
High
Victor Martinez

Bug Description

When an app providing an indicator exists and the indicator is removed from the panel, the indicator on the left of it becomes invisible and unclickable, but still affects positioning of other indicators.

Related branches

Revision history for this message
Akshay Shekher (voldyman) wrote :
Revision history for this message
David Gomes (davidgomes) wrote :

We need to test this behavior on Ubuntu Unity to make sure it's Wingpanel. It could be the appindicators themselves.

Changed in wingpanel:
status: New → Triaged
importance: Undecided → Medium
Changed in wingpanel:
milestone: none → luna-beta3
summary: - extra indicators removed when one indicator app exits
+ Removing an indicator removes other indicators on the left of removed
+ one
description: updated
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote : Re: Removing an indicator removes other indicators on the left of removed one

I'm pretty sure it's Wingpanel - I've never seen anything like that on Unity in all these years.

Here's a more in-depth demo of the problem (tested on Redshift with native indicator; happens to sni-qt indicators as well).

description: updated
summary: - Removing an indicator removes other indicators on the left of removed
- one
+ Removing an indicator makes the indicator on the left invisible
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote : Re: Removing an indicator makes the indicator on the left invisible

Also, this bug looks like a likely cause for bug 1010690

Changed in wingpanel:
importance: Medium → High
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote : Re: Removing an indicator makes the indicator on the left inaccessible

Trying to follow Cody's advice about targeting all important bugs to beta2. Doesn't sound like a good idea to me, but let's try and see how it goes.

summary: - Removing an indicator makes the indicator on the left invisible
+ Removing an indicator makes the indicator on the left inaccessible
Changed in wingpanel:
milestone: luna-beta3 → luna-beta2
summary: - Removing an indicator makes the indicator on the left inaccessible
+ Removing an indicator makes the indicator on the left
+ inaccessible/invisible
Revision history for this message
Victor Martinez (victored) wrote :

Could you please test lp:~victored/wingpanel/indicator-management and let me know if the problem persists?

Changed in wingpanel:
assignee: nobody → Victor (victored)
status: Triaged → In Progress
Revision history for this message
Esa-leirivaara (esa-leirivaara) wrote :

Victor, when i did this "cmake .. -DCMAKE_INSTALL_PREFIX=/usr" i got this error

"-- The C compiler identification is GNU
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- checking for modules 'gobject-2.0;glib-2.0;gio-2.0;gee-1.0;gdk-x11-3.0;x11;gtk+-3.0;granite'
-- package 'gobject-2.0' not found
-- package 'glib-2.0' not found
-- package 'gio-2.0' not found
-- package 'gee-1.0' not found
-- package 'gdk-x11-3.0' not found
-- package 'x11' not found
-- package 'gtk+-3.0' not found
-- package 'granite' not found
CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:266 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:320 (_pkg_check_modules_internal)
  CMakeLists.txt:38 (pkg_check_modules)

-- checking for modules 'gthread-2.0;indicator3-0.4'
-- package 'gthread-2.0' not found
-- package 'indicator3-0.4' not found
CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:266 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:320 (_pkg_check_modules_internal)
  CMakeLists.txt:39 (pkg_check_modules)

CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find Vala (missing: VALA_EXECUTABLE)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindVala.cmake:55 (find_package_handle_standard_args)
  CMakeLists.txt:64 (find_package)

-- Configuring incomplete, errors occurred!"

Revision history for this message
Victor Martinez (victored) wrote :

Hey, thank you so much for testing!

If you are in elementary OS, could you please run "sudo apt-get build-dep wingpanel" and try again?

Revision history for this message
Esa-leirivaara (esa-leirivaara) wrote :

Happy to help. And yes, i'm in Luna.

But, i get error when giving that command. Something like "Incorrect action". Transfered that from finnish. :)

Revision history for this message
Esa-leirivaara (esa-leirivaara) wrote :

Oh, and how to get out of this situation in terminal? "~/wingpanel/build$"

I rebooted the machine, but terminal still says that. :-)

Revision history for this message
Victor Martinez (victored) wrote :

Hi again, sorry for the late response. I had to go to sleep :)

Regarding your question about the Terminal, you could run one of the following commands (without the $):
$ cd ~ # This goes back to home, or:
$ cd .. # This goes back to the parent directory

In regard to the build process itself, please try the following:

$ cd ~
$ bzr checkout --lightweight lp:~elementary-os/elementaryos/elementary-testing-scripts
$ ./elementary-testing-scripts/src/elementary-install-from-bzr lp:wingpanel lp:~victored/wingpanel/indicator-management

This will build and install a package that you can later upgrade. When the build and installation finish, remember to restart Wingpanel:
$ killall wingpanel

Again, thank you for your time and help!

Revision history for this message
Esa-leirivaara (esa-leirivaara) wrote :

Hmmm, now i get this error "Permission denied (publickey).
ConnectionReset reading response for 'BzrDir.open_2.1', retrying
Permission denied (publickey).
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist."

Revision history for this message
Trung Ngô (ndtrung4419) wrote :

@Victor: I can confirm that this bug was fixed in your code.

I myself have also spent some time investigating this problem, it was because the `menuhash` in Panel.vala maps from strings (indicators' name) to Gtk.MenuEntry objects, expecting that each indicator only has one indicator button. Therefore, when an app indicator is removed, the last added app indicator is removed as well (not necessarily the one right next to it).

Revision history for this message
Victor Martinez (victored) wrote :

Thank you for testing Ngô!

That's an excellent explanation of the problem. You're right, the previous devs of Wingpanel were asumming that every indicator only had one entry (menuitem), missing the fact that libapplication.so had a bunch of them. Indeed, the hashmap you mention was unreferencing the previous menuitem when a new one was added.

I'm glad we're finally managing references properly and safely. This kind of bugs should never come back.

Cody Garver (codygarver)
Changed in wingpanel:
status: In Progress → 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.