I just had a weird issue where BitmapFactory.nativeDecodeStream() called from BitmapFactory.decodeStream() blocked forever when trying to load an image (PNG) stored on the SD card (happened on 2.3.4). It's been also reported by a user on another Android version although I did never seen it myself until now. This seems to be very rare and I cannot reproduce it reliably. Note that my app loads many images in rapid succession from the SD card (thumbnails)
Here's the code (that is nothing exceptional): BitmapFactory.Options bmOptions = new BitmapFactory.Options(); bmOptions.inSampleSize = 1; bmOptions.inPreferredConfig = Bitmap.Config.RGB_565; bmOptions.inDither = false; BufferedInputStream is = new BufferedInputStream(new FileInputStream(file), 8192); Bitmap bitmap = BitmapFactory.decodeStream(is, null, bmOptions); <= rarely blocks forever -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en