Closed Bug 1157633 Opened 5 years ago Closed 4 years ago

[Gallery]We tap the back button to return to thumbnail view in Gallery, the page will become gray.

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(blocking-b2g:2.5+, b2g-v2.2 affected, b2g-master verified)

VERIFIED FIXED
FxOS-S4 (07Aug)
blocking-b2g 2.5+
Tracking Status
b2g-v2.2 --- affected
b2g-master --- verified

People

(Reporter: yi.zou, Assigned: pdahiya)

Details

Attachments

(4 files)

Attached file logcat002.txt
[1.Description]:
[Nexus5 2.2&3.0][Flame 2.2&3.0]When user zooms in and restores the taking photo, and taps the back button, the page will be gray.
Time:17:00
See attachment:logcat002.txt,VIDEO0534.mp4

[2.Testing Steps]: 
1.Launch camera and take a photo.
2.Open the gallery app to view this photo.
3. Tap the photo repeatedly to zoom in and restore.
4.Tap the back button.
5.Repeat step 3&4.

[3.Expected Result]: 
5.Can return to thumbnail view in Gallery.

[4.Actual Result]: 
5.The photo will be gray,and can't return to thumbnail view in Gallery..

[5.Reproduction build]: 
Flame2.2(Affected):
Build ID               20150422162503
Gaia Revision          41a85c5f9db291d4f7c0e94c8416b5115b4ee407
Gaia Date              2015-04-21 17:23:41
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/367b3e608cd8
Gecko Version          37.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150422.200151
Firmware Date          Wed Apr 22 20:02:02 EDT 2015
Bootloader             L1TC000118D0

Flame 3.0(Affected):
Build ID               20150422160203
Gaia Revision          9d4f756aa35cb7f030a92f3c1f65fb55254ddd1d
Gaia Date              2015-04-22 17:32:36
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/a9311ec2dd39
Gecko Version          40.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150422.193515
Firmware Date          Wed Apr 22 19:35:27 EDT 2015
Bootloader             L1TC000118D0

N5 v2.2 build(Affected):
Build ID               20150422162503
Gaia Revision          41a85c5f9db291d4f7c0e94c8416b5115b4ee407
Gaia Date              2015-04-21 17:23:41
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/367b3e608cd8
Gecko Version          37.0
Device Name            hammerhead
Firmware(Release)      5.1
Firmware(Incremental)  eng.cltbld.20150422.195718
Firmware Date          Wed Apr 22 19:57:35 EDT 2015
Bootloader             HHZ12f
Firmware Date          Sun Mar 29 03:59:59 EDT 2015
Bootloader             HHZ12d

Nexus 5 3.0(Affected):
Build ID               20150422010202
Gaia Revision          15134b080b5f406e5aa36f5136c17dafb4e31f64
Gaia Date              2015-04-21 19:52:45
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/946ac85af8f4
Gecko Version          40.0a1
Device Name            hammerhead
Firmware(Release)      5.1
Firmware(Incremental)  eng.cltbld.20150422.044004
Firmware Date          Wed Apr 22 04:40:22 EDT 2015
Bootloader             HHZ12f

[6.Reproduction Frequency]: 
occasionally Recurrence,7/10

[7.TCID]: 
Free Test
Attached video VIDEO0534.mp4
[Blocking Requested - why for this release]:

This still occurs on today's nightly build. blocking for obvious visual and functional (it does not properly go back to the thumbnails view) defect.
blocking-b2g: --- → 2.5?
Punam, please take a look at this regression. 

Thanks
Hema
Assignee: nobody → pdahiya
blocking-b2g: 2.5? → 2.5+
(In reply to No-Jun Park [:njpark] from comment #2)
> [Blocking Requested - why for this release]:
> 
> This still occurs on today's nightly build. blocking for obvious visual and
> functional (it does not properly go back to the thumbnails view) defect.

Hi No-Jun

I remember seeing this issue before. I tried it in today's build and the issue is not replicable. Here's the build info

Build ID               20150723060330
Gaia Revision          aa1698251e86c820c50c045b0a3ff65fd6b0eee7
Gaia Date              2015-07-23 01:08:06
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/eee2d49d055c
Gecko Version          42.0a1
Device Name            flame
Firmware(Release)      4.4.2

Seth landed gecko fix of Bug 1151359 which made to m-c on 2015-07-20, that could have helped with the fix. I wanted to check with you if nightly build you tested on was after 2015-07-20 and if you can confirm the issue is still happening for you post 1151359 fix. Thanks!
Flags: needinfo?(npark)
And I am able to replicate the issue after trying repeatedly. The issue is random and very hard to replicate (1/10 attempts). Leaving NI flag for No-Jun to help with STR if there's an easy way to replicate.

The issue appears to be blob url not set on image inside media frame in full screen view. On debugging, fullscreen view src is not set resulting in opacity:0

<img src="" style="transform-origin: center center 0px; background-image: none; background-size: contain; background-repeat: no-repeat; background-color: rgb(34, 34, 34); width: 729px; height: 546px; transform: translate(-204.5px, 11.5px) scale(0.438957, 0.438957) rotate(0deg); opacity: 0;" class="image-view">

Will investigate more and update with findings
AFAIK, i don't think there is a reliable STR for this, (was quite sporadic for me too) but my impression was that it was easier to replicate this issue with large image file, rather than small ones.
Flags: needinfo?(npark)
On debugging more, this issue occurs 
a) when user taps repeatedly in fullscreen view 
b) presses back button 
c) and taps again( within fraction of seconds) in fullscreen view (before screen switches back to list view)

This triggers back click event handler that switches view from FullScreenView to ListView and clear frames (which reset the frame state and release any urls )

https://github.com/mozilla-b2g/gaia/blob/master/apps/gallery/js/frames.js#L76

When this is followed by single tap event handler inside which L305 switches view back to fullscreen view.

https://github.com/mozilla-b2g/gaia/blob/master/apps/gallery/js/frames.js#L305

frames load without bloburls and shows blank.

Lines 301 - 307 handles single tap in preview mode in flatfish to display fullscreen view. (See Bug 928254)

To fix this issue we should check for isPhone so that this code doesn't get executed on tiny devices. Will test fix and submit patch for review.
Comment on attachment 8638807 [details] [review]
[gaia] punamdahiya:Bug1157633 > mozilla-b2g:master

Hi David

Please review attached patch that explicitly checks for tablet devices before switching to fullscreen view from preview mode. Thanks!
Attachment #8638807 - Flags: review?(dflanagan)
Hi No-Jun

Since this issue is hard to replicate, I will appreciate if you can help validate that the attached patch fixes the issue for you. Thanks!
Flags: needinfo?(npark)
I tried out the patch, and tests with multiple photos, but can't seem to repro this bug after 50+ attempts on 319MB flame device.
Flags: needinfo?(npark)
Comment on attachment 8638807 [details] [review]
[gaia] punamdahiya:Bug1157633 > mozilla-b2g:master

Nice job tracking down a hard-to-reproduce bug! The fix looks good to me.
Attachment #8638807 - Flags: review?(dflanagan) → review+
Keywords: checkin-needed
Keywords: checkin-needed
Thanks David for review. Patch manually landed on master

https://github.com/mozilla-b2g/gaia/commit/71b5148f9d8a8e4abcbc8e2cdaa5261dcac1af3e
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S4 (07Aug)
Attached video Flame KK v2.5.3gp
This bug has been verified as "pass" on latest build of Flame KK v2.5 & Nexus 5 2.5 and Aries KK 2.5 by the STR in Comment 0.

Results: 
THe user can return to thumbnail view in Gallery normally after tapping the photo repeatedly to zoom in and restore.

See attachment: Flame KK v2.5.3gp

Reproduce rate: 0/5

Device: Flame KK 2.5 (Pass)
Build ID               20150909150223
Gaia Revision          47459eead04385e22f967012b824f5abdddcfb7c
Gaia Date              2015-09-09 10:37:28
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/dd2a1d737a64d9a3f23714ec5cc623ec8933b51f
Gecko Version          43.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150909.185733
Firmware Date          Wed Sep  9 18:57:43 EDT 2015
Firmware Version       v18D v4
Bootloader             L1TC000118D0

Device: Nexus 5 2.5(Pass)
Build ID               20150909150223
Gaia Revision          47459eead04385e22f967012b824f5abdddcfb7c
Gaia Date              2015-09-09 10:37:28
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/dd2a1d737a64d9a3f23714ec5cc623ec8933b51f
Gecko Version          43.0a1
Device Name            hammerhead
Firmware(Release)      5.1
Firmware(Incremental)  eng.cltbld.20150909.183406
Firmware Date          Wed Sep  9 18:34:21 EDT 2015
Bootloader             HHZ12f

Device: Aries KK 2.5 (Pass) 
Build ID               20150909215153
Gaia Revision          47459eead04385e22f967012b824f5abdddcfb7c
Gaia Date              2015-09-09 10:37:28
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/dd2a1d737a64d9a3f23714ec5cc623ec8933b51f
Gecko Version          43.0a1
Device Name            aries
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.worker.20150909.211310
Firmware Date          Wed Sep  9 21:13:17 UTC 2015
Bootloader             s1
Status: RESOLVED → VERIFIED
QA Whiteboard: [MGSEI-Triage+]
You need to log in before you can comment on or make changes to this bug.