Closed Bug 987224 Opened 11 years ago Closed 11 years ago

[B2G][Video]Unable to watch videos in video app after deleting two videos

Categories

(Firefox OS Graveyard :: Gaia::Video, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.4+, b2g-v1.4 fixed, b2g-v2.0 fixed)

RESOLVED FIXED
1.4 S4 (28mar)
blocking-b2g 1.4+
Tracking Status
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: rkuhlman, Assigned: rnicoletti)

References

Details

(Keywords: regression)

Attachments

(2 files)

Attached file VidNoLaunch.txt
If the user deletes two videos from the video app using the selection view, there is a chance that they will not be able to watch any videos until the app has been closed and restarted. Repro Steps: *prerequisite: have at least 3 videos stored on the sd card. 1) Updated Buri to BuildID: 20140324000202 2) Launch video app. 3) Enter selection view. (Tap the box outline in the lower right corner) 4) Select two videos and delete them by tapping the trashcan icon. 5) Press the 'X' in the upper left corner to exit selection view. 6) Tap on a video to watch it. Actual: The video flashes to indicate that it has been tapped, but otherwise nothing happens. The list of videos is still displayed and no videos can be launched. Expected: The video launches and plays and all expected UI is present. (play/pause, slider, etc) Environmental Variables: Device: Buri v1.4 Moz RIL BuildID: 20140324000202 Gaia: 730670951e40b2317a167fcd07c398bb662d6e87 Gecko: a44f8b39c2c8 Version: 30.0a2 Firmware Version: v1.2-device.cfg Notes: Repro frequency: 40% See attached: logcat
Can we check what happens on 1.3?
Keywords: qawanted
QA Contact: rkuhlman
Issue does not occur in v1.3 Environmental Variables: Device: Buri v1.3 Moz RIL BuildID: 20140324004001 Gaia: f7742fb4929cc57c9f72955ce5cebb8279745ac0 Gecko: e42b778a010f Version: 28.0 Firmware Version: v1.2-device.cfg
Keywords: qawanted
blocking-b2g: --- → 1.4?
This issue started reproducing on the 12/13/14 1.4 build. - Last Working - Device: Buri Master v1.4 MOZ RIL BuildID: 20131212040203 Gaia: 8952898bbc98dd31e25b647203791cf129867ff1 Gecko: 1ad9af3a2ab8 Version: 29.0a1 Firmware Version: V1.2-device.cfg - First Broken - Device: Buri Master 1.4 MOZ RIL BuildID: 20131213040203 Gaia: 390b313a254a947d12e3cdbcde19d7d1619ff63c Gecko: 8b5875dc7e31 Version: 29.0a1 Firmware Version: V1.2-device.cfg **This looks to be a gaia issue** last working gaia/first broken gecko = NO REPRO Gaia: 8952898bbc98dd31e25b647203791cf129867ff1 Gecko: 8b5875dc7e31 first broken gaia/last working gecko = REPRO Gaia: 390b313a254a947d12e3cdbcde19d7d1619ff63c Gecko: 1ad9af3a2ab8 Push log: https://github.com/mozilla-b2g/gaia/compare/8952898bbc98dd31e25b647203791cf129867ff1...390b313a254a947d12e3cdbcde19d7d1619ff63c
QA Contact: rkuhlman → mvaughan
Regressing cause - bug 903920.
Blocks: 903920
If we can we should try to backout 903920 here to resolve this issue.
blocking-b2g: 1.4? → 1.4+
Johu, Could you please do a quick investigation -- it looks like this is caused by the layout changes on video Thanks Hema
Flags: needinfo?(rnicoletti)
Flags: needinfo?(johu)
It is caused by bug 903920. I can provide a STR with 100% reproduce ratio: Following rkuhlman's STR but only one step need to be changed: 1) Updated Buri to BuildID: 20140324000202 2) Launch video app. 3) Enter selection view. (Tap the box outline in the lower right corner) 4*) Select two *adjacent* videos from *bottom to top* and delete them by tapping the trashcan icon. 5) Press the 'X' in the upper left corner to exit selection view. 6) Tap on a video to watch it. And in the console, you may find the following log: [JavaScript Error: "TypeError: old is undefined" {file: "app://video.gaiamobile.org/gaia_build_defer_index.js" line: 595}] For bug 903920 (tablet), we need to keep the currentVideo variable valid to have the focus when we delete the currentVideo. resetCurrentVideo handles such kind of case. It is called at the deleteFile[1]. But the removal of thumbnail from thumbnail list is async function call which is triggered by instead of the callback of mediadb[2]. The reason we need to select adjacent video from bottom to top is that: resetCurrentVideo find the next video file from UI to be the currentVideo. When we delete two videos at the same thing, the second deletion chooses the first deleted video as the currentVideo because the thumbnail isn't removed from thumbnail list. That's the root cause. I think the patch may be simple like moving [1] to [3]. [1] https://github.com/mozilla-b2g/gaia/blob/624c781427ed48aec9907cffbc9158022bafb1b1/apps/video/js/video.js#L566-L571 [2] https://github.com/mozilla-b2g/gaia/blob/624c781427ed48aec9907cffbc9158022bafb1b1/apps/video/js/video.js#L576 [3] https://github.com/mozilla-b2g/gaia/blob/624c781427ed48aec9907cffbc9158022bafb1b1/apps/video/js/db.js#L130
Flags: needinfo?(johu)
Russ, I don't have any capacity to take this one. Would you mind to take it? I think this is a easy bug. Please find more information at comment 7. If you need help, please need info me.
Thanks, John. I will take it.
Assignee: nobody → rnicoletti
Status: NEW → UNCONFIRMED
Ever confirmed: false
Flags: needinfo?(rnicoletti)
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
John, I implemented your suggestion from comment #7. My testing of the patch confirmed it fixed the problem.
Attachment #8397248 - Flags: review?(johu)
Comment on attachment 8397248 [details] [review] Pull request: https://github.com/mozilla-b2g/gaia/pull/17664 Thanks Russ. It looks good. The travis is red. Please rebase your code and check if there is anything wrong in travis. Thanks.
Attachment #8397248 - Flags: review?(johu) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: