Closed Bug 901410 Opened 11 years ago Closed 11 years ago

[Gallery][Open] After opened picture successfully, gallery will pop invalid message over the picture frame.

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: iliu, Assigned: pdahiya)

References

Details

(Keywords: regression)

Attachments

(6 files)

STR:
1. Received a picture via bluetooth file transfer.
2. Tap the notification to open the received picture.
3. Gallery will open the received picture via open page.

Expected:
Gallery should open the received picture normally.

Actual:
After opened the received picture successfully, gallery will pop out invalid message over the picture frame.

Note:
The issue could be reproduced when there is a attached image in SMS message. We're able to reproduce it soon in SMS app.(Sending an attached image message.)
Blocks: 898092
Blocks: 900159
Assignee: nobody → pdahiya
Environment:
m-c Gecko - 4e6f3c8e19afe15f18eeee06866b9e97be40151c
Gaia master - 4cc6143c0302cafdc67812ece08810e32817e061
BuildId - 20130802134111
Device - Unagi

This issue is replicable when gallery open activity is invoked for opening image files received via Bluetooth and image file received via email.

In open.js, frame.onerror is displaying the invalid image error dialog
https://github.com/mozilla-b2g/gaia/blob/master/apps/gallery/js/open.js#L51

On digging deeper inside media_frame.js, the onerror event is triggered while assigning src property

https://github.com/mozilla-b2g/gaia/blob/master/shared/js/media/media_frame.js#L119
https://github.com/mozilla-b2g/gaia/blob/master/shared/js/media/media_frame.js#L50

The image gets loaded successfully but gets hidden by the invalid error dialog 
https://github.com/mozilla-b2g/gaia/blob/master/shared/js/media/media_frame.js#L51

This issue wasn't seen few weeks back like end of July. Including David and Dominic, if there's is 
a recent code change in gallery that could have caused this issue.
Flags: needinfo?(dkuo)
Flags: needinfo?(dflanagan)
I'm not aware of any recent Gaia changes that would cause this. I wonder if there is a gecko change at fault.  Can you reproduce it with b2g18 and gaia master? If not, this may be a gecko regression that should be investigated.

Note also that the error isn't originating at line 119.  That load appears to complete successfully (and I don't know if it triggers an onerror handler). It is line 111 where the this.image.src is being set and triggering this.image.onerror at line 50.

It might be interesting to see whether the error event has a message of any sort (console.log(e) maybe?).  And it might be interesting if the preload image is also firing an error.

Actually, take a look at line 232. I've seen cases before where setting src to null as that line does triggers an error. If commenting out that line fixes the bug, then try the suggestions in the comment and see if you can use them empty string or about:blank instead of null.
Flags: needinfo?(dflanagan)
Keywords: regression
(In reply to David Flanagan [:djf] from comment #3)
> I'm not aware of any recent Gaia changes that would cause this. I wonder if
> there is a gecko change at fault.  Can you reproduce it with b2g18 and gaia
> master? If not, this may be a gecko regression that should be investigated.
> 
> Note also that the error isn't originating at line 119.  That load appears
> to complete successfully (and I don't know if it triggers an onerror
> handler). It is line 111 where the this.image.src is being set and
> triggering this.image.onerror at line 50.
> 
> It might be interesting to see whether the error event has a message of any
> sort (console.log(e) maybe?).  And it might be interesting if the preload
> image is also firing an error.
> 
> Actually, take a look at line 232. I've seen cases before where setting src
> to null as that line does triggers an error. If commenting out that line
> fixes the bug, then try the suggestions in the comment and see if you can
> use them empty string or about:blank instead of null.

Thanks David for your input. It seems line 232 is the one that triggers error. I updated it to use empty string and that has fixed the issue. I have attached the pull request with the code change. Please review.
Comment on attachment 789338 [details] [diff] [review]
Pull request to fix the invalid message dialog shown after opening image

A trivial, obviously safe patch. I have not tested, but am assuming you have, Punam.
Attachment #789338 - Flags: review?(dflanagan) → review+
Flags: needinfo?(dkuo)
Landed on master: https://github.com/mozilla-b2g/gaia/commit/c3f050cfd8fa6607f8d198998d57fef4236d3410
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Reproduces on Buri in 1.2 and 1.3

Issue reproduces with the added step of user zooming in by double-tapping screen. Should this be reopened?

Result: After opened the received picture successfully, zooming in on picture in gallery will pop out invalid message over the picture frame.

Environmental Variables
Device: Buri v 1.2 COM RIL
Build ID: 20131202004001
Gecko: http://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/14868788d50e
Gaia: 075e60c878b0eca68fba9e00bc85cb6eac03578a
Platform Version: 26.0
RIL Version: 01.02.00.019.102 
Firmware Version: V1.2_US_20131115


Environmental Variables
Device: Buri v 1.3 Mozilla RIL
Build ID: 20131127040203
Gecko: http://hg.mozilla.org/mozilla-central/rev/6ecf0c4dfcbe
Gaia: d4b9a3d271f0451b4d903a03c2b931b8cc092041
Platform Version: 28.0a1
Firmware Version: V1.2_US_20131115
Hi Brogan

I am not able to replicate the issue reported in comment 8 on below environment

Device: Hamachi
OS Version 1.3.0.0-prerelease
BuildId: 20131127040203
Gecko: http://hg.mozilla.org/mozilla-central/rev/6ecf0c4dfcbe
Gaia: d4b9a3d271f0451b4d903a03c2b931b8cc092041
Platform version: 28.0a1

Steps followed:
1. Received a picture via bluetooth file transfer.
2. Tap the notification to open the received picture.
3. Gallery will open the received picture via open page.
4. Double tap to zoom in , picture zooms in successfully

Can you pl check if you are able to see the issue on Hamachi, Also it will help if you can attach the image used and steps followed while testing.

Thanks
Flags: needinfo?(bzumwalt)
Bluetooth transfer issue reproduces in Buri 1.3

Result: After opened the received picture successfully, zooming in on picture in gallery will pop out invalid message over the picture frame.

Repro Steps:
1) Updated Buri to Build ID: 20131127040203
2) Open Settings app on phone A and B
3) Turn Bluetooth on on devices A and B
4) Pair phone A to phone B
5) Open gallery app on device B
6) On phone B, select "Share with:" button
7) Press "Bluetooth Transfer" on device B, and select device A as the recieving device
8) On phone A press Bluetooth transfer notification and accept transfer
9) Select transfer complete notification on device A to open recieved image
10) Double tap once on image to zoom in on phone A
11) On device A double tap again to zoom

Attached picture file used as Screenshot

Environmental Variables
Device: Buri v 1.3 Mozilla RIL
Build ID: 20131127040203
Gecko: http://hg.mozilla.org/mozilla-central/rev/6ecf0c4dfcbe
Gaia: d4b9a3d271f0451b4d903a03c2b931b8cc092041
Platform Version: 28.0a1
Firmware Version: V1.2_US_20131115
Flags: needinfo?(bzumwalt)
Attached image Screenshot
Hi Brogan

I am able to replicate the error only with the image attached in Comment 11, i tried with couple of other images and not seeing the issue, i am attaching the image that's zooming without errors, can you pl. try to test this one and also with couple of other images and see how frequent you are seeing this error.

Thanks
Flags: needinfo?(bzumwalt)
Still occurs on multiple 1.3 Buri phones with all images taken using camera app.

Attached examples of affected images:
Screenshot - StillOccurs1
Screenshot - StillOccurs2
Flags: needinfo?(bzumwalt)
The issue is same as bug https://bugzilla.mozilla.org/show_bug.cgi?id=945355 and should be resolved with fix of 945355
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: