gallery displaying blanks for videos

Bug #1296634 reported by Alan Pope 🍺🐧🐱 🦄
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gallery-app (Ubuntu)
Fix Released
Critical
Arthur Mello

Bug Description

Opened my gallery app on a device containing no photos and I see a bunch of seemingly random dates in the Event view.
I also see blank photos in the photos view.
I looked at what I believe to be the gallery database and found what you see below
Those are videos that exist on my device for testing.
Possibly the blanks in gallery relate to the videos which are (for some reason) now listed in my gallery database.

Screenshots attached.

To examine your gallery database:-

adb shell
sudo -u phablet -i
sqlite3 ~/.local/share/com.ubuntu.gallery/gallery-app/database/gallery.sqlite
.dump MediaTable

I see:-

sqlite> .dump MediaTable
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE MediaTable (
  id INTEGER PRIMARY KEY,
  filename TEXT NOT NULL
, width INT, height INT, timestamp INT DEFAULT NULL, exposure_time INT DEFAULT NULL, original_orientation INT DEFAULT NULL, filesize INT DEFAULT NULL);
INSERT INTO "MediaTable" VALUES(1,'/home/phablet/Videos/Songify This - CAN''T HUG EVERY CAT (now on iTunes) -- a song about loving cats-sP4NMoJcFd4.mp4',NULL,NULL,1395353693000,1365995476000,1,10020327);
INSERT INTO "MediaTable" VALUES(2,'/home/phablet/Videos/Robs_drive.mp4',NULL,NULL,1395353692000,1357480306000,1,21475782);
INSERT INTO "MediaTable" VALUES(3,'/home/phablet/Videos/No Man''s Sky-RRpDn5qPp3s.mp4',NULL,NULL,1395353689000,1386168456000,1,39446926);
INSERT INTO "MediaTable" VALUES(4,'/home/phablet/Videos/National Aerobic Championship USA 1989 01.flv-IG4475cv6RQ.mp4',NULL,NULL,1395353684000,1277719966000,1,48214885);
INSERT INTO "MediaTable" VALUES(5,'/home/phablet/Videos/Madeon - Pop Culture (live mashup).mp4',NULL,NULL,1395353678000,1365661642000,1,36529804);
INSERT INTO "MediaTable" VALUES(6,'/home/phablet/Videos/Moog Cookbook - Buddy Holy-SHPkgIPDfcE.mp4',NULL,NULL,1395353678000,1240496399000,1,4906466);
INSERT INTO "MediaTable" VALUES(7,'/home/phablet/Videos/Madeon - Pop Culture (Dance Video).mp4',NULL,NULL,1395353673000,1372852931000,1,82808679);
INSERT INTO "MediaTable" VALUES(8,'/home/phablet/Videos/eHarmony Video Bio-mTTwcCVajAc.mp4',NULL,NULL,1395353663000,1307076871000,1,10994757);
INSERT INTO "MediaTable" VALUES(9,'/home/phablet/Videos/Blaenavon - Into The Night .mp4',NULL,NULL,1395353662000,1362661906000,1,108637811);
INSERT INTO "MediaTable" VALUES(10,'/home/phablet/Videos/Battle at Kruger-LU8DDYz68kM.mp4',NULL,NULL,1395353651000,1370579088000,1,23162323);
INSERT INTO "MediaTable" VALUES(11,'/home/phablet/Videos/Arctic Monkeys - Do I Wanna Know (Official Video)-bpOSxM0rNPM.mp4',NULL,NULL,1395353648000,1386038525000,1,42123927);
INSERT INTO "MediaTable" VALUES(12,'/home/phablet/Videos/1988 Crystal Light National Aerobic Championship Opening-ozoTzkCeO-A.mp4',NULL,NULL,1395353641000,1377152396000,1,38684049);
CREATE INDEX MediaTableFilenameIndex ON MediaTable(filename);
COMMIT;

Which matches:-

phablet@ubuntu-phablet:~$ ls -l ~/Videos
total 456084
-rw-rw-r-- 1 phablet phablet 38684049 Mar 20 22:14 1988 Crystal Light National Aerobic Championship Opening-ozoTzkCeO-A.mp4
-rw-rw-r-- 1 phablet phablet 42123927 Mar 20 22:14 Arctic Monkeys - Do I Wanna Know (Official Video)-bpOSxM0rNPM.mp4
-rw-rw-r-- 1 phablet phablet 23162323 Mar 20 22:14 Battle at Kruger-LU8DDYz68kM.mp4
-rw-rw-r-- 1 phablet phablet 108637811 Mar 20 22:14 Blaenavon - Into The Night .mp4
-rw-rw-r-- 1 phablet phablet 82808679 Mar 20 22:14 Madeon - Pop Culture (Dance Video).mp4
-rw-rw-r-- 1 phablet phablet 36529804 Mar 20 22:14 Madeon - Pop Culture (live mashup).mp4
-rw-rw-r-- 1 phablet phablet 4906466 Mar 20 22:14 Moog Cookbook - Buddy Holy-SHPkgIPDfcE.mp4
-rw-rw-r-- 1 phablet phablet 48214885 Mar 20 22:14 National Aerobic Championship USA 1989 01.flv-IG4475cv6RQ.mp4
-rw-rw-r-- 1 phablet phablet 39446926 Mar 20 22:14 No Man's Sky-RRpDn5qPp3s.mp4
-rw-rw-r-- 1 phablet phablet 21475782 Mar 20 22:14 Robs_drive.mp4
-rw-rw-r-- 1 phablet phablet 10020327 Mar 20 22:14 Songify This - CAN'T HUG EVERY CAT (now on iTunes) -- a song about loving cats-sP4NMoJcFd4.mp4
-rw-rw-r-- 1 phablet phablet 10994757 Mar 20 22:14 eHarmony Video Bio-mTTwcCVajAc.mp4

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: gallery-app (not installed)
Uname: Linux 3.4.0-5-mako armv7l
ApportVersion: 2.13.3-0ubuntu1
Architecture: armhf
Date: Mon Mar 24 10:09:23 2014
InstallationDate: Installed on 2014-03-24 (0 days ago)
InstallationMedia: Ubuntu Trusty Tahr (development branch) - armhf (20140324)
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 SHELL=/bin/bash
SourcePackage: gallery-app
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :
Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gallery-app (Ubuntu):
status: New → Confirmed
Changed in gallery-app (Ubuntu):
importance: Undecided → High
Revision history for this message
Dave Morley (davmor2) wrote :

Steps I took to reproduce:

1. Installed 237 last promoted before 250.
2. Using mtp I copied across 6 videos (/home/phablet/Videos)and a jpg (/home/phablet/Pictures)
3. I then updated
4. Open gallery and I see 7 dates 1 image and 6 blank dates.

This doesn't happen if there is no data in the directories.

Changed in gallery-app (Ubuntu):
importance: High → Critical
Dave Morley (davmor2)
Changed in gallery-app (Ubuntu):
assignee: nobody → Bill Filler (bfiller)
Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

ok, on my #250 phone with gallery 2.9.1.927 I see nothing in events or photos with the same videos on the device

Bill Filler (bfiller)
Changed in gallery-app (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Bill Filler (bfiller) wrote :

There are multiple apparmor issues causing this problem. One bug is here https://bugs.launchpad.net/bugs/1296987

Revision history for this message
Bill Filler (bfiller) wrote :

The issue here is that gallery now attempts to display all videos that are found in ~/Pictures and ~/Videos, as that is required for the desktop. In the past, it only attempted to display videos that were recorded by the camera.

The bug here is two parts:
1) gallery uses libthumbnailer to display thumbnails for videos. This is broken on the device (works on desktop) because of app confinement. There are a few app armour policies that need to get fixed to support this.
2) On the device, we should only be displaying videos that have been recorded by the camera (once that functionality is restored) and not other videos, as those are handled by the scopes.

summary: - gallery shows blank dates and photos
+ gallery displaying blanks for videos
Revision history for this message
Bill Filler (bfiller) wrote :

There are two bugs filed to track the apparmour changes that need to happen:

https://launchpad.net/bugs/1288742
https://bugs.launchpad.net/bugs/1296987

And the third, to fix the missing video icon not being displayed, is queued in apparmor-easyprof-ubuntu already

Changed in gallery-app (Ubuntu):
assignee: Bill Filler (bfiller) → Arthur Mello (artmello)
Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

This is what I see in image 261 (landscape mode). Not exactly blank, but no thumbnail either. Also, no date.

tags: added: flo mako r261
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gallery-app - 0.0.67+14.04.20140325-0ubuntu1

---------------
gallery-app (0.0.67+14.04.20140325-0ubuntu1) trusty; urgency=low

  [ CI bot ]
  * Resync trunk

  [ Arthur Mello ]
  * Make gallery-app only search for videos on the path where camera-app
    will save recording files on devices. (LP: #1296634)
 -- Ubuntu daily release <email address hidden> Tue, 25 Mar 2014 22:49:08 +0000

Changed in gallery-app (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

Fixed in image 263, I think. At least, the videos no longer show up blank. They no longer show up at all, actually.

... oh, wait. If I have videos in the Pictures/ dir, they still show up. And the date is still blank. And it displays a generic "play" icon instead of the video thumbnail. Is that supposed to be fixed too?

Revision history for this message
Bill Filler (bfiller) wrote :

Reopening this bug. Videos found in the ~/Pictures directory should not be displayed at all and this case wasn't accounted for in the fix.

When the correct fix lands, no videos at all should show up in the Gallery, unless they are recorded by the Camera app. As this functionality doesn't exist currently on the camera app, you should never see any videos in the gallery when running on the device.

Changed in gallery-app (Ubuntu):
status: Fix Released → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gallery-app - 0.0.67+14.04.20140328-0ubuntu1

---------------
gallery-app (0.0.67+14.04.20140328-0ubuntu1) trusty; urgency=low

  [ Bill Filler ]
  * change check for desktopMode to use platform name rather than env
    var

  [ Arthur Mello ]
  * Make sure that gallery will not be able to remove media files from
    disk if it finds any sort of inconsistency (LP: #1295344)
  * Make sure that videos placed out the video directory will be not
    displayed on devices (LP: #1296634)
 -- Ubuntu daily release <email address hidden> Fri, 28 Mar 2014 15:34:43 +0000

Changed in gallery-app (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

Re-tested on image 276, and it seems to be fixed.

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.