[Gallery] Auto-Enhance feature is not always selectable / enabled.

RESOLVED DUPLICATE of bug 1119157

Status

defect
RESOLVED DUPLICATE of bug 1119157
4 years ago
4 years ago

People

(Reporter: jmitchell, Unassigned)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

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

Details

(Whiteboard: [3.0-Daily-Testing], URL)

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Description:
In gallery, if you select a picture you are given 5 icons across the bottom of the picture. The 2nd option is to edit the picture. Selecting this option brings up 4 icons (Brightness, Crop, Filters, Auto-enhance). 
The auto-enhance feature is not always working. Occasionally when loading the edit page / options the auto-enhance wand icon will remain dark. This is low repro and will not be consistent if you exit edit mode and re-enter it on the same picture and may even 'fix itself' when using the other edit features and returning to the main edit page. 

Repro Steps:
1) Update a Flame to 20150128010234
2) Load Gallery
3) Select a picture and select 'edit'

Actual:
auto-enhance feature is not always enabled.

Expected:
auto enhance feature will always be enabled. 

Environmental Variables:
Device: Flame 3.0
Build ID: 20150128010234
Gaia: 1d53fb07984298253aad64bfa4236b7167ee3d4d
Gecko: b2b10231606b
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 38.0a1 (3.0)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:38.0) Gecko/38.0 Firefox/38.0


Repro frequency: 6/100
See attached: logcat, Video: http://youtu.be/_iLkZWyFV4s

---------------------------------------------------------------------------------
This issue DID repro in 2.2 (repro rate 7 / 120), 2.2 v18d (repro rate 3 / 18)

Device: Flame 2.2 (KK - Nightly - Full Flash)
Build ID: 20150128002506
Gaia: cd42b034fd2825c3675ace3a67f5775eb61c2d60
Gecko: d824c65a6a2b
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 37.0a2 (2.2)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0

Device: Flame 2.2 (KK - Nightly - Full-Flashed)
Build ID: 20150128002506
Gaia: cd42b034fd2825c3675ace3a67f5775eb61c2d60
Gecko: d824c65a6a2b
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 37.0a2 (2.2)
Firmware Version: v18d
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
-----------------------------------------------------------------------------------

2.1 has different functionality - the edit screen automatically begins with brightness selected and there is always 1 option toggled. Does NOT repro here. (0/150)

Device: Flame 2.1 (KK - Nightly - Full-Flashed)
Device: Flame 2.1
Build ID: 20150128001258
Gaia: d98bbe9d2bfdb53e80dc1ab1572bd05938a85526
Gecko: c694578ff69e
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 34.0 (2.1)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0
(Reporter)

Updated

4 years ago
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(pbylenga)
Nominating, a functional issue with a new feature.
blocking-b2g: --- → 2.2?
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(pbylenga)

Comment 2

4 years ago
Punam,

Could you please investigate?

Thanks
Hema
Flags: needinfo?(pdahiya)
Assignee: nobody → pdahiya
Flags: needinfo?(pdahiya)
Taking it to investigate.
Here are findings so far:

AutoEnhance button is disabled every time we reset preview
https://github.com/mozilla-b2g/gaia/blob/master/apps/gallery/js/ImageEditor.js#L851

and it's enabled when we receive message from worker call inside prepareAutoEnhancement method
https://github.com/mozilla-b2g/gaia/blob/master/apps/gallery/js/ImageEditor.js#L1663

For some reason, the worker call fails intermittently resulting in autoenhance button disabled. 

Error Seen in logs:

02-03 10:54:13.211 I/Gecko   ( 1193): SharedSurface_Gralloc::Create -------
02-03 10:54:13.211 I/Gecko   ( 1193): SharedSurface_Gralloc::Create: success -- surface 0xb123e700, GraphicBuffer 0xb13abd80.
02-03 10:54:13.271 I/Gecko   ( 1193): [SharedSurface_Gralloc 0xb123e6a0] destroyed
02-03 10:54:13.271 I/Gecko   ( 1193): SharedSurface_Gralloc::Create -------
02-03 10:54:13.271 I/Gecko   ( 1193): SharedSurface_Gralloc::Create: success -- surface 0xb123e670, GraphicBuffer 0xb1221b00.
02-03 10:54:13.641 E/HWComposer(  207): Non-uniform vsync interval: 154081615
02-03 10:54:13.651 E/HWComposer(  207): Non-uniform vsync interval: 12720833
02-03 10:54:13.651 W/Gallery ( 1193): [JavaScript Error: "InternalError: too much recursion"]
02-03 10:54:13.781 I/Gecko   ( 1193): SharedSurface_Gralloc::Create -------
02-03 10:54:13.781 I/Gecko   ( 1193): SharedSurface_Gralloc::Create: success -- surface 0xb07451f0, GraphicBuffer 0xb1220580.
Debugged further and too much recursion error shows up when L1666 call is posted even before code in js/auto_enhancement_worker.js is executed.

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

I debugged and message 'pixel' shows up correct as  [object Uint8ClampedArray]. It appears to be underlying gecko error in how workers are handled program logic, causing infinite recursive function calls.

Hema, David - Can you please suggest the team who can help here best? Thanks!
Flags: needinfo?(hkoka)
Flags: needinfo?(dflanagan)
Assignee: pdahiya → nobody

Comment 6

4 years ago
Milan/Andrew - who would be best person to investigate here?

Thanks for your help!
Hema
Flags: needinfo?(overholt)
Flags: needinfo?(milan)
Flags: needinfo?(hkoka)
Not likely graphics, so Andrew probably has a better candidate.
Flags: needinfo?(milan)
baku, see comment 5; any thoughts?
Flags: needinfo?(overholt) → needinfo?(amarchesini)

Comment 9

4 years ago
Blocking Reason: broken auto-enhance feature
blocking-b2g: 2.2? → 2.2+
> I debugged and message 'pixel' shows up correct as  [object
> Uint8ClampedArray]. It appears to be underlying gecko error in how workers
> are handled program logic, causing infinite recursive function calls.

I don't think it's a worker issue because how postmessage works internally doesn't involve JS execution.
Can you help me to reproduce this issue? b2g desktop, is it enough?
Flags: needinfo?(amarchesini) → needinfo?(pdahiya)
(In reply to Andrea Marchesini (:baku) from comment #10)
> > I debugged and message 'pixel' shows up correct as  [object
> > Uint8ClampedArray]. It appears to be underlying gecko error in how workers
> > are handled program logic, causing infinite recursive function calls.
> 
> I don't think it's a worker issue because how postmessage works internally
> doesn't involve JS execution.
> Can you help me to reproduce this issue? b2g desktop, is it enough?

Hi Andrea
I am able to replicate this bug using below steps by flashing latest m-c gaia on flame-kk device. I tried with b2gdesktop latest build and for some reason, gallery app is not loading images from pictures folder on my mac.

STR:
1) Update Flame-kk with latest m-c build
2) Open Gallery
3) Select a picture and select 'edit'
4) Auto Enhance icon (last icon in the footer) shows up disabled. 

Since this bug is intermittent, you might have to come out of edit screen by clicking x on top left and select edit again. Auto enhance icon shows up disabled in 2-3 attempts.

Error in logs:
W/Gallery ( 1193): [JavaScript Error: "InternalError: too much recursion"]
Flags: needinfo?(pdahiya)
Flags: needinfo?(amarchesini)
Hi Andrea

Could the cause of issue reported here similar to bug 1119157. wdyt?
Based on the recent thread on dev-gaia, let's just assume that this will go away when 1119157 is resolved.

If it doesn't, I've got a pending patch in 1111945 that completely rewrites the auto-enhance worker anyway, so if this continues to be a bug, maybe that patch will fix it.
Depends on: 1119157
Flags: needinfo?(dflanagan)
> Could the cause of issue reported here similar to bug 1119157. wdyt?

It seems similar. yes.
Flags: needinfo?(amarchesini)

Comment 15

4 years ago
(In reply to David Flanagan [:djf] from comment #13)
> Based on the recent thread on dev-gaia, let's just assume that this will go
> away when 1119157 is resolved.
> 
> If it doesn't, I've got a pending patch in 1111945 that completely rewrites
> the auto-enhance worker anyway, so if this continues to be a bug, maybe that
> patch will fix it.

require QA verification.
Keywords: qawanted
On the latest Central nightly build where I've made sure the Gecko fix from bug 1119157 is included, I can no longer reproduce this issue. Repro frequency is 0 out of 100 attempts.

Device: Flame 3.0 Master (full flash, 319MB mem, KK)
BuildID: 20150319010201
Gaia: c39e15f631de80c69467fda0d4ea0bcda9e194ca
Gecko: cf1060d8ce9f
Gonk: b83fc73de7b64594cd74b33e498bf08332b5d87b
Version: 39.0a1 (3.0 Master)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:39.0) Gecko/39.0 Firefox/39.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Keywords: qawanted
Group: core-security
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Marking bug resolved duplicate of bug 1119157. See #comment 16
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1119157
You need to log in before you can comment on or make changes to this bug.