gallery_saver: GallerySaver.saveImage crashes on Android 11.0

Devices: Pixel 4 XL, Pixel 5 XL Device Type: Virtual & Physical Android Version: 11.0 API 30

An exception and crash occurs upon calling GallerySaver.saveImage however, the image DOES get saved to the gallery successfully. The app simply crashes at this point. Tested also on Android 10.0 on both devices and the crash does not happen.

E/AndroidRuntime(20767): java.lang.IllegalArgumentException: Invalid column NULL E/AndroidRuntime(20767): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:172) E/AndroidRuntime(20767): at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:153) E/AndroidRuntime(20767): at android.content.ContentProviderProxy.openAssetFile(ContentProviderNative.java:704) E/AndroidRuntime(20767): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1816) E/AndroidRuntime(20767): at android.content.ContentResolver.openOutputStream(ContentResolver.java:1518) E/AndroidRuntime(20767): at android.content.ContentResolver.openOutputStream(ContentResolver.java:1494) E/AndroidRuntime(20767): at carnegietechnologies.gallery_saver.FileUtils.storeThumbnail(FileUtils.kt:172) E/AndroidRuntime(20767): at carnegietechnologies.gallery_saver.FileUtils.insertImage(FileUtils.kt:84) E/AndroidRuntime(20767): at carnegietechnologies.gallery_saver.GallerySaver$saveMediaFile$1$success$1.invokeSuspend(GallerySaver.kt:69) E/AndroidRuntime(20767): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) E/AndroidRuntime(20767): at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:238) E/AndroidRuntime(20767): at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) E/AndroidRuntime(20767): at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) E/AndroidRuntime(20767): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

It probably isn’t, I came up with my own solution, I’ll share as an article or package, I’m not sure yet 🙌