Closed Bug 1102827 Opened 10 years ago Closed 6 years ago

[Video]Video Selection list close button is not working after SDcard is removed

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: vsireesha246, Unassigned)

Details

Attachments

(1 file)

STR:

1Open Video app with 1 or more videos in Internal memory and also SDCard
2.Click on Select button in thumbnaillist and select view is shown
3.Select 1 or 2 SDcard videos
4.Remove the SDcard from device
5.After Sdcard remove also Sdcard video are selected and Close button stops working

Expected: Sdcard video should not be shown and close button should work properly
In V2.0 version this issue is happening and i can't able to check this in master or v2.1.

Due to below error this issue is happening

[JavaScript Error: "TypeError: thumbnailList.thumbnailMap[name] is undefined"

Fix for this issue might be the null check.

function clearSelection() {
  // Clear the selection, if there is one
  Array.forEach(selectedFileNames, function(name) {
    var selected = thumbnailList.thumbnailMap[name];
    if (selected) {
      selected.htmlNode.classList.remove('selected');
    }
  });
Hi Russn,

Would you please review the attached patc.

Thanks..
Sireesha
Attachment #8526696 - Flags: review?(rnicoletti)
Comment on attachment 8526696 [details] [diff] [review]
Bug_1102827.patch

Hi Sireesha,

It may be a timing issue but I'm not seeing the "TypeError: thumbnailList.thumbnailMap[name] is undefined" issue. What I'm consistently seeing is "MediaDB.deleteFile(): Failed to delete" "/sdcard1/Download/Bluetooth/VID_0003.3gp" "from DeviceStorage:" DOMError { name: "Unknown", message: "" } -- mediadb.js line 988

As you'll see when you look at that code, we're simply logging the error but not throwing an exception. I don't know why we're not throwing an exception in that case. In any event, I'm not sure why you're not seeing the "failed to delete" error since the file is being deleted before the thumbnail selection is being cleared. In your testing, is the file being deleted?

I'm going to give r- as the "failed to delete file" scenario should also be addressed. You can experiment with throwing an exception in that scenario, hopefully you're able to recreate the error.
Attachment #8526696 - Flags: review?(rnicoletti) → review-
In V2.0 Version i always get this error for the mentioned STR and always reproducible.
I am not sure about Master.In the mentioned STR,the name will be undefined because the file is removed and we are trying to deactive the selection css to non existing file name.
Firefox OS is not being worked on
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: