No rating and 0 reviews shown for all applications in the dash

Bug #1396553 reported by Bruno Nova on 2014-11-26
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Unity
Invalid
High
Unassigned
unity-lens-applications
High
Sebastien Bacher
unity-lens-applications (Ubuntu)
High
Sebastien Bacher

Bug Description

When viewing the preview of any application in the dash (installed or not) by right-clicking it, the displayed number of reviews is always 0 (zero) and the rating is always empty.
This used to work in previous Ubuntu versions.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: unity 7.2.3+14.04.20140826-0ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-40.69-generic 3.13.11.10
Uname: Linux 3.13.0-40-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CurrentDesktop: Unity
Date: Wed Nov 26 11:08:57 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-10-13 (43 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
SourcePackage: unity
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Bruno Nova (brunonova) wrote :
Andrea Azzarone (azzar1) on 2014-12-19
tags: added: dash
Launchpad Janitor (janitor) wrote :

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

Changed in unity (Ubuntu):
status: New → Confirmed
Sebastien Bacher (seb128) wrote :

that's still an issue in wily

Changed in unity (Ubuntu):
importance: Undecided → High
Changed in unity:
importance: Undecided → High
status: New → Triaged
Changed in unity (Ubuntu):
status: Confirmed → Triaged
tags: added: rls-w-incoming
Kiwinote (kiwinote) wrote :

This has been broken for quite a while - there are two parts to this:

--> UNITY_LENS_APPLICATIONS
Unity-lens-applications reads a Berkeley DB file which is generated by software-center. The filename contains the version number of libdb. In February 2012 the transition [0] to libdb5.1 was done, in November 2013 there was a transition [1] to libdb5.3, but the filename was not updated, which means that since then the source code of unity-lens-applications had had a wrong filename in line 42 of src/unity-ratings-db.c [2].

[0] http://bazaar.launchpad.net/~unity-team/unity-lens-applications/trunk/revision/17.1.166
[1] http://bazaar.launchpad.net/~unity-team/unity-lens-applications/trunk/revision/375
[2] http://bazaar.launchpad.net/~unity-team/unity-lens-applications/trunk/view/head:/src/unity-ratings-db.c

--> SOFTWARE_CENTER
Upon launching software-center, software-center generates a file for unity-lens-applications to read. For at least a year, if not multiple years, software-center crashes whilst trying to generate this db. The crash occurs in line 336 of [3] with "DBInvalidArgError: (22, 'Invalid argument -- BDB0054 illegal flag combination specified to DB_ENV->open')". Experimentation seems to show that removing the "|bdb.DB_NOMMAP" stops this crash. The NOMMAP flag was introduced in [4], but I don't know enough about the Berkeley DB format to know why the NOMMAP flag should or shouldn't be in use. The internet seems to describe the flag as "Always copy read-only database files in this environment into the local cache instead of potentially mapping them into process memory". I couldn't pull up any other illegal flag combinations using NOMMAP errors besides software-center.

[3] http://bazaar.launchpad.net/~ubuntuone-control-tower/software-center/trunk/view/2869/softwarecenter/backend/reviews/__init__.py
[4] http://bazaar.launchpad.net/~ubuntuone-control-tower/software-center/trunk/revision/2434

After installing a modified version of unity-lens-applications and changing software-center and launching software-center I needed to kill the unity-scope-loader process after which the ratings reappeared in the dash (obviously only for apps which have ratings, which are not the newest ones).

Another issue affecting the applications lens is the missing applications descriptions due to bug #1486061

Sebastien Bacher (seb128) wrote :

Thanks Kiwinote, I just debugged a bit that before seeing your comment, we basically have the same conclusions.

The software-center issue is bug #1313884, I submitted a fix for it, the issue is that the flag is to be use with set_flags(), not open(). One thing I'm unsure about is if fixing that issue is going to be a performance hit, since the commit resolved slowness issues but likely because it disabled the db recording more than because of the flag use that didn't work...

I'm also submitted a change for the db versionning issue there

Changed in unity:
status: Triaged → Invalid
affects: unity (Ubuntu) → unity-lens-applications (Ubuntu)
Changed in unity-lens-applications (Ubuntu):
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-lens-applications - 7.1.0+15.10.20151002-0ubuntu1

---------------
unity-lens-applications (7.1.0+15.10.20151002-0ubuntu1) wily; urgency=medium

  [ Sebastien Bacher ]
  * Use the correct db version when trying to read s-c reviews (LP:
    #1396553)

 -- Marco Trevisan (Treviño) <mail@3v1n0.net> Fri, 02 Oct 2015 00:33:56 +0000

Changed in unity-lens-applications (Ubuntu):
status: In Progress → Fix Released
Changed in unity-lens-applications:
status: New → Fix Committed
importance: Undecided → High
Changed in unity-lens-applications (Ubuntu):
assignee: nobody → Sebastien Bacher (seb128)
Changed in unity-lens-applications:
assignee: nobody → Sebastien Bacher (seb128)
Changed in unity-lens-applications:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers