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 645801 - After installing package, sometimes Applications of Activities overview has only one program icon.
After installing package, sometimes Applications of Activities overview has ...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
2.91.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 646146 (view as bug list)
Depends on:
Blocks: GnomeShell301
 
 
Reported: 2011-03-27 04:58 UTC by sangu
Modified: 2011-04-07 15:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
AppDisplay: refresh the view after refreshing sections (1.23 KB, patch)
2011-03-27 13:02 UTC, Giovanni Campagna
none Details | Review
appDisplay: initialize AlphabeticalView._apps (906 bytes, patch)
2011-03-27 22:59 UTC, Owen Taylor
none Details | Review
AppDisplay: refresh the view after refreshing sections (1.53 KB, patch)
2011-03-28 14:34 UTC, Giovanni Campagna
committed Details | Review

Description sangu 2011-03-27 04:58:40 UTC
After installing package, sometimes Applications of Activities overview  has only one program icon.

1. Install program package
2. Click Activities -> Applications

Is this relative messages?
$ cat ~/.xsession-errors
[skip]
    JS ERROR: !!!   Exception was: TypeError: this._sections[num] is undefined
    JS ERROR: !!!     lineNumber = '189'
    JS ERROR: !!!     fileName = '/usr/share/gnome-shell/js/ui/appDisplay.js'
    JS ERROR: !!!     stack = '([object _private_Shell_AppInfo])@/usr/share/gnom
e-shell/js/ui/appDisplay.js:189
([object _private_Shell_AppInfo])@/usr/share/gjs-1.0/lang.js:110
([object _private_Shell_AppInfo])@/usr/share/gnome-shell/js/ui/appDisplay.js:74
([object Array])@/usr/share/gnome-shell/js/ui/appDisplay.js:123
([object Array])@/usr/share/gnome-shell/js/ui/appDisplay.js:227
()@/usr/share/gnome-shell/js/ui/appDisplay.js:275
()@/usr/share/gjs-1.0/lang.js:110
_runDeferredWork("1")@/usr/share/gnome-shell/js/ui/main.js:820
_runAllDeferredWork()@/usr/share/gnome-shell/js/ui/main.js:829
()@/usr/share/gnome-shell/js/ui/main.js:910
'
    JS ERROR: !!!     message = 'this._sections[num] is undefined'
[...]

gnome-shell-2.91.92-3.fc15.x86_64
mutter-2.91.92-1.fc15.x86_64
gjs-0.7.13-3.fc15.x86_64
Comment 1 Giovanni Campagna 2011-03-27 13:02:48 UTC
Created attachment 184358 [details] [review]
AppDisplay: refresh the view after refreshing sections

ViewByCategories._removeAll clears the sections, but the filter passed
to view still expects them to exists. Therefore, refresh the view
after the section has been rebuilt and the All filter reapplied.
Comment 2 Giovanni Campagna 2011-03-27 13:03:32 UTC
Please check if this is still reproducible with the provided patch.
Comment 3 Owen Taylor 2011-03-27 22:59:38 UTC
Downstream report of this from Fedora:

 https://bugzilla.redhat.com/show_bug.cgi?id=678560

Reproduction instructons

 - Start adding or removing a package with a desktop file 
 - Go to the overview and browse to an app category other than All


The patch looks right, but testing it revealed that it broke Applications entirely. The problem was quite simple though - when AlphabeticalView is created, this._apps is undefined, so if setFilter is called before .refresh(), then you get a backtrace.

I'll attach a tiny fixup that can be squashed with your patch. With that fix your patch works and the reproduction instructions above no longer reproduce.
Comment 4 Owen Taylor 2011-03-27 22:59:54 UTC
Created attachment 184396 [details] [review]
appDisplay: initialize AlphabeticalView._apps

If setFilter() was called before refresh(), we'd error out becase
_apps was indefined. Set _apps initially to [] to avoid this
problem.
Comment 5 Giovanni Campagna 2011-03-28 14:34:38 UTC
Created attachment 184458 [details] [review]
AppDisplay: refresh the view after refreshing sections

ViewByCategories._removeAll clears the sections, but the filter passed
to view still expects them to exists. Therefore, refresh the view
after the section has been rebuilt and the All filter reapplied.
Comment 6 Owen Taylor 2011-03-28 15:37:25 UTC
Review of attachment 184458 [details] [review]:

Since this only happens when desktop files change *while* the app browser is open to a section other than All, the impact here seems pretty small to me, so I think this can wait until 3.0.1.
Comment 7 Florian Müllner 2011-04-02 17:46:35 UTC
*** Bug 646146 has been marked as a duplicate of this bug. ***
Comment 8 Giovanni Campagna 2011-04-07 15:55:37 UTC
Attachment 184458 [details] pushed as fb019a7 - AppDisplay: refresh the view after refreshing sections