CanHub / Android-Image-Cropper

Image Cropping Library for Android, optimised for Camera / Gallery.
https://canhub.github.io/
Apache License 2.0
1.17k stars 240 forks source link

Getting java.io.IOException on Android 11 #600

Closed Japskiddin closed 7 months ago

Japskiddin commented 7 months ago

Greetings! Received this crash from user's device:

java.lang.RuntimeException: Failed to create temp file for output image
    at com.canhub.cropper.BitmapUtils.com.canhub.cropper.BitmapUtils.buildUri(SourceFile:121)
                                   writeBitmapToUri
    at com.canhub.cropper.BitmapCroppingWorkerJob$start$1$1.invokeSuspend(SourceFile:39)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:9)
    at kotlinx.coroutines.DispatchedTask.run(SourceFile:116)
    at androidx.browser.customtabs.CustomTabsClient$2$3.kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(SourceFile:985)
                                                     run$bridge
    at kotlinx.coroutines.scheduling.TaskImpl.run(SourceFile:3)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(SourceFile:94)
                                                            kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask
                                                            kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker
                                                            run
    Suppressed: p3.e
Caused by: java.io.IOException: No space left on device
    at java.io.UnixFileSystem.createFileExclusively0(Native Method)
    at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:317)
    at java.io.File.createTempFile(File.java:2018)
    at com.canhub.cropper.BitmapUtils.com.canhub.cropper.BitmapUtils.buildUri(SourceFile:86)
                                   writeBitmapToUri