Closed Bug 908449 Opened 6 years ago Closed 6 years ago

[B2G] [Buri] [1.2] [Contacts] [Gallery] Blank crop page appears when attempting to edit a photo

Categories

(Core :: Canvas: WebGL, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla26
blocking-b2g koi+
Tracking Status
firefox26 --- fixed

People

(Reporter: ckreinbring, Assigned: BenWa)

References

Details

(Keywords: regression, smoketest)

Attachments

(2 files)

Description:
Attempting to add a gallery photo to a contact will fail due to the photo not appearing on the Crop page.

Repro Steps:
1) Update Buri to Build ID: 20130822040202
2) Launch Contacts.
3) Select a contact, or create a new contact if there isn't one.
4) Tap the Edit icon in the upper right corner.
5) Tap the photo pane then select Gallery.
6) Select a photo and observe the Crop pane that appears.

Actual:
The selected photo does not appear on the Crop page, leaving a black screen and a disabled confirmation button.  

Expected:
The photo and crop tool appears on the Crop page, and the confirmation button is enabled.

Environmental Variables
Build ID: 20130822040202
Gecko: http://hg.mozilla.org/mozilla-central/rev/2ab07dec6404
Gaia: abd81ff5e49bf0c9479cdc5c5eb6975cc776f632
Platform Version: 26.0a1

Notes:
Repro frequency: 100%
See attached logcat logs
Component: Gaia::Contacts → Gaia::Gallery
I see this happening in Gallery as well - I am unable to see any of the pictures to edit. In Gallery it just shows a grey screen.
blocking-b2g: --- → koi?
Component: Gaia::Gallery → Gaia::Contacts
Summary: [B2G] [Buri] [1.2] [Contacts] Blank crop page appears when attempting to add a gallery photo to a contact → [B2G] [Buri] [1.2] [Contacts] [Gallery] Blank crop page appears when attempting to edit a photo
Component: Gaia::Contacts → Gaia::Gallery
Editing a photo in gallery does not work as well.
Our automated tests are failing when tapping on "Effects" button:
https://github.com/mozilla/gaia-ui-tests/blob/master/gaiatest/tests/gallery/test_gallery_edit_photo.py#L38
QA Contact: dkumar
Is this device dependent?? I use Inari with the same pvt build. I can't reproduce it.. And I can edit the picture correctly.
Sorry. I am wrong at comment 3. I use b2g18 from nightly. When I change to m-c, I can reproduce this bug. It is caused by WebGL:

E/GeckoConsole(  456): [JavaScript Warning: "Error: WebGL: Can't get a usable WebGL context" {file: "app://gallery.gaiamobile.org/js/ImageEditor.js" line: 1137}]
E/GeckoConsole(  456): [JavaScript Error: "NS_ERROR_FAILURE: Failure" {file: "app://gallery.gaiamobile.org/js/ImageEditor.js" line: 1137}]

In the code of 1136 and 1137, we use the following code to get a WebGL context:

  var gl = this.context = canvas.getContext('webgl') ||
    canvas.getContext('experimental-webgl');
Component: Gaia::Gallery → Canvas: WebGL
Product: Boot2Gecko → Core
Version: unspecified → Trunk
The earliest build this bug repros on is the 8/22 build.  See description for its environmental variables.

It does not repro on the 8/21 build.

Environmental Variables
Build ID: 20130821050136
Gecko: http://hg.mozilla.org/mozilla-central/rev/b2486721572e
Gaia: 70033ba9cbac65551f68fcb3a28f7daf3105e6ff
Platform Version: 26.0a1
Jeff - Any ideas on what caused this in the WebGL area?

I'm seeing a lot of changes recently in regards to WebGL2 features. Could that be the cause?
Flags: needinfo?(jgilbert)
(In reply to Jason Smith [:jsmith] from comment #6)
> Jeff - Any ideas on what caused this in the WebGL area?
> 
> I'm seeing a lot of changes recently in regards to WebGL2 features. Could
> that be the cause?

Yes, we've messed with the context creation criteria code recently, so this is quite possible.
Flags: needinfo?(jgilbert)
If someone has b2g set up for debugging, it should be pretty obvious where it breaks if you step through GLContext::InitByPrefix.
Found the regressing patch - it's bug 903480.
Blocks: 903480
Talked with jgilbert - he thinks bug 904330 is probably the root cause.
Blocks: 904330
No longer blocks: 903480
Alright, I'll try to figure out what's up.
I'll be trying to build b2g.git and moz-central for my Keon. Please let me know if I'm going about this wrong.
that sounds right.  make sure you are setting BRANCH=master ./config.sh keon
I think it is not bug 904330, because has been merged on mozilla-central 2013-08-22 17:55:48 PDT, where this bug has been reported 2013-08-22 14:34:42 PDT.
No longer blocks: 904330
Assignee: nobody → gabadie
Found the problem:

http://dxr.mozilla.org/mozilla-central/source/content/canvas/src/WebGLContext.cpp#l495

That returns status != nsIGfxInfo::FEATURE_NO_INFO, so useOpenGL is set to false. And then, we just don't create any OpenGL context for WebGL. That why it fails.
Looks like this is a regression from bug 900201 which caused webgl to be blackedlist on WebGL. Patch incoming.
Attached patch patchSplinter Review
Assignee: gabadie → bgirard
Status: NEW → ASSIGNED
Attachment #796208 - Flags: review?
Attachment #796208 - Flags: review? → review?(bjacob)
Comment on attachment 796208 [details] [diff] [review]
patch

Review of attachment 796208 [details] [diff] [review]:
-----------------------------------------------------------------

R+, and sorry!
Attachment #796208 - Flags: review?(bjacob) → review+
(In reply to Jason Smith [:jsmith] from comment #9)
> Found the regressing patch - it's bug 903480.

Jason how did you find bug 903480? It seems like 900201 is the real caused. I'm wondering if it's a mistake or if we should be worried about more side effects from bug 903480.
(In reply to Benoit Girard (:BenWa) from comment #18)
> (In reply to Jason Smith [:jsmith] from comment #9)
> > Found the regressing patch - it's bug 903480.
> 
> Jason how did you find bug 903480? It seems like 900201 is the real caused.
> I'm wondering if it's a mistake or if we should be worried about more side
> effects from bug 903480.

It was a mistake. I didn't search outside of graphics layers component, so I didn't look at the patches landed in the graphics component.
Great thanks.
https://hg.mozilla.org/mozilla-central/rev/af537722afd4
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
I believe this fix made it into today's Buri build (2013-08-29-04-02-02), but I am still seeing this issue intermittently on my Buri device. I will investigate further when I can get another build and will test on another device as well.
No longer blocks: GFXB2G1.2
blocking-b2g: koi? → koi+
You need to log in before you can comment on or make changes to this bug.