CarnegieTechnologies / gallery_saver

Flutter plugin that saves images and videos to devices gallery
Apache License 2.0
157 stars 329 forks source link

FileNotFoundException crash during storing thumbnail #169

Open cihadturhan opened 3 years ago

cihadturhan commented 3 years ago

I receive the following callstack from users:

java.io.FileNotFoundException: 
  at java.io.FileInputStream.open0 (Native Method)
  at java.io.FileInputStream.open (FileInputStream.java:231)
  at java.io.FileInputStream.<init> (FileInputStream.java:165)
  at carnegietechnologies.gallery_saver.FileUtils.bitmapToArray (FileUtils.java:11)
  or                     .createDirIfNotExist (FileUtils.java:11)
  or                     .exifToDegrees (FileUtils.java:11)
  or                     .getAlbumFolderPath (FileUtils.java:11)
  or                     .getBytesFromFile (FileUtils.java:11)
  or                     .getRotatedBytesIfNecessary (FileUtils.java:11)
  or                     .insertImage (FileUtils.java:11)
  or                     .insertVideo (FileUtils.java:11)
  or                     .insertVideo$default (FileUtils.java:11)
  or                     .storeThumbnail (FileUtils.java:11)
  at carnegietechnologies.gallery_saver.FileUtils.bitmapToArray (FileUtils.java:31)
  or                     .createDirIfNotExist (FileUtils.java:31)
  or                     .exifToDegrees (FileUtils.java:31)
  or                     .getAlbumFolderPath (FileUtils.java:31)
  or                     .getBytesFromFile (FileUtils.java:31)
  or                     .getRotatedBytesIfNecessary (FileUtils.java:31)
  or                     .insertImage (FileUtils.java:31)
  or                     .insertVideo (FileUtils.java:31)
  or                     .insertVideo$default (FileUtils.java:31)
  or                     .storeThumbnail (FileUtils.java:31)
  at carnegietechnologies.gallery_saver.GallerySaver$saveMediaFile$1$success$1.invokeSuspend (GallerySaver.java:97)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.create (BaseContinuationImpl.java:10)
  or                     .resumeWith (BaseContinuationImpl.java:10)
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.java:93)
  at kotlinx.coroutines.scheduling.CoroutineScheduler.access$getCreatedWorkers$p (CoroutineScheduler.java)
  or                     .createTask$kotlinx_coroutines_core (CoroutineScheduler.java)
  or                     .dispatch (CoroutineScheduler.java)
  or                     .dispatch$default (CoroutineScheduler.java)
  or                     .parkedWorkersStackPush$kotlinx_coroutines_core (CoroutineScheduler.java)
  or                     .parkedWorkersStackTopUpdate$kotlinx_coroutines_core (CoroutineScheduler.java)
  or                     .runSafely (CoroutineScheduler.java)
  or                     .signalBlockingWork (CoroutineScheduler.java)
  or                     .submitToLocalQueue (CoroutineScheduler.java)
  or                     .tryCreateWorker$default (CoroutineScheduler.java)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.java:14)
  or                     .findTask (CoroutineScheduler.java:14)
  or                     .getIndexInArray (CoroutineScheduler.java:14)
  or                     .nextInt$kotlinx_coroutines_core (CoroutineScheduler.java:14)
  or                     .setNextParkedWorker (CoroutineScheduler.java:14)
  or                     .tryReleaseCpu$kotlinx_coroutines_core (CoroutineScheduler.java:14)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.java:28)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.java)

Impacted Devices:

Any help would be appreciated. Thanks