GIF decoder crashing in decoding twitter profile gif image

Dec 26, 2011 at 12:00 PM
Edited Dec 26, 2011 at 12:02 PM


i am using GifDecoder on windows phone 7 to decode the Gif images of twitter user's, how ever for some images the decoder is crashing

 The gfi file size is 837 bytes. and its showing up well in web browser

I am using webClient's OpenReadAsync method to read the image data from the twitter server on callback completion i am trying to call decode functionality

 var decoder = new GifDecoder();
  decoder.Decode(ExImage, e.Result);  // crashes in this line without giving any exception.


the problem is after this crash the whole app become unresponsive and only way is to exit it.


please let mek now what can be wrong here.

Dec 27, 2011 at 8:41 AM

There are several possible problems:

1. Are you sure that you have permissions to download the image? Make a
breakpoint here to find out if the result object "e" is valid and has no


2. Afaik, the debugger wont stop automatically in a background thread,
so make sure you really catch the exception or make a simple try-catch
with a breakpoint in the catch block.

3. The gif encoder does not support all gif types, it may happen that
the encoder cannot read your image.