Android-TiffBitmapFactory icon indicating copy to clipboard operation
Android-TiffBitmapFactory copied to clipboard

TiffSaver.saveBitmap causes Fatal signal 11 (SIGSEGV)

Open vbresan opened this issue 5 years ago • 2 comments

I am calling:

TiffSaver.saveBitmap(file, bitmap);

Bitmap is a gif image loaded with Android's BitmapFactory.decodeStream. It seems that everything is fine with the gif image as it is properly decoded and encoded to other formats supported natively by Android.

However, the call results with the following error: A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 3220 (Thread-2250)

The error can not be caught with a catch clause in java code, the app just crashes immediately. I am attaching the gif file:

dilbert2073207040504

vbresan avatar Oct 23 '20 22:10 vbresan

It looks like it might be a general problem with bitmaps that come from gif files. I have attached another one.

Once again, calling bitmap.compress to any format supported by Android natively, doesn't produce any error.

0007 TEST

vbresan avatar Oct 23 '20 22:10 vbresan

I have also set saver to throw exceptions and limited memory usage, it didn't help. The same crash happened. Here is the code snippet of what I have tried:


        TiffSaver.SaveOptions options = new TiffSaver.SaveOptions();
        options.inThrowException  = true;
        options.inAvailableMemory = 10000000;

        try {
            TiffSaver.saveBitmap(file, bitmap, options);
        } catch (Exception e) {
            e.printStackTrace();    // it never gets caught
        }

vbresan avatar Oct 24 '20 15:10 vbresan