
Issue 3422 - android - Animated GIF not working in browser - alexandros
http://code.google.com/p/android/issues/detail?id=3422
======
axod
Comment #42

    
    
      It's a shortcoming of the graphics engine, complicated by
      the relative lack of memory and the trickiness with
      managing what little it has. The implementation in WebKit
      for GIF support allocates a 32 bpp bitmap for each
      frame, which can chew through memory very quickly. The
      bitmap allocator is backed by ashmem, but when the
      kernel detects low memory, it tends to kill the process
      rather than giving it a chance to back off.
    
      If you have expertise in this area, we'd gladly accept
      your help in fixing this.

~~~
houseabsolute
I'm curious how Apple managed to do it on devices that are substantially
underpowered compared to many of the ones that make up the modern Android
ecosystem.

~~~
DavidMcLaughlin
Comment #45:

According to the Android developer in comment 42 the explanation is that
Android has multitasking while the iPhone doesn't.

~~~
houseabsolute
Not really understanding what short of a truly massive design flaw could cause
these two things to be related. Surely if we're running low on memory the
backgrounded processes should be the first ones to get killed. Or else how can
you make an app that when active pushes the limits of the device? You'd always
be worried about getting killed and not about doing what your app is there to
do.

~~~
regularfry
What if there's a bug in the foreground process that eats memory? In that
case, you don't want to start killing off background processes at random, or
you'll get a dead phone.

Seriously, google "OOM killer." This problem, and problems like it, are not
new, nor are they simple to solve.

~~~
houseabsolute
I'm aware of what an OOM killer is, but it strikes me that the rules are a
little different on a device where the resource constraints and mode of
operation will frequently demand all the resources for a single process.

------
corbet
The amusing thing is I've been using Android phones for well over a year and
never even noticed this problem...

------
jacquesm
My initial response was that's a feature, not a bug. Then I realized that
there are plenty of real uses for animated gifs.

~~~
ionfish
E.g. loading graphics.

~~~
axod
Problem is, they're also massively abused by people using them to show video.
Playing an animated gif 'video' would consume a ton of ram.

------
latch
Just the other day I installed ADT and decided to give it another try (I had
played with it back the whole thing was brand new).

The story for developers is quite poor. Emulation is very slow (you can't get
close to real life snapdragon speed) and then you have Eclipse (which seems to
be a hate it or love it).

I've done both iPhone and Compact Framework development, and despite
objective-c, iphone development is far superior to the other two.

Anyways, these types of issues, the lack of core features like USB Host and
[apparently] animated GIFs, keep making me think i should actually learn
Silverlight for WM7.

~~~
theBobMcCormick
Android development doesn't require Eclipse.

------
cookiecaper
Certainly an interesting issue.

For the record, I just tested animated GIFs with Opera Mobile 5 Beta on my G1
running CompleteEclair 2.0 and it doesn't do animations either.

------
rimantas
In the context of the sea of complaints about Apple's iP* not supporting Flash
this looks… interesting.

------
ck2
Wow, now that is very surprising and to see the ticket go on for nearly a year
with google.

Especially since how comment #134 on there makes the fix look kinda simple to
include as an option for higher memory devices.

------
lfx
Animated PNG (APNG) not working either.

------
ajkirwin
I'm GLAD of this, frankly. 99%+ of animated gifs are simply annoying and
unnecessary

~~~
regularfry
...and as with all these things, the remaining 1% are absolutely vital and a
deal-breaker for those who need them.

~~~
raganwald
True, but to play devil's advocate, this road leads to Microsoft Word, where
each user only needs 1% of the product's features but of course every user has
their own unique 1%. The result is a massive product that is resource-
insatiable.

Which... leads us back here. Viewed in isolation it is no big deal, much as
each feature of Word is no big deal in isolation. But the Android team have to
deal with the combination of features running on resource-constrained
handsets.

:-)

~~~
houseabsolute
> this road leads to Microsoft Word

I wouldn't mind walking down the road to one of the most successful and widely
loved (not to mention profitable) pieces of software in the industry.

------
houseabsolute
Android team: failure has never looked this easy.

It would take too long to numerate the demonstrations of incompetence in the
Android ecosystem. I guess I'll just point out a couple:

* How about that Update All button on the market application? Oh wait, there isn't one.

* Nice next and previous conversation buttons in mail. What's that you say? Neither is available on the screen itself, and the two actions are in different parts of the menu?

* Truly impressed with that universal copy and paste. Um, about that.

Seriously folks. The phone should never have launched with these deficiencies
and the many others that better people than I have noted. But to allow it to
stagnate and still not address them for so long? That's flat out contempt for
the user.

~~~
cookiecaper
Those are all minor UI nitpicks. Android is open-source. If an "Update All" or
better placement of Forward/Back buttons in Gmail app is so important to you,
you should add it.

~~~
houseabsolute
Enough minor UI nitpicks, and there are more than enough, begin to stack up.
The "it's open source, fix it yourself" defense is tired, especially when
given for a device I'd pay for (if I didn't have the good sense to own an
iPhone -- or anything else -- instead).

Also, lack of copy and paste is not a "minor" nitpick. As I recall it's one of
the things that iPhone haters would not stop harping about when Android first
came out with the half-baked copy and paste it still has today.
(<http://www.youtube.com/watch?v=ofQqhJ_fa2M>) Even if that wasn't the case,
it's a major, serious deficiency in the device whose absence I would miss on a
fairly regular basis if I didn't have it with my iPhone.

~~~
doron
I have to reluctantly agree. I love my Droid, and prefer it to iphone, but the
Cut&Paste is a mess.

~~~
loginx
Wait, what problem are you seeing with copy&paste? I use it every day across
multiple apps and I've never noticed a single problem.

~~~
houseabsolute
Couple of things for you to try:

* Copy-paste anything from the browser to elsewhere. You see how you have to go two-deep into a menu? For iPhone users, they just tap the text they want to copy, the drag to put the bounds at the right place.

* Try copying anything out of a received gmail message and pasting it somewhere else.

