cats-oss/android-gpuimage

Crash when lib trying to get orientation

rpavliuk opened this issue · 1 comments

I'm getting an exception when calling the setImage(uri) method. This is the exception:

android.database.CursorIndexOutOfBoundsException: Requested column: 0, # of columns: 0

Uri was received using default MediaStore.ACTION_IMAGE_CAPTURE with my locally created uri.
I'm using this uri in other parts of my app and everything works fine.

I found out that this exception thrown when lib is trying to get an orientation in LoadImageUriTask.
The cursor.getCount return 1, but cursor.getColumnCount return 0. That's why int orientation = cursor.getInt(0); throw an exception.

NOTE: When I'm using uri from Intent.ACTION_GET_CONTENT everything works fine

  • Device: Pixel 3
  • OS: Android 11(latest update)

Any ideas how to fix this?

Was my fault