Closed Bug 1207804 Opened 9 years ago Closed 9 years ago

[Aries] Pictures taken from the camera are renamed to a 16-digit random number when transferred individually over bluetooth.

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-master affected)

RESOLVED DUPLICATE of bug 1080104
Tracking Status
b2g-master --- affected

People

(Reporter: Marty, Assigned: pdahiya)

References

Details

(Keywords: regression, Whiteboard: [2.5-Daily-Testing][Spark])

Attachments

(2 files)

Description: If the user takes a single picture with the camera, and then transfers that picture via bluetooth, that file is renamed to a 16-digit random number (ex. 4412167420684874.jpg) instead of the normal IMG_0001.jpg name format. This behavior is inconsistent with other file transfer behavior. -If the user transfers an image that was transferred to the device via USB, downloaded from a web page, or a screenshot, this issue does not occur. -If the user selects multiple pictures to transfer at once, they are not renamed. -This does not occur when transferring a video recorded with the camera -This issue does not occur on Flame devices Repro Steps: 1) Update a Aries to 20150923113746 2) Open the Camera app and take a picture 3) Pair the DUT with a computer or phone via bluetooth. 4) Open the gallery and select the picture just taken 5) Tap the 'Share' button and transfer that file to the paired device over bluetooth. Actual: The file is renamed to a random 16-digit number (ex. 4412167420684874.jpg) Expected: The file retains its original name (ex. IMG_0001.jpg) Environmental Variables: Device: Aries 2.5 Build ID: 20150923113746 Gaia: aad942e6960cdd6b2d09900b157b16f4ddb9423c Gecko: abe43c30d78d7546ed7c622c5cf62d265709cdfd Gonk: 2916e2368074b5383c80bf5a0fba3fc83ba310bd Version: 44.0a1 (2.5) Firmware Version: D5803_23.1.A.1.28_NCB.ftf User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0 Repro frequency: 8/8 See attached: (logcat, screenshot)
This issue DOES occur on the Aries RC4 build. The file is renamed to a random 16-digit number (ex. 4412167420684874.jpg) Environmental Variables: Device: Aries 2.5 BuildID: 20150619225606 Gaia: 4c06ed88ddccaba8dc941e5006bd2a9e57306f07 Gecko: 7c1a6b1151a1539186b950a144387e2d7f378d1b Gonk: 2916e2368074b5383c80bf5a0fba3fc83ba310bd Version: 41.0a1 (2.5) Firmware Version: D5803_23.1.A.1.28_NCB.ftf User Agent: Mozilla/5.0 (Mobile; rv:41.0) Gecko/41.0 Firefox/41.0 -------------------------------------------------------------------------------------- This issue does NOT occur on the latest Flame 2.5 build. The file retains its original name (ex. IMG_0001.jpg) during bluetooth transfer. Environmental Variables: Device: Flame 2.5 BuildID: 20150923030227 Gaia: 864500d40633bbf0e9a83c92a03cea46bb901906 Gecko: 19b4265d0d568d232fb3a34705f947b6db7496dc Gonk: c4779d6da0f85894b1f78f0351b43f2949e8decd Version: 44.0a1 (2.5) Firmware Version: v18D User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Teri, can you take a look at this please and weigh in on the severity of this issue?
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker) → needinfo?(twen)
I can reproduce this issue. This is a regression; same name is used when sending files over bluetooth in v2.2, nominate for blocking. Build ID 20150923113438 Gaia Revision aad942e6960cdd6b2d09900b157b16f4ddb9423c Gaia Date 2015-09-23 03:24:27 Gecko Revision https://hg.mozilla.org/mozilla-central/rev/abe43c30d78d7546ed7c622c5cf62d265709cdfd Gecko Version 44.0a1 Device Name aries Firmware(Release) 4.4.2 Firmware(Incremental) eng.worker.20150923.105525 Firmware Date Wed Sep 23 10:55:33 UTC 2015 Bootloader s1
blocking-b2g: --- → 2.5?
Flags: needinfo?(twen)
Keywords: regression
I don't think the bug is regression as it doesn't occur on Flame 2.5 per comment 0. It seems more like a phone dependent bug. I'll take a look first.
Assignee: nobody → btian
Gecko bluetooth |SendFile| method is called with incorrect blob name: When the bug happens, gaia bluetooth app receives blob name as /sdcard/.gallery/tmp/4220314973473339.jpeg while in normal case blob name is /sdcard/DCIM/100MZLLA/IMG_0001.jpg Note I print blob name in https://github.com/bentian/gaia/blob/master/apps/bluetooth/js/modules/transfer_manager.js#L245 -- Set component to Gaia::Gallery and ni? gallery module peer. Also de-assign myself. Punam, can you help check why different blob name is passed to share?
Assignee: btian → nobody
Component: Bluetooth → Gaia::Gallery
Flags: needinfo?(punamdahiya)
Some additional findings: 1. Not reproduce-able if sending file via preview image 2. Appears to be timing and sequencing issue between camera/gallery - Sending old photos in gallery will not recreate the issue - Take picture using camera + sending picture in gallery almost always recreate the issue - Take picture using camera + sending OLD picture in gallery will recreate the issue
This issue is not replicable for Flame-kk. The reason its happening for Aries device is, picture taken using Aries relies heavily on EXIF orientation and when the file is shared, its rotated and converted to memory backed blob. See https://bugzilla.mozilla.org/show_bug.cgi?id=1178290#c1 explaining loss of filename and EXIF data for Aries. "The loss of the file name and EXIF data is also caused by the fact that we have to rotate the image in Gallery before passing it back to the requesting application." Random number filename is generated '/sdcard/.gallery/tmp/4220314973473339.jpeg' as a workaround of avoiding passing memory backed blob vis share and pick activities, this is no longer needed and a patch is in review Bug 1080104 which will remove the file backed blob stored in temp directory. Setting NI flag for David who is helping with the review. I will be getting Aries device back on Monday, assigning myself to debug this issue and post detailed findings and submit the fix. Thanks!
Flags: needinfo?(punamdahiya) → needinfo?(dflanagan)
Not sure why but the bug doesn't allow me to assign myself, it could be a permission issue. Leaving NI flag for myself so that it shows in my dashboard.
Flags: needinfo?(punamdahiya)
Thanks, Punam. Sorry I haven't review yet. I'm glad you're back.
Assignee: nobody → punamdahiya
Flags: needinfo?(punamdahiya)
Debugged the issue on Aries, this is related to share activity flow for images that relies on EXIF orientation. This issue can be replicated while sharing images with messaging app using share activity. When sharing multiple images, we don't handle EXIF orientation in photos and un-rotated blob with original file names are shared. We are handling passing filename for blobs that are not file objects https://github.com/mozilla-b2g/gaia/blob/master/apps/gallery/js/gallery.js#L681 Will use patch from bug 1080104 on Aries and update if removing the hack fixes this issue.
Tested and patch attached to Bug 1080104 fixes this issue. Marking bug dependent on Bug 1080104.
Depends on: 1080104
I landed bug 1080104, so maybe this bug can be closed now?
Flags: needinfo?(dflanagan) → needinfo?(pdahiya)
Thanks David! Marking issue resolved duplicate of Bug 1080104. Setting NI flag for twen to help verify the fix on Aries.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(pdahiya) → needinfo?(twen)
Resolution: --- → DUPLICATE
blocking-b2g: 2.5? → ---
Found no issue on the latest master. Build ID 20150930220411 Gaia Revision be2da974ba076e06e2ff96cd3ac911769d3067a3 Gaia Date 2015-09-30 17:26:49 Gecko Revision https://hg.mozilla.org/mozilla-central/rev/9169f652fe5e69c2d77ac31929934a5bc3342e6e Gecko Version 44.0a1 Device Name aries Firmware(Release) 4.4.2 Firmware(Incremental) eng.worker.20150930.212341 Firmware Date Wed Sep 30 21:23:49 UTC 2015 Bootloader s1
Flags: needinfo?(twen)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: