6 ms·
Issue 3422 - android - Animated GIF not working in browser
- jacquesm 17y agoMy initial response was that's a feature, not a bug. Then I realized that there are plenty of real uses for animated gifs.
- axod 17y agoComment #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 17y agoI'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 17y agoComment #45: According to the Android developer in comment 42 the explanation is that Android has multitasking while the iPhone doesn't.
- houseabsolute 17y agoNot 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.
- axod 17y agoAlso surely you could just have: function readGIF(filename) { if (calcMemSizeNeeded(filename) > memoryFree()) { displayGifPlaceholder(); } } eg just display an animated GIF if there's enough ram, and if not, display some placeholder. I guess one of the other issues there though is websites that 'stream' animated gifs that never end. Still, you could just disable those for now.
- regularfry 17y agoWhat 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 17y agoI'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.
- viraptor 17y agoThat's just silly explanation. They have enough processing power to decode every frame into the single-frame buffer every time a new one is needed. Why preallocate the whole movie? I guess they don't do it the same way for videos anyways... Also, I'm not sure where did commenter #45 get the idea about multitasking. #42 said just that process which is memory-hungry will be killed. That's it. It doesn't matter if the OS is multitasking or not... Maemo is multitasking (linux based) and displays animated GIFs just fine.
- matthavener 17y agoProbably first by only allocating the necessary 8 bpp instead of 32 bpp
- jasonlotito 17y agoI wouldn't say Apple's is any better. I've rarely ever had animated gifs work on my iPod. In fact, I don't ever remember a single one working. I might get a frame or two, at most, but that's it. Maybe they've fixed it in version 3 of the iPhone OS. I don't know, none of the features were worth the upgrade.
- Splines 17y agoI've seen them work on my iPhone, but whatever algorithm they're using is horrible. For every frame of animation it seems to want to read from the "start" of the file. For a few frames, it's fine, but anything longer than 2-3 seconds of animation makes it slow to a crawl. Animated gifs are so uncommon anyway (the use cases I've seen where it falls down are lolcat-worthy animations) that it's probably not worth fixing. The 90s-era gif animations probably look good enough.
- ajkirwin 17y agoI'm GLAD of this, frankly. 99%+ of animated gifs are simply annoying and unnecessary
- houseabsolute 17y agoIt's a feature LOL.
- regularfry 17y ago...and as with all these things, the remaining 1% are absolutely vital and a deal-breaker for those who need them.
- raganwald 17y agoTrue, 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 17y ago> 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.
- deleted 17y ago[deleted]
- lfx 17y agoAnimated PNG (APNG) not working either.
- houseabsolute 17y agoAndroid 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 17y agoThose 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 17y agoEnough 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 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 17y agoI have to reluctantly agree. I love my Droid, and prefer it to iphone, but the Cut&Paste is a mess.
- cookiecaper 17y agoCertainly 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.
- latch 17y agoJust 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 17y agoAndroid development doesn't require Eclipse.
- rimantas 17y agoIn the context of the sea of complaints about Apple's iP* not supporting Flash this looks… interesting.
- corbet 17y agoThe amusing thing is I've been using Android phones for well over a year and never even noticed this problem...
- ck2 17y agoWow, 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.