Closed Bug 1116359 Opened 5 years ago Closed 2 years ago

Loading large animated images crashes Firefox for Android

Categories

(Core :: ImageLib, defect)

defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 523950

People

(Reporter: seth, Unassigned)

References

(Blocks 1 open bug)

Details

The STR here were originally posted in bug 739159 comment 14, but as normal images and animated images currently manage their memory differently, this is really a separate bug. Here's the original STR:

Seems like a png animation with many frames (800x600 pixelx256 frames is more than a average mobile device's memory can hold) can have the same effect. Reproducible with a Samsung Galaxy Note and the following URL: http://www.physikbuch.de/physik-erklaert/dunkle-materie/
Mark Finkle and I have both verified that this crash still happens.


My post from bug 739159 comment 22:

If this is still not fixed on Nightly, I'd guess that what's happening is that ImageLib gets the system *close* to OOM, and then another piece of code tries to allocate and fails to handle the allocation failure, triggering a crash. On my Android tablet (which has several GB of RAM and thus isn't great for testing this bug) I could only reproduce with the STR in comment 14. Those STR triggered bug 760394 for me - which, it is worth noting, seems to be a crash due to OOM at the Java layer, nowhere near ImageLib.


Mark's post from bug 739159 comment 25:

I tested a current fx-team build on a Cubot device (Android phone running Android 4.4 but only 256MB of RAM).

Comment 1 Link: Displays an error "The image '<url>' cannot be displayed because it contains errors."

Comment 14 Link: Fully loads the page, then crashes.
See Also: → 739159
Blocks: image-suck
Depends on: 1116716
Depends on: 1155332
With the landing of bug 523950, we now will only keep all of the frames of an animated image around if it below the configured threshold, default being 20MB. This should resolve these sorts of OOM.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 523950
You need to log in before you can comment on or make changes to this bug.