Closed Bug 945355 Opened 11 years ago Closed 11 years ago

[B2G][Gallery] Viewing picture recieved in email or MMS shows invalid error after zooming in on picture in gallery

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:koi+, firefox28 affected, b2g-v1.2 fixed, b2g-v1.3 fixed)

RESOLVED FIXED
blocking-b2g koi+
Tracking Status
firefox28 --- affected
b2g-v1.2 --- fixed
b2g-v1.3 --- fixed

People

(Reporter: bzumwalt, Assigned: johnhu)

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

Attached video Video Clip
Description:
After opening picture attached to email or MMS, zooming in twice on image an error message "The page at app://gallery.gaiamobile.org says: Image is invalid or corrupt and cannot be displayed." Prior to zooming in, the picture is visible and shows no errors.

Repro Steps:
1) Updated Buri to Build ID: 20131202004001
2) Open Email app after being sent an email with an image attached
3) Open recieved email
4) Press "download attachment" button
5) Select "view" button

Actual:
Zooming in twice on image opened from email or MMS displays error.

Expected:
User is able to zoom in on image opened from email or MMS without incident.

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


Notes:
Repro frequency: 3/3, 100%
See attached: screenshot and video clip
Other information: Issue appears similar to Bug# 901410
Issue repros on Buri in 1.3

Result: Zooming in twice on image opened from email or MMS displays error.

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
Attached image Screenshot
Does this reproduce on 1.1?
Keywords: qawanted
QA Contact: sarsenyev
It doesn't reproduce on 1.1 build
A picture is zooming twice without issues in the email attachment
Sounds like a regression from 1.2, will continue to search for the regression window

Device: Leo 1.1
BuildID: 20131127041203
Gaia: 19c9ff3a46a4389e40253c97b359763243af4531
Gecko: 617eb9d9bcc2
Version: 18.0
QA Contact: sarsenyev
QA Contact: sarsenyev
blocking-b2g: --- → koi?
The Gaia error message "Image is invalid or corrupt and cannot be displayed" is started to appear from the first 6/21 1.2 master build when opening an email attachment on the device

Device: Buri 1.2 master build
BuildID: 20130621031231
Gaia: e2f19420fa6a26c4287588701efaec09a750dba1
Gecko: 7ba8c86f1a56
Version: 24.0a1
Firmware version: V1.2_US_20131115
Btw - my blocking nom is mainly due to the dogfooding concern here given feedback in drivers + the fact that it's a regression. If a user is always going to hit errors on a 2nd zoom, then that's going to make the zoom experience in the gallery app be pretty bad, resulting in annoying support requests.
This bug is caused by setting src to null to an useless img object[1] and there is an onerror callback on that object[2]. But those codes are landed from March. That means the behavior of handle img's src is different between b2g18 and b2g24.

BTW, it indeed has a fault in media_frame.js that we should remove onerror callback when the img becomes useless.

[1] https://github.com/mozilla-b2g/gaia/blob/144edf47ae4e6d4c1faae204d15351ea251b01e4/shared/js/media/media_frame.js#L217
[2] https://github.com/mozilla-b2g/gaia/blob/144edf47ae4e6d4c1faae204d15351ea251b01e4/shared/js/media/media_frame.js#L51-L54
remove the onerror callback when an img becomes useless.
Attachment #8342290 - Flags: review?(dflanagan)
koi+
blocking-b2g: koi? → koi+
Assignee: nobody → johu
Comment on attachment 8342290 [details] [review]
remove onerror callback when img element is useless

I had read the patch of bug 901410. I feel the onerror callback is put at the wrong place. I will change the patch to handle it.
Attachment #8342290 - Attachment is obsolete: true
Attachment #8342290 - Flags: review?(dflanagan)
After reading the bug 901410, I found this patch can be just one line patch, which is to replace image.src = null with image.src = ''. Beside that, I think we should also keep the onerror callback to the newimage variable which becomes this.image inside of  _switchToFullSizeImage.
Attachment #8342935 - Flags: review?(dflanagan)
Comment on attachment 8342935 [details] [review]
replace src = null with src = '', and keep onerror callback when newimage becomes this.image

r+, but please check whether the CSS change should also be replicated in the two css files of the Camera app.  (See github for details).

Thanks, John!
Attachment #8342935 - Flags: review?(dflanagan) → review+
Ok, I found someone already file the bug 946803 about it. I will do the same change at bug 946803.
merged to master:
https://github.com/mozilla-b2g/gaia/commit/445cbc90e986d0d47194216eabd89a24f4a0f671
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Uplifted 445cbc90e986d0d47194216eabd89a24f4a0f671 to:
v1.3 already had this commit
v1.2: 73ee59e3959883f248520902c32aee3924408740
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: