[Gallery] Gallery app closes when waking device up while loading images

RESOLVED WONTFIX

Status

Firefox OS
Gaia::Gallery
RESOLVED WONTFIX
4 years ago
11 months ago

People

(Reporter: Jordan de Geus(JordanD), Assigned: djf)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(b2g-v1.4 affected, b2g-v2.0 affected, b2g-v2.1 affected, b2g-v2.2 affected, b2g-master affected)

Details

(Whiteboard: [2.1-flame-test-run-1], URL)

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
Created attachment 8477726 [details]
logcat_20140822_1553.txt

Description:
When users are viewing the Gallery app, if the device falls asleep or the user locks the device while the gallery is still loading images; upon waking up the device user will see the gallery app is no longer running

Repro Steps:
1) Update a Flame to 20140822040202
2) Push 1000+ images to device
3) Select gallery app
4) While gallery is loading images press sleep button
5) Wake device up and observe gallery app is closed

Actual:
Gallery app closes upon waking up device

Expected:
Gallery app remains open upon waking device up and continues loading images

Environmental Variables:
Device: Flame Master (319mb)
Build ID: 20140822040202
Gaia: afcdd36f13e75adcdebe57d842a277fd587faf28
Gecko: 0b9dd32d1e16
Version: 34.0a1 (Master)
Firmware Version: v123
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0

Repro frequency: 3/3
Link to failed test case: This was found while running test cases within the Gallery Suite
See attached: Video and logcat
http://youtu.be/FGqSQCbrvS8
(Reporter)

Comment 1

4 years ago
This issue DOES occur on Flame 2.0 (319mb), Flame 1.4 (319mb), Open C 1.4

Actual: Waking device up while gallery app is loading images causes gallery app to not remain open.

Flame 2.0 (319mb)

Environmental Variables:
Device: Flame 2.0 
Build ID: 20140822000206
Gaia: 64b0c0ae60fdeac953a7e2a3c368d124bf848477
Gecko: 5075528d7241
Version: 32.0 (2.0)
Firmware Version: v123
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0

Flame 1.4 (319mb)

Environmental Variables:
Device: Flame 1.4 
BuildID: 20140822063011
Gaia: f63cdae1a06c808443ed14de3cd13b61311426e0
Gecko: 7a467e895de5
Version: 30.0 (1.4)
Firmware Version: v123
User Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0

Open C 1.4

Environmental Variables:
Device: Open_C 1.4
BuildID: 20140822063011
Gaia: f63cdae1a06c808443ed14de3cd13b61311426e0
Gecko: 7a467e895de5
Version: 30.0 (1.4)
Firmware: P821A10v1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0

----------------------------------------------------------------------

This issue DOES NOT occur on Flame 2.1 (512mb), Open C 2.1, Open C 2.0

Actual: Users will see the gallery app remains open upon waking device up

Flame 2.1 (512mb)

Environmental Variables:
Device: Flame Master 
Build ID: 20140822040202
Gaia: afcdd36f13e75adcdebe57d842a277fd587faf28
Gecko: 0b9dd32d1e16
Version: 34.0a1 (Master)
Firmware Version: v123
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0

Open C 2.1

Environmental Variables:
Device: Open_C Master
Build ID: 20140822040202
Gaia: afcdd36f13e75adcdebe57d842a277fd587faf28
Gecko: 0b9dd32d1e16
Version: 34.0a1 (Master)
Firmware Version: P821A10V1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0

Open C 2.0

Environmental Variables:
Device: Open_C 2.0
Build ID: 20140822000206
Gaia: 64b0c0ae60fdeac953a7e2a3c368d124bf848477
Gecko: 5075528d7241
Version: 32.0 (2.0)
Firmware Version: P821A10V1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
(Reporter)

Comment 2

4 years ago
This issue also occurs when users have smaller images(less than 500kb), but a large collection of them (1000 images).
This is by design stated by bug 1039943 but after further discussion with the reporter, we determined that this is a poor user's experience.

The device will fall asleep on its own because of the time it takes to import this many contacts. The user will have to keep scrolling the screen or set their device to never sleep to import a large number of contacts or the gallery app will close own its own.
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)

Updated

4 years ago
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][lead-review+]
adding qawanted to see whether this still occurs. if so, we should mark it as a priority bug.
Keywords: qawanted
This bug still occurs on Flame 3.0 and 2.2.

Tap power button while Gallery is loading with 1000+ images, and tap to wake phone again will see Homescreen instead of Gallery app. Repro rate is 3/3 on each branch.

Device: Flame 3.0
BuildID: 20150430010201
Gaia: db8ea705c0fd1b1684807f5a8e837bb9a36a6f96
Gecko: 4b9b12c248dc
Gonk: b83fc73de7b64594cd74b33e498bf08332b5d87b
Version: 40.0a1 (3.0) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:40.0) Gecko/40.0 Firefox/40.0

Device: Flame 2.2
BuildID: 20150430002504
Gaia: aa1da5036f9425c25d515d14243d3473bfefb4fd
Gecko: 38b2838d43e1
Gonk: ebad7da532429a6f5efadc00bf6ad8a41288a429
Version: 37.0 (2.2) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
QA Whiteboard: [QAnalyst-Triage+][lead-review+] → [QAnalyst-Triage?][lead-review+]
status-b2g-v2.2: --- → affected
status-b2g-master: --- → affected
Flags: needinfo?(ktucker)
Keywords: qawanted
QA Whiteboard: [QAnalyst-Triage?][lead-review+] → [QAnalyst-Triage+][lead-review+]
Flags: needinfo?(ktucker)
[Blocking Requested - why for this release]:
Noming it to start the discussion of handling the large number of files in gallery.  ni?ing djf for input as well.
blocking-b2g: --- → 2.5?
Flags: needinfo?(dflanagan)

Comment 7

3 years ago
Based on triage on 7/22, not blocking assuming Gallery can be restarted and will resume loading for the 1000+ image case
blocking-b2g: 2.5? → ---
(Assignee)

Comment 8

3 years ago
On low-memory devices, the gallery intentionally exits rather than continue to scan if it goes to the background. This was done to fix a release blocker bug for 2.0 or 2.1, I think.  Having the gallery scanning in the background was making other apps run too slowly.  This bug should not reproduce with a 512mb flame, only for devices with less than 512mb.

Ideally we would be able to distinguish the case where the phone just sleeps from the case where the user actually starts a new app. But for now we've got the case where if you've got lots of photos to scan, the scan does not complete because the phone sleeps before the scan finishes.

Long term, the right thing to do might be to complete the scan but don't create the thumbnails while in the background. That is part of what I'd like to do with bug 1046995.

Short term, we could just revert back to the old behavior and let the gallery scan in the background.  (Or we could change the memory level so that this only happens on 256mb devices and does not occur on 319mb Flames).

The relevant code is the doNotScanInBackgroundHack() function in apps/gallery/js/gallery.js and the code that calls it in startup.js.  It should be trivial to remove or to change.
Flags: needinfo?(dflanagan)
(Assignee)

Comment 9

3 years ago
Created attachment 8639530 [details] [review]
one line patch to fix this for 319mb flames

In the current code the gallery exits if it is scanning and goes to the background for any device with < 512mb of memory. This is a one-line patch that changes it to any device with < 257mb.

If someone tries to run this code on a real 256mb device, the app will exit. But 319mb flame devices will be immune.

This is just a band aid, but it might let us resolve this for now.
Attachment #8639530 - Flags: review?(pdahiya)
Assignee: nobody → dflanagan
Comment on attachment 8639530 [details] [review]
one line patch to fix this for 319mb flames

Hi David

I tested this patch on 319 MB and gallery app is exiting. On debugging, even after setting memory to 319, the actual physical memory available to the OS is 256 because of which check fails and the gallery app exits.

For 319 MB flame, physical memory available is 256 could be a bug as this is not happening for 512 and 1024 where the physical memory available is same as memory set using fastboot oem mem command. 

For this patch, changing enoughMB to 256 , fixes gallery app not existing on flame-kk 319. Thanks
Attachment #8639530 - Flags: review?(pdahiya) → review-
(Assignee)

Updated

11 months ago
Status: NEW → RESOLVED
Last Resolved: 11 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.